summaryrefslogtreecommitdiff
path: root/vpx
diff options
context:
space:
mode:
Diffstat (limited to 'vpx')
-rw-r--r--vpx/exports_dec1
-rw-r--r--vpx/internal/vpx_codec_internal.h34
-rw-r--r--vpx/src/vpx_decoder.c19
-rw-r--r--vpx/vp8dx.h8
-rw-r--r--vpx/vpx_codec.mk2
-rw-r--r--vpx/vpx_decoder.h49
-rw-r--r--vpx/vpx_external_frame_buffer.h61
7 files changed, 2 insertions, 172 deletions
diff --git a/vpx/exports_dec b/vpx/exports_dec
index d058c9bdb..ed121f7ec 100644
--- a/vpx/exports_dec
+++ b/vpx/exports_dec
@@ -7,4 +7,3 @@ text vpx_codec_peek_stream_info
text vpx_codec_register_put_frame_cb
text vpx_codec_register_put_slice_cb
text vpx_codec_set_mem_map
-text vpx_codec_set_frame_buffers
diff --git a/vpx/internal/vpx_codec_internal.h b/vpx/internal/vpx_codec_internal.h
index 9f9da5c28..0f42a1d20 100644
--- a/vpx/internal/vpx_codec_internal.h
+++ b/vpx/internal/vpx_codec_internal.h
@@ -59,7 +59,7 @@ extern "C" {
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
-#define VPX_CODEC_INTERNAL_ABI_VERSION (5) /**<\hideinitializer*/
+#define VPX_CODEC_INTERNAL_ABI_VERSION (4) /**<\hideinitializer*/
typedef struct vpx_codec_alg_priv vpx_codec_alg_priv_t;
typedef struct vpx_codec_priv_enc_mr_cfg vpx_codec_priv_enc_mr_cfg_t;
@@ -218,37 +218,6 @@ typedef vpx_codec_err_t (*vpx_codec_decode_fn_t)(vpx_codec_alg_priv_t *ctx,
typedef vpx_image_t *(*vpx_codec_get_frame_fn_t)(vpx_codec_alg_priv_t *ctx,
vpx_codec_iter_t *iter);
-/*!\brief Pass in external frame buffers for the decoder to use.
- *
- * Registers a given function to be called when the current frame to
- * decode will be bigger than the external frame buffer size. This
- * function must be called before the first call to decode or libvpx
- * will assume the default behavior of allocating frame buffers internally.
- * Frame buffers with a size of 0 are valid.
- *
- * \param[in] ctx Pointer to this instance's context
- * \param[in] fb_list Pointer to array of frame buffers
- * \param[in] fb_count Number of elements in frame buffer array
- * \param[in] cb Pointer to the callback function
- * \param[in] user_priv User's private data
- *
- * \retval #VPX_CODEC_OK
- * External frame buffers will be used by libvpx.
- * \retval #VPX_CODEC_INVALID_PARAM
- * fb_count was less than the value needed by the codec.
- * \retval #VPX_CODEC_ERROR
- * Decoder context not initialized, or algorithm not capable of
- * using external frame buffers.
- *
- * \note
- * When decoding VP9, the application must pass in at least
- * #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS external frame
- * buffers.
- */
-typedef vpx_codec_err_t (*vpx_codec_set_frame_buffers_fn_t)(
- 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);
/*\brief eXternal Memory Allocation memory map get iterator
*
@@ -339,7 +308,6 @@ struct vpx_codec_iface {
vpx_codec_get_si_fn_t get_si; /**< \copydoc ::vpx_codec_get_si_fn_t */
vpx_codec_decode_fn_t decode; /**< \copydoc ::vpx_codec_decode_fn_t */
vpx_codec_get_frame_fn_t get_frame; /**< \copydoc ::vpx_codec_get_frame_fn_t */
- vpx_codec_set_frame_buffers_fn_t set_fb; /**< \copydoc ::vpx_codec_set_frame_buffers_fn_t */
} dec;
struct vpx_codec_enc_iface {
vpx_codec_enc_cfg_map_t *cfg_maps; /**< \copydoc ::vpx_codec_enc_cfg_map_t */
diff --git a/vpx/src/vpx_decoder.c b/vpx/src/vpx_decoder.c
index 39fd217ea..a99e48f88 100644
--- a/vpx/src/vpx_decoder.c
+++ b/vpx/src/vpx_decoder.c
@@ -226,22 +226,3 @@ vpx_codec_err_t vpx_codec_set_mem_map(vpx_codec_ctx_t *ctx,
return SAVE_STATUS(ctx, res);
}
-
-vpx_codec_err_t vpx_codec_set_frame_buffers(
- vpx_codec_ctx_t *ctx,
- vpx_codec_frame_buffer_t *fb_list, int fb_count,
- vpx_realloc_frame_buffer_cb_fn_t cb, void *user_priv) {
- vpx_codec_err_t res;
-
- if (!ctx || !fb_list || fb_count <= 0 || !cb) {
- res = VPX_CODEC_INVALID_PARAM;
- } else if (!ctx->iface || !ctx->priv ||
- !(ctx->iface->caps & VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) {
- res = VPX_CODEC_ERROR;
- } else {
- res = ctx->iface->dec.set_fb(ctx->priv->alg_priv, fb_list, fb_count,
- cb, user_priv);
- }
-
- return SAVE_STATUS(ctx, res);
-}
diff --git a/vpx/vp8dx.h b/vpx/vp8dx.h
index e89c0bcb1..bde77c24d 100644
--- a/vpx/vp8dx.h
+++ b/vpx/vp8dx.h
@@ -77,13 +77,6 @@ enum vp8_dec_control_id {
/** For testing. */
VP9_INVERT_TILE_DECODE_ORDER,
- /** control function to set the vp9 decoder into using the least recently
- * used frame buffer when a new buffer is requested. Takes an int and if
- * the value is zero will turn off using lru cache. The value of zero is
- * the default. If the value is anything besides zero, then that will turn
- * on lru cache.*/
- VP9D_SET_FRAME_BUFFER_LRU_CACHE,
-
VP8_DECODER_CTRL_ID_MAX
};
@@ -115,7 +108,6 @@ VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED, int *)
VPX_CTRL_USE_TYPE(VP8D_SET_DECRYPTOR, vp8_decrypt_init *)
VPX_CTRL_USE_TYPE(VP9D_GET_DISPLAY_SIZE, int *)
VPX_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int)
-VPX_CTRL_USE_TYPE(VP9D_SET_FRAME_BUFFER_LRU_CACHE, int)
/*! @} - end defgroup vp8_decoder */
diff --git a/vpx/vpx_codec.mk b/vpx/vpx_codec.mk
index df3ff6ef1..549c24908 100644
--- a/vpx/vpx_codec.mk
+++ b/vpx/vpx_codec.mk
@@ -27,7 +27,6 @@ API_DOC_SRCS-yes += vpx_codec.h
API_DOC_SRCS-yes += vpx_decoder.h
API_DOC_SRCS-yes += vpx_encoder.h
API_DOC_SRCS-yes += vpx_image.h
-API_DOC_SRCS-yes += vpx_external_frame_buffer.h
API_SRCS-yes += src/vpx_decoder.c
API_SRCS-yes += vpx_decoder.h
@@ -39,5 +38,4 @@ API_SRCS-yes += src/vpx_image.c
API_SRCS-yes += vpx_codec.h
API_SRCS-yes += vpx_codec.mk
API_SRCS-yes += vpx_image.h
-API_SRCS-yes += vpx_external_frame_buffer.h
API_SRCS-$(BUILD_LIBVPX) += vpx_integer.h
diff --git a/vpx/vpx_decoder.h b/vpx/vpx_decoder.h
index 24be82d76..7356baea3 100644
--- a/vpx/vpx_decoder.h
+++ b/vpx/vpx_decoder.h
@@ -30,7 +30,6 @@ extern "C" {
#endif
#include "./vpx_codec.h"
-#include "./vpx_external_frame_buffer.h"
/*!\brief Current ABI version number
*
@@ -40,7 +39,7 @@ extern "C" {
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
-#define VPX_DECODER_ABI_VERSION (3 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/
+#define VPX_DECODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/
/*! \brief Decoder capabilities bitfield
*
@@ -67,8 +66,6 @@ extern "C" {
*/
#define VPX_CODEC_CAP_FRAME_THREADING 0x200000 /**< Can support frame-based
multi-threading */
-#define VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER 0x400000 /**< Can support external
- frame buffers */
#define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */
#define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000 /**< Conceal errors in decoded
@@ -329,50 +326,6 @@ extern "C" {
/*!@} - end defgroup cap_put_slice*/
- /*!\defgroup cap_external_frame_buffer External Frame Buffer Functions
- *
- * The following section is required to be implemented for all decoders
- * that advertise the VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER capability.
- * Calling this function for codecs that don't advertise this capability
- * will result in an error code being returned, usually VPX_CODEC_ERROR.
- *
- * \note
- * Currently this only works with VP9.
- * @{
- */
-
- /*!\brief Pass in external frame buffers for the decoder to use.
- *
- * Registers a given function to be called when the current frame to
- * decode will be bigger than the external frame buffer size. This
- * function must be called before the first call to decode or libvpx
- * will assume the default behavior of allocating frame buffers internally.
- * Frame buffers with a size of 0 are valid.
- *
- * \param[in] ctx Pointer to this instance's context
- * \param[in] fb_list Pointer to array of frame buffers
- * \param[in] fb_count Number of elements in frame buffer array
- * \param[in] cb Pointer to the callback function
- * \param[in] user_priv User's private data
- *
- * \retval #VPX_CODEC_OK
- * External frame buffers passed into the decoder.
- * \retval #VPX_CODEC_ERROR
- * Decoder context not initialized, or algorithm not capable of
- * using external frame buffers.
- *
- * \note
- * When decoding VP9, the application must pass in at least
- * #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS external frame
- * buffers.
- */
- vpx_codec_err_t vpx_codec_set_frame_buffers(
- vpx_codec_ctx_t *ctx,
- vpx_codec_frame_buffer_t *fb_list, int fb_count,
- vpx_realloc_frame_buffer_cb_fn_t cb, void *user_priv);
-
- /*!@} - end defgroup cap_external_frame_buffer */
-
/*!@} - end defgroup decoder*/
#ifdef __cplusplus
}
diff --git a/vpx/vpx_external_frame_buffer.h b/vpx/vpx_external_frame_buffer.h
deleted file mode 100644
index 98ce5fdfe..000000000
--- a/vpx/vpx_external_frame_buffer.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef VPX_VPX_EXTERNAL_FRAME_BUFFER_H_
-#define VPX_VPX_EXTERNAL_FRAME_BUFFER_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "./vpx_integer.h"
-
-/*!\brief The maximum number of work buffers used by libvpx.
- */
-#define VPX_MAXIMUM_WORK_BUFFERS 1
-
-/*!\brief The maximum number of reference buffers that a VP9 encoder may use.
- */
-#define VP9_MAXIMUM_REF_BUFFERS 8
-
-/*!\brief External frame buffer
- *
- * This structure is used to hold external frame buffers passed into the
- * decoder by the application.
- */
-typedef struct vpx_codec_frame_buffer {
- uint8_t *data; /**< Pointer to the data buffer */
- size_t size; /**< Size of data in bytes */
- void *frame_priv; /**< Frame's private data */
-} vpx_codec_frame_buffer_t;
-
-/*!\brief realloc frame buffer callback prototype
- *
- * This callback is invoked by the decoder to notify the application one
- * of the external frame buffers must increase in size, in order for the
- * decode call to complete. The callback must allocate at least new_size in
- * bytes and assign it to fb->data. Then the callback must set fb->size to
- * the allocated size. The application does not need to align the allocated
- * data. The callback is usually triggered by a frame size change. On success
- * the callback must return 0. Any failure the callback must return a value
- * less than 0.
- *
- * \param[in] user_priv User's private data
- * \param[in] new_size Size in bytes needed by the buffer.
- * \param[in/out] fb Pointer to frame buffer to increase size.
- */
-typedef int (*vpx_realloc_frame_buffer_cb_fn_t)(
- void *user_priv, size_t new_size, vpx_codec_frame_buffer_t *fb);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // VPX_VPX_EXTERNAL_FRAME_BUFFER_H_