Hook up VP8D_GET_LAST_REF_USED
Commit 892e23a5b
introduced support for the VP8D_GET_LAST_REF_USED,
but missed the mapping of the control id to the underlying function,
so it was unavailable to applications.
In addition, the underlying function vp8_references_buffer() is
moved from common/postproc.c to decoder/onyxd_if.c as postproc.c is
not built in all configurations.
Change-Id: I426dd254e7e6c4c061b70d729b69a6c384ebbe44
This commit is contained in:
Родитель
83cef816fd
Коммит
8be41bba80
|
@ -696,23 +696,6 @@ static void constrain_line (int x0, int *x1, int y0, int *y1, int width, int hei
|
|||
}
|
||||
}
|
||||
|
||||
int vp8_references_buffer( VP8_COMMON *oci, int ref_frame )
|
||||
{
|
||||
const MODE_INFO *mi = oci->mi;
|
||||
int mb_row, mb_col;
|
||||
|
||||
for (mb_row = 0; mb_row < oci->mb_rows; mb_row++)
|
||||
{
|
||||
for (mb_col = 0; mb_col < oci->mb_cols; mb_col++,mi++)
|
||||
{
|
||||
if( mi->mbmi.ref_frame == ref_frame)
|
||||
return 1;
|
||||
}
|
||||
mi++;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static void multiframe_quality_enhance_block
|
||||
(
|
||||
|
|
|
@ -606,3 +606,26 @@ int vp8dx_get_raw_frame(VP8D_COMP *pbi, YV12_BUFFER_CONFIG *sd, int64_t *time_st
|
|||
vp8_clear_system_state();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* This function as written isn't decoder specific, but the encoder has
|
||||
* much faster ways of computing this, so it's ok for it to live in a
|
||||
* decode specific file.
|
||||
*/
|
||||
int vp8dx_references_buffer( VP8_COMMON *oci, int ref_frame )
|
||||
{
|
||||
const MODE_INFO *mi = oci->mi;
|
||||
int mb_row, mb_col;
|
||||
|
||||
for (mb_row = 0; mb_row < oci->mb_rows; mb_row++)
|
||||
{
|
||||
for (mb_col = 0; mb_col < oci->mb_cols; mb_col++,mi++)
|
||||
{
|
||||
if( mi->mbmi.ref_frame == ref_frame)
|
||||
return 1;
|
||||
}
|
||||
mi++;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
|
|
@ -700,7 +700,7 @@ static vpx_codec_err_t vp8_get_last_ref_updates(vpx_codec_alg_priv_t *ctx,
|
|||
return VPX_CODEC_INVALID_PARAM;
|
||||
}
|
||||
|
||||
extern int vp8_references_buffer( VP8_COMMON *oci, int ref_frame );
|
||||
extern int vp8dx_references_buffer( VP8_COMMON *oci, int ref_frame );
|
||||
static vpx_codec_err_t vp8_get_last_ref_frame(vpx_codec_alg_priv_t *ctx,
|
||||
int ctrl_id,
|
||||
va_list args)
|
||||
|
@ -712,9 +712,9 @@ static vpx_codec_err_t vp8_get_last_ref_frame(vpx_codec_alg_priv_t *ctx,
|
|||
if (ref_info)
|
||||
{
|
||||
*ref_info =
|
||||
(vp8_references_buffer( oci, ALTREF_FRAME )?VP8_ALTR_FRAME:0) |
|
||||
(vp8_references_buffer( oci, GOLDEN_FRAME )?VP8_GOLD_FRAME:0) |
|
||||
(vp8_references_buffer( oci, LAST_FRAME )?VP8_LAST_FRAME:0);
|
||||
(vp8dx_references_buffer( oci, ALTREF_FRAME )?VP8_ALTR_FRAME:0) |
|
||||
(vp8dx_references_buffer( oci, GOLDEN_FRAME )?VP8_GOLD_FRAME:0) |
|
||||
(vp8dx_references_buffer( oci, LAST_FRAME )?VP8_LAST_FRAME:0);
|
||||
|
||||
return VPX_CODEC_OK;
|
||||
}
|
||||
|
@ -752,6 +752,7 @@ vpx_codec_ctrl_fn_map_t vp8_ctf_maps[] =
|
|||
{VP8_SET_DBG_DISPLAY_MV, vp8_set_dbg_options},
|
||||
{VP8D_GET_LAST_REF_UPDATES, vp8_get_last_ref_updates},
|
||||
{VP8D_GET_FRAME_CORRUPTED, vp8_get_frame_corrupted},
|
||||
{VP8D_GET_LAST_REF_USED, vp8_get_last_ref_frame},
|
||||
{ -1, NULL},
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче