| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 49 | 49 | 
| 50 | 50 | 
| 51 /*!\brief Current ABI version number | 51 /*!\brief Current ABI version number | 
| 52  * | 52  * | 
| 53  * \internal | 53  * \internal | 
| 54  * If this file is altered in any way that changes the ABI, this value | 54  * If this file is altered in any way that changes the ABI, this value | 
| 55  * must be bumped.  Examples include, but are not limited to, changing | 55  * must be bumped.  Examples include, but are not limited to, changing | 
| 56  * types, removing or reassigning enums, adding/removing/rearranging | 56  * types, removing or reassigning enums, adding/removing/rearranging | 
| 57  * fields to structures | 57  * fields to structures | 
| 58  */ | 58  */ | 
| 59 #define VPX_CODEC_INTERNAL_ABI_VERSION (4) /**<\hideinitializer*/ | 59 #define VPX_CODEC_INTERNAL_ABI_VERSION (5) /**<\hideinitializer*/ | 
| 60 | 60 | 
| 61 typedef struct vpx_codec_alg_priv  vpx_codec_alg_priv_t; | 61 typedef struct vpx_codec_alg_priv  vpx_codec_alg_priv_t; | 
| 62 typedef struct vpx_codec_priv_enc_mr_cfg vpx_codec_priv_enc_mr_cfg_t; | 62 typedef struct vpx_codec_priv_enc_mr_cfg vpx_codec_priv_enc_mr_cfg_t; | 
| 63 | 63 | 
| 64 /*!\brief init function pointer prototype | 64 /*!\brief init function pointer prototype | 
| 65  * | 65  * | 
| 66  * Performs algorithm-specific initialization of the decoder context. This | 66  * Performs algorithm-specific initialization of the decoder context. This | 
| 67  * function is called by the generic vpx_codec_init() wrapper function, so | 67  * function is called by the generic vpx_codec_init() wrapper function, so | 
| 68  * plugins implementing this interface may trust the input parameters to be | 68  * plugins implementing this interface may trust the input parameters to be | 
| 69  * properly initialized. | 69  * properly initialized. | 
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 208  * | 208  * | 
| 209  * \param[in]     ctx      Pointer to this instance's context | 209  * \param[in]     ctx      Pointer to this instance's context | 
| 210  * \param[in out] iter     Iterator storage, initialized to NULL | 210  * \param[in out] iter     Iterator storage, initialized to NULL | 
| 211  * | 211  * | 
| 212  * \return Returns a pointer to an image, if one is ready for display. Frames | 212  * \return Returns a pointer to an image, if one is ready for display. Frames | 
| 213  *         produced will always be in PTS (presentation time stamp) order. | 213  *         produced will always be in PTS (presentation time stamp) order. | 
| 214  */ | 214  */ | 
| 215 typedef vpx_image_t *(*vpx_codec_get_frame_fn_t)(vpx_codec_alg_priv_t *ctx, | 215 typedef vpx_image_t *(*vpx_codec_get_frame_fn_t)(vpx_codec_alg_priv_t *ctx, | 
| 216                                                  vpx_codec_iter_t     *iter); | 216                                                  vpx_codec_iter_t     *iter); | 
| 217 | 217 | 
|  | 218 /*!\brief Pass in external frame buffers for the decoder to use. | 
|  | 219  * | 
|  | 220  * Registers a given function to be called when the current frame to | 
|  | 221  * decode will be bigger than the external frame buffer size. This | 
|  | 222  * function must be called before the first call to decode or libvpx | 
|  | 223  * will assume the default behavior of allocating frame buffers internally. | 
|  | 224  * Frame buffers with a size of 0 are valid. | 
|  | 225  * | 
|  | 226  * \param[in] ctx          Pointer to this instance's context | 
|  | 227  * \param[in] fb_list      Pointer to array of frame buffers | 
|  | 228  * \param[in] fb_count     Number of elements in frame buffer array | 
|  | 229  * \param[in] cb           Pointer to the callback function | 
|  | 230  * \param[in] user_priv    User's private data | 
|  | 231  * | 
|  | 232  * \retval #VPX_CODEC_OK | 
|  | 233  *     External frame buffers will be used by libvpx. | 
|  | 234  * \retval #VPX_CODEC_INVALID_PARAM | 
|  | 235  *     fb_count was less than the value needed by the codec. | 
|  | 236  * \retval #VPX_CODEC_ERROR | 
|  | 237  *     Decoder context not initialized, or algorithm not capable of | 
|  | 238  *     using external frame buffers. | 
|  | 239  * | 
|  | 240  * \note | 
|  | 241  * When decoding VP9, the application must pass in at least 8 external | 
|  | 242  * frame buffers, as VP9 can have up to 8 reference frames. | 
|  | 243  */ | 
|  | 244 typedef vpx_codec_err_t (*vpx_codec_set_frame_buffers_fn_t)( | 
|  | 245     vpx_codec_alg_priv_t *ctx, | 
|  | 246     vpx_codec_frame_buffer_t *fb_list, int fb_count, | 
|  | 247     vpx_realloc_frame_buffer_cb_fn_t cb, void *user_priv); | 
| 218 | 248 | 
| 219 /*\brief eXternal Memory Allocation memory map get iterator | 249 /*\brief eXternal Memory Allocation memory map get iterator | 
| 220  * | 250  * | 
| 221  * Iterates over a list of the memory maps requested by the decoder. The | 251  * Iterates over a list of the memory maps requested by the decoder. The | 
| 222  * iterator storage should be initialized to NULL to start the iteration. | 252  * iterator storage should be initialized to NULL to start the iteration. | 
| 223  * Iteration is complete when this function returns NULL. | 253  * Iteration is complete when this function returns NULL. | 
| 224  * | 254  * | 
| 225  * \param[in out] iter     Iterator storage, initialized to NULL | 255  * \param[in out] iter     Iterator storage, initialized to NULL | 
| 226  * | 256  * | 
| 227  * \return Returns a pointer to an memory segment descriptor, or NULL to | 257  * \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... | 
| 298   vpx_codec_init_fn_t       init;    /**< \copydoc ::vpx_codec_init_fn_t */ | 328   vpx_codec_init_fn_t       init;    /**< \copydoc ::vpx_codec_init_fn_t */ | 
| 299   vpx_codec_destroy_fn_t    destroy;     /**< \copydoc ::vpx_codec_destroy_fn_t 
     */ | 329   vpx_codec_destroy_fn_t    destroy;     /**< \copydoc ::vpx_codec_destroy_fn_t 
     */ | 
| 300   vpx_codec_ctrl_fn_map_t  *ctrl_maps;   /**< \copydoc ::vpx_codec_ctrl_fn_map_t
      */ | 330   vpx_codec_ctrl_fn_map_t  *ctrl_maps;   /**< \copydoc ::vpx_codec_ctrl_fn_map_t
      */ | 
| 301   vpx_codec_get_mmap_fn_t   get_mmap;    /**< \copydoc ::vpx_codec_get_mmap_fn_t
      */ | 331   vpx_codec_get_mmap_fn_t   get_mmap;    /**< \copydoc ::vpx_codec_get_mmap_fn_t
      */ | 
| 302   vpx_codec_set_mmap_fn_t   set_mmap;    /**< \copydoc ::vpx_codec_set_mmap_fn_t
      */ | 332   vpx_codec_set_mmap_fn_t   set_mmap;    /**< \copydoc ::vpx_codec_set_mmap_fn_t
      */ | 
| 303   struct vpx_codec_dec_iface { | 333   struct vpx_codec_dec_iface { | 
| 304     vpx_codec_peek_si_fn_t    peek_si;     /**< \copydoc ::vpx_codec_peek_si_fn_
     t */ | 334     vpx_codec_peek_si_fn_t    peek_si;     /**< \copydoc ::vpx_codec_peek_si_fn_
     t */ | 
| 305     vpx_codec_get_si_fn_t     get_si;      /**< \copydoc ::vpx_codec_get_si_fn_t
      */ | 335     vpx_codec_get_si_fn_t     get_si;      /**< \copydoc ::vpx_codec_get_si_fn_t
      */ | 
| 306     vpx_codec_decode_fn_t     decode;      /**< \copydoc ::vpx_codec_decode_fn_t
      */ | 336     vpx_codec_decode_fn_t     decode;      /**< \copydoc ::vpx_codec_decode_fn_t
      */ | 
| 307     vpx_codec_get_frame_fn_t  get_frame;   /**< \copydoc ::vpx_codec_get_frame_f
     n_t */ | 337     vpx_codec_get_frame_fn_t  get_frame;   /**< \copydoc ::vpx_codec_get_frame_f
     n_t */ | 
|  | 338     vpx_codec_set_frame_buffers_fn_t set_fb; /**< \copydoc ::vpx_codec_set_frame
     _buffers_fn_t */ | 
| 308   } dec; | 339   } dec; | 
| 309   struct vpx_codec_enc_iface { | 340   struct vpx_codec_enc_iface { | 
| 310     vpx_codec_enc_cfg_map_t           *cfg_maps;      /**< \copydoc ::vpx_codec_
     enc_cfg_map_t */ | 341     vpx_codec_enc_cfg_map_t           *cfg_maps;      /**< \copydoc ::vpx_codec_
     enc_cfg_map_t */ | 
| 311     vpx_codec_encode_fn_t              encode;        /**< \copydoc ::vpx_codec_
     encode_fn_t */ | 342     vpx_codec_encode_fn_t              encode;        /**< \copydoc ::vpx_codec_
     encode_fn_t */ | 
| 312     vpx_codec_get_cx_data_fn_t         get_cx_data;   /**< \copydoc ::vpx_codec_
     get_cx_data_fn_t */ | 343     vpx_codec_get_cx_data_fn_t         get_cx_data;   /**< \copydoc ::vpx_codec_
     get_cx_data_fn_t */ | 
| 313     vpx_codec_enc_config_set_fn_t      cfg_set;       /**< \copydoc ::vpx_codec_
     enc_config_set_fn_t */ | 344     vpx_codec_enc_config_set_fn_t      cfg_set;       /**< \copydoc ::vpx_codec_
     enc_config_set_fn_t */ | 
| 314     vpx_codec_get_global_headers_fn_t  get_glob_hdrs; /**< \copydoc ::vpx_codec_
     get_global_headers_fn_t */ | 345     vpx_codec_get_global_headers_fn_t  get_glob_hdrs; /**< \copydoc ::vpx_codec_
     get_global_headers_fn_t */ | 
| 315     vpx_codec_get_preview_frame_fn_t   get_preview;   /**< \copydoc ::vpx_codec_
     get_preview_frame_fn_t */ | 346     vpx_codec_get_preview_frame_fn_t   get_preview;   /**< \copydoc ::vpx_codec_
     get_preview_frame_fn_t */ | 
| 316     vpx_codec_enc_mr_get_mem_loc_fn_t  mr_get_mem_loc;   /**< \copydoc ::vpx_cod
     ec_enc_mr_get_mem_loc_fn_t */ | 347     vpx_codec_enc_mr_get_mem_loc_fn_t  mr_get_mem_loc;   /**< \copydoc ::vpx_cod
     ec_enc_mr_get_mem_loc_fn_t */ | 
| 317   } enc; | 348   } enc; | 
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 494 // Frees mmap.base allocated by a call to vpx_mmap_alloc(). | 525 // Frees mmap.base allocated by a call to vpx_mmap_alloc(). | 
| 495 void vpx_mmap_dtor(vpx_codec_mmap_t *mmap); | 526 void vpx_mmap_dtor(vpx_codec_mmap_t *mmap); | 
| 496 | 527 | 
| 497 // Checks each mmap has the size requirement specificied by mem_reqs. | 528 // Checks each mmap has the size requirement specificied by mem_reqs. | 
| 498 // Returns #VPX_CODEC_OK on success, #VPX_CODEC_MEM_ERROR otherwise. | 529 // Returns #VPX_CODEC_OK on success, #VPX_CODEC_MEM_ERROR otherwise. | 
| 499 vpx_codec_err_t vpx_validate_mmaps(const vpx_codec_stream_info_t *si, | 530 vpx_codec_err_t vpx_validate_mmaps(const vpx_codec_stream_info_t *si, | 
| 500                                    const vpx_codec_mmap_t *mmaps, | 531                                    const vpx_codec_mmap_t *mmaps, | 
| 501                                    const mem_req_t *mem_reqs, int nreqs, | 532                                    const mem_req_t *mem_reqs, int nreqs, | 
| 502                                    vpx_codec_flags_t init_flags); | 533                                    vpx_codec_flags_t init_flags); | 
| 503 #endif | 534 #endif | 
| OLD | NEW | 
|---|