struct VAAPIEncodePicture;
enum {
+ MAX_CONFIG_ATTRIBUTES = 4,
+ MAX_GLOBAL_PARAMS = 4,
MAX_PICTURE_REFERENCES = 2,
MAX_PICTURE_SLICES = 1,
MAX_PARAM_BUFFERS = 16,
AVBufferRef *recon_frames_ref;
AVHWFramesContext *recon_frames;
- VAConfigAttrib *config_attributes;
+ VAConfigAttrib config_attributes[MAX_CONFIG_ATTRIBUTES];
int nb_config_attributes;
+ VAEncMiscParameterBuffer *global_params[MAX_GLOBAL_PARAMS];
+ size_t global_params_size[MAX_GLOBAL_PARAMS];
+ int nb_global_params;
+
// Per-sequence parameter structure (VAEncSequenceParameterBuffer*).
void *codec_sequence_params;
// Per-sequence parameters found in the per-picture parameter
// structure (VAEncPictureParameterBuffer*).
- void *codec_picture_params;
+ void *codec_picture_params;
// Current encoding window, in display (input) order.
VAAPIEncodePicture *pic_start, *pic_end;
int p_counter;
int end_of_stream;
+ // Codec-local options are allocated to follow this structure in
+ // memory (in the AVCodec definition, set priv_data_size to
+ // sizeof(VAAPIEncodeContext) + sizeof(VAAPIEncodeFooOptions)).
+ void *codec_options;
+ char codec_options_data[0];
} VAAPIEncodeContext;