summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_encode.h
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-05-11 19:40:30 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-05-11 19:40:39 +0100
commit8ed427f9f92fd45c2510c019dba932acda74817f (patch)
tree860dca02a5cf782100e7abf6a64a35ddab5f967d /libavcodec/vaapi_encode.h
parentbc3d2f25783a4f61b7018800a12182dc46ff8325 (diff)
parent92fdea37477b5a2d1329e5ef0773e24473fa8f12 (diff)
downloadffmpeg-8ed427f9f92fd45c2510c019dba932acda74817f.tar.gz
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>
Diffstat (limited to 'libavcodec/vaapi_encode.h')
-rw-r--r--libavcodec/vaapi_encode.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/libavcodec/vaapi_encode.h b/libavcodec/vaapi_encode.h
index ceab4160d2..b67168b1ef 100644
--- a/libavcodec/vaapi_encode.h
+++ b/libavcodec/vaapi_encode.h
@@ -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;