Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: source/libvpx/vpx/vpx_decoder.h

Issue 168343002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vpx/vpx_codec.mk ('k') | source/libvpx/vpx/vpx_encoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #ifndef VPX_VPX_DECODER_H_ 10 #ifndef VPX_VPX_DECODER_H_
(...skipping 12 matching lines...) Expand all
23 * 23 *
24 * This file describes the interface between an application and a 24 * This file describes the interface between an application and a
25 * video decoder algorithm. 25 * video decoder algorithm.
26 * 26 *
27 */ 27 */
28 #ifdef __cplusplus 28 #ifdef __cplusplus
29 extern "C" { 29 extern "C" {
30 #endif 30 #endif
31 31
32 #include "./vpx_codec.h" 32 #include "./vpx_codec.h"
33 #include "./vpx_frame_buffer.h"
33 34
34 /*!\brief Current ABI version number 35 /*!\brief Current ABI version number
35 * 36 *
36 * \internal 37 * \internal
37 * If this file is altered in any way that changes the ABI, this value 38 * If this file is altered in any way that changes the ABI, this value
38 * must be bumped. Examples include, but are not limited to, changing 39 * must be bumped. Examples include, but are not limited to, changing
39 * types, removing or reassigning enums, adding/removing/rearranging 40 * types, removing or reassigning enums, adding/removing/rearranging
40 * fields to structures 41 * fields to structures
41 */ 42 */
42 #define VPX_DECODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer */ 43 #define VPX_DECODER_ABI_VERSION (3 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer */
43 44
44 /*! \brief Decoder capabilities bitfield 45 /*! \brief Decoder capabilities bitfield
45 * 46 *
46 * Each decoder advertises the capabilities it supports as part of its 47 * Each decoder advertises the capabilities it supports as part of its
47 * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces 48 * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces
48 * or functionality, and are not required to be supported by a decoder. 49 * or functionality, and are not required to be supported by a decoder.
49 * 50 *
50 * The available flags are specified by VPX_CODEC_CAP_* defines. 51 * The available flags are specified by VPX_CODEC_CAP_* defines.
51 */ 52 */
52 #define VPX_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */ 53 #define VPX_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */
53 #define VPX_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */ 54 #define VPX_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */
54 #define VPX_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */ 55 #define VPX_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */
55 #define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000 /**< Can conceal errors due to 56 #define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000 /**< Can conceal errors due to
56 packet loss */ 57 packet loss */
57 #define VPX_CODEC_CAP_INPUT_FRAGMENTS 0x100000 /**< Can receive encoded frames 58 #define VPX_CODEC_CAP_INPUT_FRAGMENTS 0x100000 /**< Can receive encoded frames
58 one fragment at a time */ 59 one fragment at a time */
59 60
60 /*! \brief Initialization-time Feature Enabling 61 /*! \brief Initialization-time Feature Enabling
61 * 62 *
62 * Certain codec features must be known at initialization time, to allow for 63 * Certain codec features must be known at initialization time, to allow for
63 * proper memory allocation. 64 * proper memory allocation.
64 * 65 *
65 * The available flags are specified by VPX_CODEC_USE_* defines. 66 * The available flags are specified by VPX_CODEC_USE_* defines.
66 */ 67 */
67 #define VPX_CODEC_CAP_FRAME_THREADING 0x200000 /**< Can support frame-based 68 #define VPX_CODEC_CAP_FRAME_THREADING 0x200000 /**< Can support frame-based
68 multi-threading */ 69 multi-threading */
70 #define VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER 0x400000 /**< Can support external
71 frame buffers */
69 72
70 #define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */ 73 #define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */
71 #define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000 /**< Conceal errors in decoded 74 #define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000 /**< Conceal errors in decoded
72 frames */ 75 frames */
73 #define VPX_CODEC_USE_INPUT_FRAGMENTS 0x40000 /**< The input frame should be 76 #define VPX_CODEC_USE_INPUT_FRAGMENTS 0x40000 /**< The input frame should be
74 passed to the decoder one 77 passed to the decoder one
75 fragment at a time */ 78 fragment at a time */
76 #define VPX_CODEC_USE_FRAME_THREADING 0x80000 /**< Enable frame-based 79 #define VPX_CODEC_USE_FRAME_THREADING 0x80000 /**< Enable frame-based
77 multi-threading */ 80 multi-threading */
78 81
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 * Decoder context not initialized, or algorithm not capable of 322 * Decoder context not initialized, or algorithm not capable of
320 * posting slice completion. 323 * posting slice completion.
321 */ 324 */
322 vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *c tx, 325 vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *c tx,
323 vpx_codec_put_slice_cb_fn_t c b, 326 vpx_codec_put_slice_cb_fn_t c b,
324 void *u ser_priv); 327 void *u ser_priv);
325 328
326 329
327 /*!@} - end defgroup cap_put_slice*/ 330 /*!@} - end defgroup cap_put_slice*/
328 331
332 /*!\defgroup cap_external_frame_buffer External Frame Buffer Functions
333 *
334 * The following section is required to be implemented for all decoders
335 * that advertise the VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER capability.
336 * Calling this function for codecs that don't advertise this capability
337 * will result in an error code being returned, usually VPX_CODEC_ERROR.
338 *
339 * \note
340 * Currently this only works with VP9.
341 * @{
342 */
343
344 /*!\brief Pass in external frame buffers for the decoder to use.
345 *
346 * Registers functions to be called when libvpx needs a frame buffer
347 * to decode the current frame and a function to be called when libvpx does
348 * not internally reference the frame buffer. This set function must
349 * be called before the first call to decode or libvpx will assume the
350 * default behavior of allocating frame buffers internally.
351 *
352 * \param[in] ctx Pointer to this instance's context
353 * \param[in] cb_get Pointer to the get callback function
354 * \param[in] cb_release Pointer to the release callback function
355 * \param[in] cb_priv Callback's private data
356 *
357 * \retval #VPX_CODEC_OK
358 * External frame buffers will be used by libvpx.
359 * \retval #VPX_CODEC_INVALID_PARAM
360 * One or more of the callbacks were NULL.
361 * \retval #VPX_CODEC_ERROR
362 * Decoder context not initialized, or algorithm not capable of
363 * using external frame buffers.
364 *
365 * \note
366 * When decoding VP9, the application may be required to pass in at least
367 * #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS external frame
368 * buffers.
369 */
370 vpx_codec_err_t vpx_codec_set_frame_buffer_functions(
371 vpx_codec_ctx_t *ctx,
372 vpx_get_frame_buffer_cb_fn_t cb_get,
373 vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv);
374
375 /*!@} - end defgroup cap_external_frame_buffer */
376
329 /*!@} - end defgroup decoder*/ 377 /*!@} - end defgroup decoder*/
330 #ifdef __cplusplus 378 #ifdef __cplusplus
331 } 379 }
332 #endif 380 #endif
333 #endif // VPX_VPX_DECODER_H_ 381 #endif // VPX_VPX_DECODER_H_
334 382
OLDNEW
« no previous file with comments | « source/libvpx/vpx/vpx_codec.mk ('k') | source/libvpx/vpx/vpx_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698