The codec-specific context now contains both the common context and the codec-specific options directly.
Showing the changes to libavcodec/vaapi_encode.h (1 of 8 files). Show all
Unified · Split
| @@ -113,9 +113,6 @@ typedef struct VAAPIEncodeContext { · 112 unmodified lines | |||
| 113 | // Everything above this point must be set before calling | 113 | // Everything above this point must be set before calling |
| 114 | // ff_vaapi_encode_init(). | 114 | // ff_vaapi_encode_init(). |
| 115 | 115 | ||
| 116 | // Codec-specific state. | ||
| 117 | void *priv_data; | ||
| 118 | |||
| 119 | // Configuration attributes to use when creating va_config. | 116 | // Configuration attributes to use when creating va_config. |
| 120 | VAConfigAttrib config_attributes[MAX_CONFIG_ATTRIBUTES]; | 117 | VAConfigAttrib config_attributes[MAX_CONFIG_ATTRIBUTES]; |
| 121 | int nb_config_attributes; | 118 | int nb_config_attributes; |
| @@ -205,18 +202,10 @@ typedef struct VAAPIEncodeContext { · 83 unmodified lines | |||
| 205 | int gop_counter; | 202 | int gop_counter; |
| 206 | int p_counter; | 203 | int p_counter; |
| 207 | int end_of_stream; | 204 | int end_of_stream; |
| 208 | |||
| 209 | // Codec-local options are allocated to follow this structure in | ||
| 210 | // memory (in the AVCodec definition, set priv_data_size to | ||
| 211 | // sizeof(VAAPIEncodeContext) + sizeof(VAAPIEncodeFooOptions)). | ||
| 212 | void *codec_options; | ||
| 213 | char codec_options_data[0]; | ||
| 214 | } VAAPIEncodeContext; | 205 | } VAAPIEncodeContext; |
| 215 | 206 | ||
| 216 | 207 | ||
| 217 | typedef struct VAAPIEncodeType { | 208 | typedef struct VAAPIEncodeType { |
| 218 | size_t priv_data_size; | ||
| 219 | |||
| 220 | // Perform any extra codec-specific configuration after the | 209 | // Perform any extra codec-specific configuration after the |
| 221 | // codec context is initialised (set up the private data and | 210 | // codec context is initialised (set up the private data and |
| 222 | // add any necessary global parameters). | 211 | // add any necessary global parameters). |