mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
vaapi_encode_mjpeg: Use common quality option
Doesn't change anything, but makes the behaviour better match that of the other codecs (the CONSTANT_QUALITY_ONLY flag already ensures that CQP is the only RC mode selectable for MJPEG).
This commit is contained in:
parent
c4c2c4df76
commit
fda6dcd0b0
@ -438,7 +438,7 @@ static av_cold int vaapi_encode_mjpeg_configure(AVCodecContext *avctx)
|
|||||||
VAAPIEncodeMJPEGContext *priv = avctx->priv_data;
|
VAAPIEncodeMJPEGContext *priv = avctx->priv_data;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
priv->quality = avctx->global_quality;
|
priv->quality = ctx->rc_quality;
|
||||||
if (priv->quality < 1 || priv->quality > 100) {
|
if (priv->quality < 1 || priv->quality > 100) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Invalid quality value %d "
|
av_log(avctx, AV_LOG_ERROR, "Invalid quality value %d "
|
||||||
"(must be 1-100).\n", priv->quality);
|
"(must be 1-100).\n", priv->quality);
|
||||||
@ -483,6 +483,8 @@ static const VAAPIEncodeType vaapi_encode_type_mjpeg = {
|
|||||||
|
|
||||||
.configure = &vaapi_encode_mjpeg_configure,
|
.configure = &vaapi_encode_mjpeg_configure,
|
||||||
|
|
||||||
|
.default_quality = 80,
|
||||||
|
|
||||||
.picture_params_size = sizeof(VAEncPictureParameterBufferJPEG),
|
.picture_params_size = sizeof(VAEncPictureParameterBufferJPEG),
|
||||||
.init_picture_params = &vaapi_encode_mjpeg_init_picture_params,
|
.init_picture_params = &vaapi_encode_mjpeg_init_picture_params,
|
||||||
|
|
||||||
@ -537,7 +539,6 @@ static const AVOption vaapi_encode_mjpeg_options[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const AVCodecDefault vaapi_encode_mjpeg_defaults[] = {
|
static const AVCodecDefault vaapi_encode_mjpeg_defaults[] = {
|
||||||
{ "global_quality", "80" },
|
|
||||||
{ "b", "0" },
|
{ "b", "0" },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user