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

Side by Side Diff: source/libvpx/vpx/internal/vpx_codec_internal.h

Issue 341293003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 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/exports_enc ('k') | source/libvpx/vpx/src/svc_encodeframe.c » ('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 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 * in the algorithm's control mapping table, and the data parameter may be NULL. 147 * in the algorithm's control mapping table, and the data parameter may be NULL.
148 * 148 *
149 * 149 *
150 * \param[in] ctx Pointer to this instance's context 150 * \param[in] ctx Pointer to this instance's context
151 * \param[in] ctrl_id Algorithm specific control identifier 151 * \param[in] ctrl_id Algorithm specific control identifier
152 * \param[in,out] data Data to exchange with algorithm instance. 152 * \param[in,out] data Data to exchange with algorithm instance.
153 * 153 *
154 * \retval #VPX_CODEC_OK 154 * \retval #VPX_CODEC_OK
155 * The internal state data was deserialized. 155 * The internal state data was deserialized.
156 */ 156 */
157 typedef vpx_codec_err_t (*vpx_codec_control_fn_t)(vpx_codec_alg_priv_t *ctx, 157 typedef vpx_codec_err_t (*vpx_codec_control_fn_t)(vpx_codec_alg_priv_t *ctx,
158 int ctrl_id, 158 va_list ap);
159 va_list ap);
160 159
161 /*!\brief control function pointer mapping 160 /*!\brief control function pointer mapping
162 * 161 *
163 * This structure stores the mapping between control identifiers and 162 * This structure stores the mapping between control identifiers and
164 * implementing functions. Each algorithm provides a list of these 163 * implementing functions. Each algorithm provides a list of these
165 * mappings. This list is searched by the vpx_codec_control() wrapper 164 * mappings. This list is searched by the vpx_codec_control() wrapper
166 * function to determine which function to invoke. The special 165 * function to determine which function to invoke. The special
167 * value {0, NULL} is used to indicate end-of-list, and must be 166 * value {0, NULL} is used to indicate end-of-list, and must be
168 * present. The special value {0, <non-null>} can be used as a catch-all 167 * present. The special value {0, <non-null>} can be used as a catch-all
169 * mapping. This implies that ctrl_id values chosen by the algorithm 168 * mapping. This implies that ctrl_id values chosen by the algorithm
170 * \ref MUST be non-zero. 169 * \ref MUST be non-zero.
171 */ 170 */
172 typedef const struct vpx_codec_ctrl_fn_map { 171 typedef const struct vpx_codec_ctrl_fn_map {
173 int ctrl_id; 172 int ctrl_id;
174 vpx_codec_control_fn_t fn; 173 vpx_codec_control_fn_t fn;
175 } vpx_codec_ctrl_fn_map_t; 174 } vpx_codec_ctrl_fn_map_t;
176 175
177 /*!\brief decode data function pointer prototype 176 /*!\brief decode data function pointer prototype
178 * 177 *
179 * Processes a buffer of coded data. If the processing results in a new 178 * Processes a buffer of coded data. If the processing results in a new
180 * decoded frame becoming available, #VPX_CODEC_CB_PUT_SLICE and 179 * decoded frame becoming available, #VPX_CODEC_CB_PUT_SLICE and
181 * #VPX_CODEC_CB_PUT_FRAME events are generated as appropriate. This 180 * #VPX_CODEC_CB_PUT_FRAME events are generated as appropriate. This
182 * function is called by the generic vpx_codec_decode() wrapper function, 181 * function is called by the generic vpx_codec_decode() wrapper function,
183 * so plugins implementing this interface may trust the input parameters 182 * so plugins implementing this interface may trust the input parameters
184 * to be properly initialized. 183 * to be properly initialized.
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 { 395 {
397 unsigned int mr_total_resolutions; 396 unsigned int mr_total_resolutions;
398 unsigned int mr_encoder_id; 397 unsigned int mr_encoder_id;
399 struct vpx_rational mr_down_sampling_factor; 398 struct vpx_rational mr_down_sampling_factor;
400 void* mr_low_res_mode_info; 399 void* mr_low_res_mode_info;
401 }; 400 };
402 401
403 #undef VPX_CTRL_USE_TYPE 402 #undef VPX_CTRL_USE_TYPE
404 #define VPX_CTRL_USE_TYPE(id, typ) \ 403 #define VPX_CTRL_USE_TYPE(id, typ) \
405 static typ id##__value(va_list args) {return va_arg(args, typ);} \ 404 static typ id##__value(va_list args) {return va_arg(args, typ);} \
406 static typ id##__convert(void *x)\
407 {\
408 union\
409 {\
410 void *x;\
411 typ d;\
412 } u;\
413 u.x = x;\
414 return u.d;\
415 }
416
417 405
418 #undef VPX_CTRL_USE_TYPE_DEPRECATED 406 #undef VPX_CTRL_USE_TYPE_DEPRECATED
419 #define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \ 407 #define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
420 static typ id##__value(va_list args) {return va_arg(args, typ);} \ 408 static typ id##__value(va_list args) {return va_arg(args, typ);} \
421 static typ id##__convert(void *x)\
422 {\
423 union\
424 {\
425 void *x;\
426 typ d;\
427 } u;\
428 u.x = x;\
429 return u.d;\
430 }
431 409
432 #define CAST(id, arg) id##__value(arg) 410 #define CAST(id, arg) id##__value(arg)
433 #define RECAST(id, x) id##__convert(x)
434
435 411
436 /* CODEC_INTERFACE convenience macro 412 /* CODEC_INTERFACE convenience macro
437 * 413 *
438 * By convention, each codec interface is a struct with extern linkage, where 414 * By convention, each codec interface is a struct with extern linkage, where
439 * the symbol is suffixed with _algo. A getter function is also defined to 415 * the symbol is suffixed with _algo. A getter function is also defined to
440 * return a pointer to the struct, since in some cases it's easier to work 416 * return a pointer to the struct, since in some cases it's easier to work
441 * with text symbols than data symbols (see issue #169). This function has 417 * with text symbols than data symbols (see issue #169). This function has
442 * the same name as the struct, less the _algo suffix. The CODEC_INTERFACE 418 * the same name as the struct, less the _algo suffix. The CODEC_INTERFACE
443 * macro is provided to define this getter function automatically. 419 * macro is provided to define this getter function automatically.
444 */ 420 */
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // Returns #VPX_CODEC_OK on success, #VPX_CODEC_MEM_ERROR otherwise. 509 // Returns #VPX_CODEC_OK on success, #VPX_CODEC_MEM_ERROR otherwise.
534 vpx_codec_err_t vpx_validate_mmaps(const vpx_codec_stream_info_t *si, 510 vpx_codec_err_t vpx_validate_mmaps(const vpx_codec_stream_info_t *si,
535 const vpx_codec_mmap_t *mmaps, 511 const vpx_codec_mmap_t *mmaps,
536 const mem_req_t *mem_reqs, int nreqs, 512 const mem_req_t *mem_reqs, int nreqs,
537 vpx_codec_flags_t init_flags); 513 vpx_codec_flags_t init_flags);
538 #ifdef __cplusplus 514 #ifdef __cplusplus
539 } // extern "C" 515 } // extern "C"
540 #endif 516 #endif
541 517
542 #endif // VPX_INTERNAL_VPX_CODEC_INTERNAL_H_ 518 #endif // VPX_INTERNAL_VPX_CODEC_INTERNAL_H_
OLDNEW
« no previous file with comments | « source/libvpx/vpx/exports_enc ('k') | source/libvpx/vpx/src/svc_encodeframe.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698