Commit 9951f461 authored by John Koleszar's avatar John Koleszar Committed by Gerrit Code Review

Merge "Hook up VP8D_GET_LAST_REF_USED"

parents 319f7c4d 8be41bba
......@@ -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},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment