summaryrefslogtreecommitdiff
path: root/vp9/vp9_dx_iface.c
diff options
context:
space:
mode:
authorFrank Galligan <fgalligan@google.com>2014-01-23 14:59:00 -0800
committerFrank Galligan <fgalligan@google.com>2014-01-24 10:10:20 -0800
commitb1c72b633ef633a1ee6e83c3556393b6fe9068c4 (patch)
treef4e86f32c9715c07f65945b0d5f51f9f4be6acb9 /vp9/vp9_dx_iface.c
parent63fb34c9bc6114c6ab8b4250177ff6197edacf25 (diff)
downloadlibvpx-b1c72b633ef633a1ee6e83c3556393b6fe9068c4.tar
libvpx-b1c72b633ef633a1ee6e83c3556393b6fe9068c4.tar.gz
libvpx-b1c72b633ef633a1ee6e83c3556393b6fe9068c4.tar.bz2
libvpx-b1c72b633ef633a1ee6e83c3556393b6fe9068c4.zip
Revert external frame buffer code.
A future CL will add external frame buffers differently. Squash commit of four revert commits: Revert "Increase required number of external frame buffers" This reverts commit 9e41d569d7c84dd9ca8f0047c15377a883945685. Revert "Add external constants." This reverts commit bbf53047b03106e3c2e24b28cb836cc838db5ee8. Revert "Add frame buffer lru cache." This reverts commit fbada948fa345e67acf9aa41a8f9a78f5dfe8648. Conflicts: vpxdec.c Change-Id: I76fe42419923a6ea6c75d9997cbbf941d73d3005 Revert "Add support to pass in external frame buffers." This reverts commit 10f891696bc4c972c13cc9fde2c53470501a03e2. Conflicts: test/external_frame_buffer_test.cc vp9/common/vp9_alloccommon.c vp9/common/vp9_reconinter.c vp9/decoder/vp9_decodeframe.c vp9/encoder/vp9_onyx_if.c vp9/vp9_dx_iface.c vpx/vpx_decoder.h vpx/vpx_external_frame_buffer.h vpx_scale/generic/yv12config.c vpxdec.c Change-Id: I7434cf590f1c852b38569980e4247fad0d939c2e
Diffstat (limited to 'vp9/vp9_dx_iface.c')
-rw-r--r--vp9/vp9_dx_iface.c75
1 files changed, 3 insertions, 72 deletions
diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c
index a03f7befc..92c6cd20c 100644
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -59,13 +59,6 @@ struct vpx_codec_alg_priv {
int img_setup;
int img_avail;
int invert_tile_order;
- int fb_lru;
-
- /* External buffer info to save for VP9 common. */
- vpx_codec_frame_buffer_t *fb_list; // External frame buffers
- int fb_count; // Total number of frame buffers
- vpx_realloc_frame_buffer_cb_fn_t realloc_fb_cb;
- void *user_priv; // Private data associated with the external frame buffers.
};
static unsigned long priv_sz(const vpx_codec_dec_cfg_t *si,
@@ -298,32 +291,10 @@ static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx,
ctx->postproc_cfg.noise_level = 0;
}
- if (!optr) {
+ if (!optr)
res = VPX_CODEC_ERROR;
- } else {
- VP9D_COMP *const pbi = (VP9D_COMP*)optr;
- VP9_COMMON *const cm = &pbi->common;
- if (ctx->fb_list != NULL && ctx->realloc_fb_cb != NULL &&
- ctx->fb_count > 0) {
- cm->fb_list = ctx->fb_list;
- cm->fb_count = ctx->fb_count;
- cm->realloc_fb_cb = ctx->realloc_fb_cb;
- cm->user_priv = ctx->user_priv;
- } else {
- cm->fb_count = FRAME_BUFFERS;
- }
- cm->fb_lru = ctx->fb_lru;
- CHECK_MEM_ERROR(cm, cm->yv12_fb,
- vpx_calloc(cm->fb_count, sizeof(*cm->yv12_fb)));
- CHECK_MEM_ERROR(cm, cm->fb_idx_ref_cnt,
- vpx_calloc(cm->fb_count, sizeof(*cm->fb_idx_ref_cnt)));
- if (cm->fb_lru) {
- CHECK_MEM_ERROR(cm, cm->fb_idx_ref_lru,
- vpx_calloc(cm->fb_count,
- sizeof(*cm->fb_idx_ref_lru)));
- }
+ else
ctx->pbi = optr;
- }
}
ctx->decoder_init = 1;
@@ -481,28 +452,6 @@ static vpx_image_t *vp9_get_frame(vpx_codec_alg_priv_t *ctx,
return img;
}
-static vpx_codec_err_t vp9_set_frame_buffers(
- vpx_codec_alg_priv_t *ctx,
- vpx_codec_frame_buffer_t *fb_list, int fb_count,
- vpx_realloc_frame_buffer_cb_fn_t cb, void *user_priv) {
- if (fb_count < (VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS)) {
- /* The application must pass in at least VP9_MAXIMUM_REF_BUFFERS +
- * VPX_MAXIMUM_WORK_BUFFERS frame buffers. */
- return VPX_CODEC_INVALID_PARAM;
- } else if (!ctx->pbi) {
- /* If the decoder has already been initialized, do not accept external
- * frame buffers.
- */
- ctx->fb_list = fb_list;
- ctx->fb_count = fb_count;
- ctx->realloc_fb_cb = cb;
- ctx->user_priv = user_priv;
- return VPX_CODEC_OK;
- }
-
- return VPX_CODEC_ERROR;
-}
-
static vpx_codec_err_t vp9_xma_get_mmap(const vpx_codec_ctx_t *ctx,
vpx_codec_mmap_t *mmap,
vpx_codec_iter_t *iter) {
@@ -713,21 +662,6 @@ static vpx_codec_err_t set_invert_tile_order(vpx_codec_alg_priv_t *ctx,
return VPX_CODEC_OK;
}
-static vpx_codec_err_t set_frame_buffer_lru_cache(vpx_codec_alg_priv_t *ctx,
- int ctr_id,
- va_list args) {
- VP9D_COMP *const pbi = (VP9D_COMP*)ctx->pbi;
-
- // Save for later to pass into vp9 common.
- ctx->fb_lru = va_arg(args, int);
-
- if (pbi) {
- VP9_COMMON *const cm = &pbi->common;
- cm->fb_lru = ctx->fb_lru;
- }
- return VPX_CODEC_OK;
-}
-
static vpx_codec_ctrl_fn_map_t ctf_maps[] = {
{VP8_SET_REFERENCE, set_reference},
{VP8_COPY_REFERENCE, copy_reference},
@@ -741,7 +675,6 @@ static vpx_codec_ctrl_fn_map_t ctf_maps[] = {
{VP9_GET_REFERENCE, get_reference},
{VP9D_GET_DISPLAY_SIZE, get_display_size},
{VP9_INVERT_TILE_DECODE_ORDER, set_invert_tile_order},
- {VP9D_SET_FRAME_BUFFER_LRU_CACHE, set_frame_buffer_lru_cache},
{ -1, NULL},
};
@@ -752,8 +685,7 @@ static vpx_codec_ctrl_fn_map_t ctf_maps[] = {
CODEC_INTERFACE(vpx_codec_vp9_dx) = {
"WebM Project VP9 Decoder" VERSION_STRING,
VPX_CODEC_INTERNAL_ABI_VERSION,
- VPX_CODEC_CAP_DECODER | VP9_CAP_POSTPROC |
- VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER,
+ VPX_CODEC_CAP_DECODER | VP9_CAP_POSTPROC,
/* vpx_codec_caps_t caps; */
vp9_init, /* vpx_codec_init_fn_t init; */
vp9_destroy, /* vpx_codec_destroy_fn_t destroy; */
@@ -765,7 +697,6 @@ CODEC_INTERFACE(vpx_codec_vp9_dx) = {
vp9_get_si, /* vpx_codec_get_si_fn_t get_si; */
vp9_decode, /* vpx_codec_decode_fn_t decode; */
vp9_get_frame, /* vpx_codec_frame_get_fn_t frame_get; */
- vp9_set_frame_buffers, /* vpx_codec_set_frame_buffers_fn_t set_fb; */
},
{ // NOLINT
/* encoder functions */