OLD | NEW |
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 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #endif | 52 #endif |
53 | 53 |
54 /*!\brief Current ABI version number | 54 /*!\brief Current ABI version number |
55 * | 55 * |
56 * \internal | 56 * \internal |
57 * If this file is altered in any way that changes the ABI, this value | 57 * If this file is altered in any way that changes the ABI, this value |
58 * must be bumped. Examples include, but are not limited to, changing | 58 * must be bumped. Examples include, but are not limited to, changing |
59 * types, removing or reassigning enums, adding/removing/rearranging | 59 * types, removing or reassigning enums, adding/removing/rearranging |
60 * fields to structures | 60 * fields to structures |
61 */ | 61 */ |
62 #define VPX_CODEC_INTERNAL_ABI_VERSION (4) /**<\hideinitializer*/ | 62 #define VPX_CODEC_INTERNAL_ABI_VERSION (5) /**<\hideinitializer*/ |
63 | 63 |
64 typedef struct vpx_codec_alg_priv vpx_codec_alg_priv_t; | 64 typedef struct vpx_codec_alg_priv vpx_codec_alg_priv_t; |
65 typedef struct vpx_codec_priv_enc_mr_cfg vpx_codec_priv_enc_mr_cfg_t; | 65 typedef struct vpx_codec_priv_enc_mr_cfg vpx_codec_priv_enc_mr_cfg_t; |
66 | 66 |
67 /*!\brief init function pointer prototype | 67 /*!\brief init function pointer prototype |
68 * | 68 * |
69 * Performs algorithm-specific initialization of the decoder context. This | 69 * Performs algorithm-specific initialization of the decoder context. This |
70 * function is called by the generic vpx_codec_init() wrapper function, so | 70 * function is called by the generic vpx_codec_init() wrapper function, so |
71 * plugins implementing this interface may trust the input parameters to be | 71 * plugins implementing this interface may trust the input parameters to be |
72 * properly initialized. | 72 * properly initialized. |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 * | 211 * |
212 * \param[in] ctx Pointer to this instance's context | 212 * \param[in] ctx Pointer to this instance's context |
213 * \param[in out] iter Iterator storage, initialized to NULL | 213 * \param[in out] iter Iterator storage, initialized to NULL |
214 * | 214 * |
215 * \return Returns a pointer to an image, if one is ready for display. Frames | 215 * \return Returns a pointer to an image, if one is ready for display. Frames |
216 * produced will always be in PTS (presentation time stamp) order. | 216 * produced will always be in PTS (presentation time stamp) order. |
217 */ | 217 */ |
218 typedef vpx_image_t *(*vpx_codec_get_frame_fn_t)(vpx_codec_alg_priv_t *ctx, | 218 typedef vpx_image_t *(*vpx_codec_get_frame_fn_t)(vpx_codec_alg_priv_t *ctx, |
219 vpx_codec_iter_t *iter); | 219 vpx_codec_iter_t *iter); |
220 | 220 |
| 221 /*!\brief Pass in external frame buffers for the decoder to use. |
| 222 * |
| 223 * Registers functions to be called when libvpx needs a frame buffer |
| 224 * to decode the current frame and a function to be called when libvpx does |
| 225 * not internally reference the frame buffer. This set function must |
| 226 * be called before the first call to decode or libvpx will assume the |
| 227 * default behavior of allocating frame buffers internally. |
| 228 * |
| 229 * \param[in] ctx Pointer to this instance's context |
| 230 * \param[in] cb_get Pointer to the get callback function |
| 231 * \param[in] cb_release Pointer to the release callback function |
| 232 * \param[in] cb_priv Callback's private data |
| 233 * |
| 234 * \retval #VPX_CODEC_OK |
| 235 * External frame buffers will be used by libvpx. |
| 236 * \retval #VPX_CODEC_INVALID_PARAM |
| 237 * One or more of the callbacks were NULL. |
| 238 * \retval #VPX_CODEC_ERROR |
| 239 * Decoder context not initialized, or algorithm not capable of |
| 240 * using external frame buffers. |
| 241 * |
| 242 * \note |
| 243 * When decoding VP9, the application may be required to pass in at least |
| 244 * #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS external frame |
| 245 * buffers. |
| 246 */ |
| 247 typedef vpx_codec_err_t (*vpx_codec_set_fb_fn_t)( |
| 248 vpx_codec_alg_priv_t *ctx, |
| 249 vpx_get_frame_buffer_cb_fn_t cb_get, |
| 250 vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv); |
221 | 251 |
222 /*\brief eXternal Memory Allocation memory map get iterator | 252 /*\brief eXternal Memory Allocation memory map get iterator |
223 * | 253 * |
224 * Iterates over a list of the memory maps requested by the decoder. The | 254 * Iterates over a list of the memory maps requested by the decoder. The |
225 * iterator storage should be initialized to NULL to start the iteration. | 255 * iterator storage should be initialized to NULL to start the iteration. |
226 * Iteration is complete when this function returns NULL. | 256 * Iteration is complete when this function returns NULL. |
227 * | 257 * |
228 * \param[in out] iter Iterator storage, initialized to NULL | 258 * \param[in out] iter Iterator storage, initialized to NULL |
229 * | 259 * |
230 * \return Returns a pointer to an memory segment descriptor, or NULL to | 260 * \return Returns a pointer to an memory segment descriptor, or NULL to |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 vpx_codec_init_fn_t init; /**< \copydoc ::vpx_codec_init_fn_t */ | 331 vpx_codec_init_fn_t init; /**< \copydoc ::vpx_codec_init_fn_t */ |
302 vpx_codec_destroy_fn_t destroy; /**< \copydoc ::vpx_codec_destroy_fn_t
*/ | 332 vpx_codec_destroy_fn_t destroy; /**< \copydoc ::vpx_codec_destroy_fn_t
*/ |
303 vpx_codec_ctrl_fn_map_t *ctrl_maps; /**< \copydoc ::vpx_codec_ctrl_fn_map_t
*/ | 333 vpx_codec_ctrl_fn_map_t *ctrl_maps; /**< \copydoc ::vpx_codec_ctrl_fn_map_t
*/ |
304 vpx_codec_get_mmap_fn_t get_mmap; /**< \copydoc ::vpx_codec_get_mmap_fn_t
*/ | 334 vpx_codec_get_mmap_fn_t get_mmap; /**< \copydoc ::vpx_codec_get_mmap_fn_t
*/ |
305 vpx_codec_set_mmap_fn_t set_mmap; /**< \copydoc ::vpx_codec_set_mmap_fn_t
*/ | 335 vpx_codec_set_mmap_fn_t set_mmap; /**< \copydoc ::vpx_codec_set_mmap_fn_t
*/ |
306 struct vpx_codec_dec_iface { | 336 struct vpx_codec_dec_iface { |
307 vpx_codec_peek_si_fn_t peek_si; /**< \copydoc ::vpx_codec_peek_si_fn_
t */ | 337 vpx_codec_peek_si_fn_t peek_si; /**< \copydoc ::vpx_codec_peek_si_fn_
t */ |
308 vpx_codec_get_si_fn_t get_si; /**< \copydoc ::vpx_codec_get_si_fn_t
*/ | 338 vpx_codec_get_si_fn_t get_si; /**< \copydoc ::vpx_codec_get_si_fn_t
*/ |
309 vpx_codec_decode_fn_t decode; /**< \copydoc ::vpx_codec_decode_fn_t
*/ | 339 vpx_codec_decode_fn_t decode; /**< \copydoc ::vpx_codec_decode_fn_t
*/ |
310 vpx_codec_get_frame_fn_t get_frame; /**< \copydoc ::vpx_codec_get_frame_f
n_t */ | 340 vpx_codec_get_frame_fn_t get_frame; /**< \copydoc ::vpx_codec_get_frame_f
n_t */ |
| 341 vpx_codec_set_fb_fn_t set_fb_fn; /**< \copydoc ::vpx_codec_set_fb_fn_t
*/ |
311 } dec; | 342 } dec; |
312 struct vpx_codec_enc_iface { | 343 struct vpx_codec_enc_iface { |
313 vpx_codec_enc_cfg_map_t *cfg_maps; /**< \copydoc ::vpx_codec_
enc_cfg_map_t */ | 344 vpx_codec_enc_cfg_map_t *cfg_maps; /**< \copydoc ::vpx_codec_
enc_cfg_map_t */ |
314 vpx_codec_encode_fn_t encode; /**< \copydoc ::vpx_codec_
encode_fn_t */ | 345 vpx_codec_encode_fn_t encode; /**< \copydoc ::vpx_codec_
encode_fn_t */ |
315 vpx_codec_get_cx_data_fn_t get_cx_data; /**< \copydoc ::vpx_codec_
get_cx_data_fn_t */ | 346 vpx_codec_get_cx_data_fn_t get_cx_data; /**< \copydoc ::vpx_codec_
get_cx_data_fn_t */ |
316 vpx_codec_enc_config_set_fn_t cfg_set; /**< \copydoc ::vpx_codec_
enc_config_set_fn_t */ | 347 vpx_codec_enc_config_set_fn_t cfg_set; /**< \copydoc ::vpx_codec_
enc_config_set_fn_t */ |
317 vpx_codec_get_global_headers_fn_t get_glob_hdrs; /**< \copydoc ::vpx_codec_
get_global_headers_fn_t */ | 348 vpx_codec_get_global_headers_fn_t get_glob_hdrs; /**< \copydoc ::vpx_codec_
get_global_headers_fn_t */ |
318 vpx_codec_get_preview_frame_fn_t get_preview; /**< \copydoc ::vpx_codec_
get_preview_frame_fn_t */ | 349 vpx_codec_get_preview_frame_fn_t get_preview; /**< \copydoc ::vpx_codec_
get_preview_frame_fn_t */ |
319 vpx_codec_enc_mr_get_mem_loc_fn_t mr_get_mem_loc; /**< \copydoc ::vpx_cod
ec_enc_mr_get_mem_loc_fn_t */ | 350 vpx_codec_enc_mr_get_mem_loc_fn_t mr_get_mem_loc; /**< \copydoc ::vpx_cod
ec_enc_mr_get_mem_loc_fn_t */ |
320 } enc; | 351 } enc; |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 // Returns #VPX_CODEC_OK on success, #VPX_CODEC_MEM_ERROR otherwise. | 533 // Returns #VPX_CODEC_OK on success, #VPX_CODEC_MEM_ERROR otherwise. |
503 vpx_codec_err_t vpx_validate_mmaps(const vpx_codec_stream_info_t *si, | 534 vpx_codec_err_t vpx_validate_mmaps(const vpx_codec_stream_info_t *si, |
504 const vpx_codec_mmap_t *mmaps, | 535 const vpx_codec_mmap_t *mmaps, |
505 const mem_req_t *mem_reqs, int nreqs, | 536 const mem_req_t *mem_reqs, int nreqs, |
506 vpx_codec_flags_t init_flags); | 537 vpx_codec_flags_t init_flags); |
507 #ifdef __cplusplus | 538 #ifdef __cplusplus |
508 } // extern "C" | 539 } // extern "C" |
509 #endif | 540 #endif |
510 | 541 |
511 #endif // VPX_INTERNAL_VPX_CODEC_INTERNAL_H_ | 542 #endif // VPX_INTERNAL_VPX_CODEC_INTERNAL_H_ |
OLD | NEW |