[FFmpeg-devel,2/2] lavc/qsvenc_jpeg: set a default quality

Submitted by Zhong Li on Oct. 11, 2018, 9:30 a.m.

Details

Message ID 1539250228-30384-2-git-send-email-zhong.li@intel.com
State Accepted
Commit 92c25963e8b68c47055b813334eaf76599936a90
Headers show

Commit Message

Zhong Li Oct. 11, 2018, 9:30 a.m.
Keep alignment with vaapi mjpeg encoder.

Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 libavcodec/qsvenc_jpeg.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c
index 01c10125..1e7785a 100644
--- a/libavcodec/qsvenc_jpeg.c
+++ b/libavcodec/qsvenc_jpeg.c
@@ -75,6 +75,11 @@  static const AVClass class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
+static const AVCodecDefault qsv_enc_defaults[] = {
+    { "global_quality",  "80" },
+    { NULL },
+};
+
 AVCodec ff_mjpeg_qsv_encoder = {
     .name           = "mjpeg_qsv",
     .long_name      = NULL_IF_CONFIG_SMALL("MJPEG (Intel Quick Sync Video acceleration)"),
@@ -89,5 +94,6 @@  AVCodec ff_mjpeg_qsv_encoder = {
                                                     AV_PIX_FMT_QSV,
                                                     AV_PIX_FMT_NONE },
     .priv_class     = &class,
+    .defaults       = qsv_enc_defaults,
     .wrapper_name   = "qsv",
 };