History

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.

John Koleszar committed 14 years ago

Commit 8be41bb1 parent 83cef813 files · +28 −21Browse files

Unified · Split

3 files
  1. vp8/common/postproc.c +0 −17
  2. vp8/decoder/onyxd_if.c +23 −0
  3. vp8/vp8_dx_iface.c +5 −4
vp8/common/postproc.c+0−17
@@ -696,23 +696,6 @@ static void constrain_line (int x0, int *x1, int y0, int *y1, int width, int hei · 695 unmodified lines
696696 }
697697 }
698698
699−int vp8_references_buffer( VP8_COMMON *oci, int ref_frame )
700−{
701− const MODE_INFO *mi = oci->mi;
702− int mb_row, mb_col;
703−
704− for (mb_row = 0; mb_row < oci->mb_rows; mb_row++)
705− {
706− for (mb_col = 0; mb_col < oci->mb_cols; mb_col++,mi++)
707− {
708− if( mi->mbmi.ref_frame == ref_frame)
709− return 1;
710− }
711− mi++;
712− }
713− return 0;
714−
715−}
716699
717700 static void multiframe_quality_enhance_block
718701 (
vp8/decoder/onyxd_if.c+23−0
@@ -606,3 +606,26 @@ int vp8dx_get_raw_frame(VP8D_COMP *pbi, YV12_BUFFER_CONFIG *sd, int64_t *time_st · 605 unmodified lines
606606 vp8_clear_system_state();
607607 return ret;
608608 }
609+
610+
611+/* This function as written isn't decoder specific, but the encoder has
612+ * much faster ways of computing this, so it's ok for it to live in a
613+ * decode specific file.
614+ */
615+int vp8dx_references_buffer( VP8_COMMON *oci, int ref_frame )
616+{
617+ const MODE_INFO *mi = oci->mi;
618+ int mb_row, mb_col;
619+
620+ for (mb_row = 0; mb_row < oci->mb_rows; mb_row++)
621+ {
622+ for (mb_col = 0; mb_col < oci->mb_cols; mb_col++,mi++)
623+ {
624+ if( mi->mbmi.ref_frame == ref_frame)
625+ return 1;
626+ }
627+ mi++;
628+ }
629+ return 0;
630+
631+}
vp8/vp8_dx_iface.c+5−4
@@ -700,7 +700,7 @@ static vpx_codec_err_t vp8_get_last_ref_updates(vpx_codec_alg_priv_t *ctx, · 699 unmodified lines
700700 return VPX_CODEC_INVALID_PARAM;
701701 }
702702
703−extern int vp8_references_buffer( VP8_COMMON *oci, int ref_frame );
703+extern int vp8dx_references_buffer( VP8_COMMON *oci, int ref_frame );
704704 static vpx_codec_err_t vp8_get_last_ref_frame(vpx_codec_alg_priv_t *ctx,
705705 int ctrl_id,
706706 va_list args)
@@ -712,9 +712,9 @@ static vpx_codec_err_t vp8_get_last_ref_frame(vpx_codec_alg_priv_t *ctx, · 5 unmodified lines
712712 if (ref_info)
713713 {
714714 *ref_info =
715− (vp8_references_buffer( oci, ALTREF_FRAME )?VP8_ALTR_FRAME:0) |
716− (vp8_references_buffer( oci, GOLDEN_FRAME )?VP8_GOLD_FRAME:0) |
717− (vp8_references_buffer( oci, LAST_FRAME )?VP8_LAST_FRAME:0);
715+ (vp8dx_references_buffer( oci, ALTREF_FRAME )?VP8_ALTR_FRAME:0) |
716+ (vp8dx_references_buffer( oci, GOLDEN_FRAME )?VP8_GOLD_FRAME:0) |
717+ (vp8dx_references_buffer( oci, LAST_FRAME )?VP8_LAST_FRAME:0);
718718
719719 return VPX_CODEC_OK;
720720 }
@@ -752,6 +752,7 @@ vpx_codec_ctrl_fn_map_t vp8_ctf_maps[] = · 31 unmodified lines
752752 {VP8_SET_DBG_DISPLAY_MV, vp8_set_dbg_options},
753753 {VP8D_GET_LAST_REF_UPDATES, vp8_get_last_ref_updates},
754754 {VP8D_GET_FRAME_CORRUPTED, vp8_get_frame_corrupted},
755+ {VP8D_GET_LAST_REF_USED, vp8_get_last_ref_frame},
755756 { -1, NULL},
756757 };
757758

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t