Merge commit '92fdea37477b5a2d1329e5ef0773e24473fa8f12'
These are all trivial to merge. * commit '92fdea37477b5a2d1329e5ef0773e24473fa8f12': vaapi_h265: Add -qp option, use it to replace use of -global_quality vaapi_h265: Add constant-bitrate encode support vaapi_h264: Add encode quality option (for quality-speed tradeoff) vaapi_h264: Add -qp option, use it to replace use of -global_quality vaapi_encode: Add support for codec-local options vaapi_h264: Add constant-bitrate encode support vaapi_encode: Refactor slightly to allow easier setting of global options Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
@@ -32,6 +32,8 @@ struct VAAPIEncodeType;
|
||||
struct VAAPIEncodePicture;
|
||||
|
||||
enum {
|
||||
MAX_CONFIG_ATTRIBUTES = 4,
|
||||
MAX_GLOBAL_PARAMS = 4,
|
||||
MAX_PICTURE_REFERENCES = 2,
|
||||
MAX_PICTURE_SLICES = 1,
|
||||
MAX_PARAM_BUFFERS = 16,
|
||||
@@ -128,15 +130,19 @@ typedef struct VAAPIEncodeContext {
|
||||
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;
|
||||
@@ -166,6 +172,11 @@ typedef struct VAAPIEncodeContext {
|
||||
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;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user