vp8_stream_info_t si;
int defer_alloc;
int decoder_init;
- VP8D_PTR pbi;
+ struct VP8D_COMP *pbi;
int postproc_cfg_set;
vp8_postproc_cfg_t postproc_cfg;
#if CONFIG_POSTPROC_VISUALIZER
if (!res)
{
VP8D_CONFIG oxcf;
- VP8D_PTR optr;
-
- vp8dx_initialize();
+ struct VP8D_COMP* optr;
oxcf.Width = ctx->si.w;
oxcf.Height = ctx->si.h;
&& (ctx->base.init_flags & VPX_CODEC_USE_POSTPROC))
{
ctx->postproc_cfg.post_proc_flag =
- VP8_DEBLOCK | VP8_DEMACROBLOCK;
+ VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE;
ctx->postproc_cfg.deblocking_level = 4;
ctx->postproc_cfg.noise_level = 0;
}
return VPX_CODEC_INVALID_PARAM;
}
+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)
+{
+ int *ref_info = va_arg(args, int *);
+ VP8D_COMP *pbi = (VP8D_COMP *)ctx->pbi;
+ VP8_COMMON *oci = &pbi->common;
+
+ if (ref_info)
+ {
+ *ref_info =
+ (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;
+ }
+ else
+ return VPX_CODEC_INVALID_PARAM;
+}
static vpx_codec_err_t vp8_get_frame_corrupted(vpx_codec_alg_priv_t *ctx,
int ctrl_id,
{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},
};
NOT_IMPLEMENTED
}
};
-
-/*
- * BEGIN BACKWARDS COMPATIBILITY SHIM.
- */
-vpx_codec_iface_t vpx_codec_vp8_algo =
-{
- "WebM Project VP8 Decoder (Deprecated API)" VERSION_STRING,
- VPX_CODEC_INTERNAL_ABI_VERSION,
- VPX_CODEC_CAP_DECODER | VP8_CAP_POSTPROC | VP8_CAP_ERROR_CONCEALMENT,
- /* vpx_codec_caps_t caps; */
- vp8_init, /* vpx_codec_init_fn_t init; */
- vp8_destroy, /* vpx_codec_destroy_fn_t destroy; */
- vp8_ctf_maps, /* vpx_codec_ctrl_fn_map_t *ctrl_maps; */
- vp8_xma_get_mmap, /* vpx_codec_get_mmap_fn_t get_mmap; */
- vp8_xma_set_mmap, /* vpx_codec_set_mmap_fn_t set_mmap; */
- {
- vp8_peek_si, /* vpx_codec_peek_si_fn_t peek_si; */
- vp8_get_si, /* vpx_codec_get_si_fn_t get_si; */
- vp8_decode, /* vpx_codec_decode_fn_t decode; */
- vp8_get_frame, /* vpx_codec_frame_get_fn_t frame_get; */
- },
- { /* encoder functions */
- NOT_IMPLEMENTED,
- NOT_IMPLEMENTED,
- NOT_IMPLEMENTED,
- NOT_IMPLEMENTED,
- NOT_IMPLEMENTED,
- NOT_IMPLEMENTED
- }
-};