[FFmpeg-devel] [PATCH] avcodec/qsv: fix coding options
zeranoe at gmail.com
zeranoe at gmail.com
Sat May 28 07:07:07 CEST 2016
From: Kyle Schwarz <zeranoe at gmail.com>
---
libavcodec/qsvenc.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 132cf47..b4821fc 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -132,9 +132,6 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q,
#if QSV_HAVE_CO2
mfxExtCodingOption2 *co2 = (mfxExtCodingOption2*)coding_opts[1];
#endif
-#if QSV_HAVE_CO3
- mfxExtCodingOption3 *co3 = (mfxExtCodingOption3*)coding_opts[2];
-#endif
av_log(avctx, AV_LOG_VERBOSE, "profile: %s; level: %"PRIu16"\n",
print_profile(info->CodecProfile), info->CodecLevel);
@@ -186,13 +183,6 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q,
info->ICQQuality, co2->LookAheadDepth);
}
#endif
-#if QSV_HAVE_QVBR
- else if (info->RateControlMethod == MFX_RATECONTROL_QVBR) {
- av_log(avctx, AV_LOG_VERBOSE, "QVBRQuality: %"PRIu16"\n",
- co3->QVBRQuality);
- }
-#endif
-
av_log(avctx, AV_LOG_VERBOSE, "NumSlice: %"PRIu16"; NumRefFrame: %"PRIu16"\n",
info->NumSlice, info->NumRefFrame);
av_log(avctx, AV_LOG_VERBOSE, "RateDistortionOpt: %s\n",
@@ -567,31 +557,11 @@ static int qsv_retrieve_enc_params(AVCodecContext *avctx, QSVEncContext *q)
.PPSBuffer = pps_buf, .PPSBufSize = sizeof(pps_buf)
};
- mfxExtCodingOption co = {
- .Header.BufferId = MFX_EXTBUFF_CODING_OPTION,
- .Header.BufferSz = sizeof(co),
- };
-#if QSV_HAVE_CO2
- mfxExtCodingOption2 co2 = {
- .Header.BufferId = MFX_EXTBUFF_CODING_OPTION2,
- .Header.BufferSz = sizeof(co2),
- };
-#endif
-#if QSV_HAVE_CO3
- mfxExtCodingOption3 co3 = {
- .Header.BufferId = MFX_EXTBUFF_CODING_OPTION3,
- .Header.BufferSz = sizeof(co3),
- };
-#endif
-
mfxExtBuffer *ext_buffers[] = {
(mfxExtBuffer*)&extradata,
- (mfxExtBuffer*)&co,
+ (mfxExtBuffer*)&q->extco,
#if QSV_HAVE_CO2
- (mfxExtBuffer*)&co2,
-#endif
-#if QSV_HAVE_CO3
- (mfxExtBuffer*)&co3,
+ (mfxExtBuffer*)&q->extco2,
#endif
};
--
2.8.3.windows.1
More information about the ffmpeg-devel
mailing list