chore[hal_h265d]: use INT_MAX for poc distance initiation

INT_MAX already defined in <limits.h>

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I98a12ccc81f2e390fe1528835124d05a8c5598b3
This commit is contained in:
Chandler Chen 2024-05-06 15:47:14 +08:00
parent 6a04f82ae6
commit 4d889a6969
4 changed files with 4 additions and 6 deletions

View file

@ -19,6 +19,7 @@
#define __HAL_H265D_COM_H__
#include "rk_type.h"
#include <limits.h>
#define SCALING_LIST_SIZE (81 * 1360)
#define RPS_SIZE (600 * 32)

View file

@ -847,7 +847,6 @@ static void hal_h265d_rcb_info_update(void *hal, void *dxva,
}while(0)
#define pocdistance(a, b) (((a) > (b)) ? ((a) - (b)) : ((b) - (a)))
#define MAX_INT 2147483647
static MPP_RET hal_h265d_vdpu34x_gen_regs(void *hal, HalTaskInfo *syn)
{
@ -864,7 +863,7 @@ static MPP_RET hal_h265d_vdpu34x_gen_regs(void *hal, HalTaskInfo *syn)
HalBuf *mv_buf = NULL;
RK_S32 fd = -1;
RK_U32 mv_size = 0;
RK_S32 distance = MAX_INT;
RK_S32 distance = INT_MAX;
h265d_dxva2_picture_context_t *dxva_cxt =
(h265d_dxva2_picture_context_t *)syn->dec.syntax.data;
HalH265dCtx *reg_ctx = ( HalH265dCtx *)hal;

View file

@ -628,7 +628,6 @@ static void hal_h265d_rcb_info_update(void *hal, void *dxva,
}while(0)
#define pocdistance(a, b) (((a) > (b)) ? ((a) - (b)) : ((b) - (a)))
#define MAX_INT 2147483647
static MPP_RET hal_h265d_vdpu382_setup_colmv_buf(void *hal, HalTaskInfo *syn)
{
@ -683,7 +682,7 @@ static MPP_RET hal_h265d_vdpu382_gen_regs(void *hal, HalTaskInfo *syn)
MppBuffer framebuf = NULL;
HalBuf *mv_buf = NULL;
RK_S32 fd = -1;
RK_S32 distance = MAX_INT;
RK_S32 distance = INT_MAX;
h265d_dxva2_picture_context_t *dxva_cxt =
(h265d_dxva2_picture_context_t *)syn->dec.syntax.data;
HalH265dCtx *reg_ctx = ( HalH265dCtx *)hal;

View file

@ -68,7 +68,6 @@ static const FilterdColBufRatio filterd_fbc_off[CTU][FMT] = {
#define SCALIST_OFFSET(pos) (RPS_OFFSET(pos) + RPS_ALIGEND_SIZE)
#define pocdistance(a, b) (((a) > (b)) ? ((a) - (b)) : ((b) - (a)))
#define MAX_INT 2147483647
static RK_U32 rkv_len_align_422(RK_U32 val)
{
@ -901,7 +900,7 @@ static MPP_RET hal_h265d_vdpu383_gen_regs(void *hal, HalTaskInfo *syn)
HalBuf *mv_buf = NULL;
RK_S32 fd = -1;
RK_U32 mv_size = 0;
RK_S32 distance = MAX_INT;
RK_S32 distance = INT_MAX;
(void) fd;
if (syn->dec.flags.parse_err ||