mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 01:26:49 +08:00
[h264e]: Remove unused i_frame_packing
Change-Id: Ia53c2513bc57dde47960c06374d1c6d5fa729da7 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -652,7 +652,6 @@ typedef struct MppEncH264RefCfg_t {
|
|||||||
RK_S32 hw_longterm_mode;
|
RK_S32 hw_longterm_mode;
|
||||||
RK_S32 i_dpb_size; /* Force a DPB size larger than that implied by B-frames and reference frames.
|
RK_S32 i_dpb_size; /* Force a DPB size larger than that implied by B-frames and reference frames.
|
||||||
* Useful in combination with interactive error resilience. */
|
* Useful in combination with interactive error resilience. */
|
||||||
RK_S32 i_frame_packing;
|
|
||||||
} MppEncH264RefCfg;
|
} MppEncH264RefCfg;
|
||||||
|
|
||||||
typedef struct MppEncH264SeiCfg_t {
|
typedef struct MppEncH264SeiCfg_t {
|
||||||
|
@@ -122,8 +122,6 @@ MPP_RET hal_h264e_init(void *hal, MppHalCfg *cfg)
|
|||||||
ref->i_long_term_en = H264E_LONGTERM_REF_EN;
|
ref->i_long_term_en = H264E_LONGTERM_REF_EN;
|
||||||
ref->hw_longterm_mode = 0;
|
ref->hw_longterm_mode = 0;
|
||||||
ref->i_long_term_internal = 0;
|
ref->i_long_term_internal = 0;
|
||||||
ref->i_frame_packing = -1;
|
|
||||||
|
|
||||||
|
|
||||||
ctx->cfg = cfg->cfg;
|
ctx->cfg = cfg->cfg;
|
||||||
ctx->set = cfg->set;
|
ctx->set = cfg->set;
|
||||||
|
@@ -450,7 +450,6 @@ static void h264e_set_ref(H264eRefParam *ref)
|
|||||||
ref->i_long_term_en = H264E_LONGTERM_REF_EN;
|
ref->i_long_term_en = H264E_LONGTERM_REF_EN;
|
||||||
ref->hw_longterm_mode = 0;
|
ref->hw_longterm_mode = 0;
|
||||||
ref->i_long_term_internal = 0;
|
ref->i_long_term_internal = 0;
|
||||||
ref->i_frame_packing = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void h264e_set_param(H264eHalParam *p, RK_S32 hw_type)
|
void h264e_set_param(H264eHalParam *p, RK_S32 hw_type)
|
||||||
|
@@ -360,7 +360,6 @@ typedef struct H264eRefParam_t {
|
|||||||
RK_S32 hw_longterm_mode;
|
RK_S32 hw_longterm_mode;
|
||||||
RK_S32 i_dpb_size; /* Force a DPB size larger than that implied by B-frames and reference frames.
|
RK_S32 i_dpb_size; /* Force a DPB size larger than that implied by B-frames and reference frames.
|
||||||
* Useful in combination with interactive error resilience. */
|
* Useful in combination with interactive error resilience. */
|
||||||
RK_S32 i_frame_packing;
|
|
||||||
} H264eRefParam;
|
} H264eRefParam;
|
||||||
|
|
||||||
typedef struct H264eHalParam_t {
|
typedef struct H264eHalParam_t {
|
||||||
|
@@ -175,13 +175,8 @@ static void h264e_rkv_reference_reset(H264eRkvDpbCtx *dpb_ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static RK_S32
|
static RK_S32
|
||||||
h264e_rkv_reference_distance(H264eRefParam *ref_cfg,
|
h264e_rkv_reference_distance(H264eRkvDpbCtx *dpb_ctx, H264eRkvFrame *frame )
|
||||||
H264eRkvDpbCtx *dpb_ctx, H264eRkvFrame *frame )
|
|
||||||
{
|
{
|
||||||
if ( ref_cfg->i_frame_packing == 5 )
|
|
||||||
return abs((dpb_ctx->fdec->i_frame_cnt & ~1) - (frame->i_frame_cnt & ~1)) +
|
|
||||||
((dpb_ctx->fdec->i_frame_cnt & 1) != (frame->i_frame_cnt & 1));
|
|
||||||
else
|
|
||||||
return abs(dpb_ctx->fdec->i_frame_cnt - frame->i_frame_cnt);
|
return abs(dpb_ctx->fdec->i_frame_cnt - frame->i_frame_cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,8 +249,8 @@ static void h264e_rkv_reference_build_list(H264eHalContext *ctx)
|
|||||||
if ( list ? dpb_ctx->fref[list][i + 1]->i_poc < dpb_ctx->fref_nearest[list]->i_poc
|
if ( list ? dpb_ctx->fref[list][i + 1]->i_poc < dpb_ctx->fref_nearest[list]->i_poc
|
||||||
: dpb_ctx->fref[list][i + 1]->i_poc > dpb_ctx->fref_nearest[list]->i_poc )
|
: dpb_ctx->fref[list][i + 1]->i_poc > dpb_ctx->fref_nearest[list]->i_poc )
|
||||||
dpb_ctx->fref_nearest[list] = dpb_ctx->fref[list][i + 1];
|
dpb_ctx->fref_nearest[list] = dpb_ctx->fref[list][i + 1];
|
||||||
if ( h264e_rkv_reference_distance( ref_cfg, dpb_ctx, dpb_ctx->fref[list][i] ) >
|
if ( h264e_rkv_reference_distance(dpb_ctx, dpb_ctx->fref[list][i] ) >
|
||||||
h264e_rkv_reference_distance( ref_cfg, dpb_ctx, dpb_ctx->fref[list][i + 1] ) ) {
|
h264e_rkv_reference_distance(dpb_ctx, dpb_ctx->fref[list][i + 1] ) ) {
|
||||||
MPP_SWAP( H264eRkvFrame *, dpb_ctx->fref[list][i], dpb_ctx->fref[list][i + 1] );
|
MPP_SWAP( H264eRkvFrame *, dpb_ctx->fref[list][i], dpb_ctx->fref[list][i + 1] );
|
||||||
b_ok = 0;
|
b_ok = 0;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user