On 2017/7/20 20:07, Diego Biurrun wrote:
On Wed, Jul 19, 2017 at 02:41:31PM +0800, Huang, Zhengxu wrote:
---
Changes from v1:
* separate the mjpeg encoder from h264/hevc/mpeg2 as per Luca's review
* reuse the global_quality option as per Luca's review
* modify some coding-style and add changlog as per Diego's review
---
From ca30171ac02f0fa0d6634a2477bd1e64021897e0 Mon Sep 17 00:00:00 2001
From: "Huang, Zhengxu" <zhengxu.maxw...@gmail.com>
Date: Tue, 18 Jul 2017 01:13:24 +0800
Subject: [PATCH] libavcodec/mjpeg_qsv: Add the QSV MJPEG encoder
Just
Add QSV MJPEG encoder
--- a/Changelog
+++ b/Changelog
@@ -7,6 +7,7 @@ version <next>:
- VAAPI-accelerated VP8 and HEVC decoding
- VAAPI-accelerated deinterlacing
- config.log and other configuration files moved into avbuild/ directory
+- Intel QSV-accelerated MJPEG encoding
- VAAPI-accelerated MPEG-2 and VP8 encoding
- Apple Pixlet decoder
- The x86 assembler default switched from yasm to nasm, pass
See the comment at the top of the file:
Entries are sorted chronologically from oldest to youngest within each
release,
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -353,6 +353,65 @@ static int rc_supported(QSVEncContext *q)
+static int init_video_param_jpeg(AVCodecContext *avctx, QSVEncContext *q)
+{
+ q->param.mfx.FrameInfo.Width = FFALIGN(avctx->width, 16);
+ q->param.mfx.FrameInfo.Height = FFALIGN(avctx->height, 16);
nit: align the =
+ if (avctx->hw_frames_ctx) {
+ AVHWFramesContext *frames_ctx =
(AVHWFramesContext*)avctx->hw_frames_ctx->data;
nit: (AVHWFramesContext *)
@@ -568,6 +627,24 @@ FF_ENABLE_DEPRECATION_WARNINGS
return 0;
}
+static int qsv_retrieve_enc_jpeg_params(AVCodecContext *avctx, QSVEncContext *q)
+{
+ int ret = 0;
+
+ ret = MFXVideoENCODE_GetVideoParam(q->session, &q->param);
pointless initialization
In my opinion maybe keep this code much better in case the QSV MSDK
modify mjpeg code logic in the later release.
@@ -770,7 +847,15 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext
*q)
+ // for mfxInfoMFX struct, the JPEG different from other codecs
This is Engrish, I don't understand what you mean by "the JPEG". My best guess
is
// in the mfxInfoMFX struct, JPEG is different from other codecs
Thanks for your comments, Diego. I will modify in the V3.
Forgive my poor English,:-)
Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel