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:
@@ -333,17 +333,18 @@ static int vaapi_encode_mjpeg_init_slice_params(AVCodecContext *avctx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static VAConfigAttrib vaapi_encode_mjpeg_config_attributes[] = {
|
||||
{ .type = VAConfigAttribRTFormat,
|
||||
.value = VA_RT_FORMAT_YUV420 },
|
||||
{ .type = VAConfigAttribEncPackedHeaders,
|
||||
.value = VA_ENC_PACKED_HEADER_SEQUENCE },
|
||||
};
|
||||
|
||||
static av_cold int vaapi_encode_mjpeg_init_internal(AVCodecContext *avctx)
|
||||
{
|
||||
static const VAConfigAttrib default_config_attributes[] = {
|
||||
{ .type = VAConfigAttribRTFormat,
|
||||
.value = VA_RT_FORMAT_YUV420 },
|
||||
{ .type = VAConfigAttribEncPackedHeaders,
|
||||
.value = VA_ENC_PACKED_HEADER_SEQUENCE },
|
||||
};
|
||||
|
||||
VAAPIEncodeContext *ctx = avctx->priv_data;
|
||||
VAAPIEncodeMJPEGContext *priv = ctx->priv_data;
|
||||
int i;
|
||||
|
||||
ctx->va_profile = VAProfileJPEGBaseline;
|
||||
ctx->va_entrypoint = VAEntrypointEncPicture;
|
||||
@@ -353,9 +354,10 @@ static av_cold int vaapi_encode_mjpeg_init_internal(AVCodecContext *avctx)
|
||||
ctx->aligned_width = FFALIGN(ctx->input_width, 8);
|
||||
ctx->aligned_height = FFALIGN(ctx->input_height, 8);
|
||||
|
||||
ctx->config_attributes = vaapi_encode_mjpeg_config_attributes;
|
||||
ctx->nb_config_attributes =
|
||||
FF_ARRAY_ELEMS(vaapi_encode_mjpeg_config_attributes);
|
||||
for (i = 0; i < FF_ARRAY_ELEMS(default_config_attributes); i++) {
|
||||
ctx->config_attributes[ctx->nb_config_attributes++] =
|
||||
default_config_attributes[i];
|
||||
}
|
||||
|
||||
priv->quality = avctx->global_quality;
|
||||
if (priv->quality < 1 || priv->quality > 100) {
|
||||
|
Reference in New Issue
Block a user