| OLD | NEW |
| 1 /*!\page usage Usage | 1 /*!\page usage Usage |
| 2 | 2 |
| 3 The vpx multi-format codec SDK provides a unified interface amongst its | 3 The vpx multi-format codec SDK provides a unified interface amongst its |
| 4 supported codecs. This abstraction allows applications using this SDK to | 4 supported codecs. This abstraction allows applications using this SDK to |
| 5 easily support multiple video formats with minimal code duplication or | 5 easily support multiple video formats with minimal code duplication or |
| 6 "special casing." This section describes the interface common to all codecs. | 6 "special casing." This section describes the interface common to all codecs. |
| 7 For codec-specific details, see the \ref codecs page. | 7 For codec-specific details, see the \ref codecs page. |
| 8 | 8 |
| 9 The following sections are common to all codecs: | 9 The following sections are common to all codecs: |
| 10 - \ref usage_types | 10 - \ref usage_types |
| 11 - \ref usage_features | 11 - \ref usage_features |
| 12 - \ref usage_init | 12 - \ref usage_init |
| 13 - \ref usage_errors | 13 - \ref usage_errors |
| 14 | 14 |
| 15 Fore more information on decoder and encoder specific usage, see the | 15 For more information on decoder and encoder specific usage, see the |
| 16 following pages: | 16 following pages: |
| 17 \if decoder | 17 \if decoder |
| 18 - \subpage usage_decode | 18 \li \subpage usage_decode |
| 19 \endif | 19 \endif |
| 20 \if decoder | 20 \if encoder |
| 21 - \subpage usage_encode | 21 \li \subpage usage_encode |
| 22 \endif | 22 \endif |
| 23 | 23 |
| 24 \section usage_types Important Data Types | 24 \section usage_types Important Data Types |
| 25 There are two important data structures to consider in this interface. | 25 There are two important data structures to consider in this interface. |
| 26 | 26 |
| 27 \subsection usage_ctxs Contexts | 27 \subsection usage_ctxs Contexts |
| 28 A context is a storage area allocated by the calling application that the | 28 A context is a storage area allocated by the calling application that the |
| 29 codec may write into to store details about a single instance of that codec. | 29 codec may write into to store details about a single instance of that codec. |
| 30 Most of the context is implementation specific, and thus opaque to the | 30 Most of the context is implementation specific, and thus opaque to the |
| 31 application. The context structure as seen by the application is of fixed | 31 application. The context structure as seen by the application is of fixed |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 initialization time to ensure the application is using a header file that | 74 initialization time to ensure the application is using a header file that |
| 75 matches the library. The current ABI version number is stored in the | 75 matches the library. The current ABI version number is stored in the |
| 76 preprocessor macros #VPX_CODEC_ABI_VERSION, #VPX_ENCODER_ABI_VERSION, and | 76 preprocessor macros #VPX_CODEC_ABI_VERSION, #VPX_ENCODER_ABI_VERSION, and |
| 77 #VPX_DECODER_ABI_VERSION. For convenience, each initialization function has | 77 #VPX_DECODER_ABI_VERSION. For convenience, each initialization function has |
| 78 a wrapper macro that inserts the correct version number. These macros are | 78 a wrapper macro that inserts the correct version number. These macros are |
| 79 named like the initialization methods, but without the _ver suffix. | 79 named like the initialization methods, but without the _ver suffix. |
| 80 | 80 |
| 81 | 81 |
| 82 The available initialization methods are: | 82 The available initialization methods are: |
| 83 \if encoder | 83 \if encoder |
| 84 - #vpx_codec_enc_init (calls vpx_codec_enc_init_ver()) | 84 \li #vpx_codec_enc_init (calls vpx_codec_enc_init_ver()) |
| 85 - #vpx_codec_enc_init_multi (calls vpx_codec_enc_init_multi_ver()) | 85 \li #vpx_codec_enc_init_multi (calls vpx_codec_enc_init_multi_ver()) |
| 86 . | |
| 87 \endif | 86 \endif |
| 88 \if decoder - #vpx_codec_dec_init (calls vpx_codec_dec_init_ver()) \endif | 87 \if decoder |
| 89 | 88 \li #vpx_codec_dec_init (calls vpx_codec_dec_init_ver()) |
| 89 \endif |
| 90 | 90 |
| 91 | 91 |
| 92 \section usage_errors Error Handling | 92 \section usage_errors Error Handling |
| 93 Almost all codec functions return an error status of type #vpx_codec_err_t. | 93 Almost all codec functions return an error status of type #vpx_codec_err_t. |
| 94 The semantics of how each error condition should be processed is clearly | 94 The semantics of how each error condition should be processed is clearly |
| 95 defined in the definitions of each enumerated value. Error values can be | 95 defined in the definitions of each enumerated value. Error values can be |
| 96 converted into ASCII strings with the vpx_codec_error() and | 96 converted into ASCII strings with the vpx_codec_error() and |
| 97 vpx_codec_err_to_string() methods. The difference between these two methods
is | 97 vpx_codec_err_to_string() methods. The difference between these two methods
is |
| 98 that vpx_codec_error() returns the error state from an initialized context, | 98 that vpx_codec_error() returns the error state from an initialized context, |
| 99 whereas vpx_codec_err_to_string() can be used in cases where an error occurs | 99 whereas vpx_codec_err_to_string() can be used in cases where an error occurs |
| (...skipping 27 matching lines...) Expand all Loading... |
| 127 and the semantics of the call are preserved, as before. | 127 and the semantics of the call are preserved, as before. |
| 128 | 128 |
| 129 The special value <code>0</code> is reserved to represent an infinite | 129 The special value <code>0</code> is reserved to represent an infinite |
| 130 deadline. In this case, the codec will perform as much processing as | 130 deadline. In this case, the codec will perform as much processing as |
| 131 possible to yield the highest quality frame. | 131 possible to yield the highest quality frame. |
| 132 | 132 |
| 133 By convention, the value <code>1</code> is used to mean "return as fast as | 133 By convention, the value <code>1</code> is used to mean "return as fast as |
| 134 possible." | 134 possible." |
| 135 | 135 |
| 136 */ | 136 */ |
| OLD | NEW |