[vlc-commits] qsv: keep the same encoding parameters when getting the buffer parameters
Steve Lhomme
git at videolan.org
Wed Apr 4 18:28:09 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Sep 4 15:30:06 2017 +0200| [b7b628b08fddfafe9c236ef40cf11cc7cb2ff995] | committer: Steve Lhomme
qsv: keep the same encoding parameters when getting the buffer parameters
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7b628b08fddfafe9c236ef40cf11cc7cb2ff995
---
modules/codec/qsv.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
index edf8bf68a9..16a95e2221 100644
--- a/modules/codec/qsv.c
+++ b/modules/codec/qsv.c
@@ -410,7 +410,6 @@ static int Open(vlc_object_t *this)
uint8_t sps_buf[128];
uint8_t pps_buf[128];
mfxExtCodingOptionSPSPPS headers;
- mfxExtBuffer *extended_params[1] = {(mfxExtBuffer *)&headers};
mfxExtCodingOption co = {
.Header.BufferId = MFX_EXTBUFF_CODING_OPTION,
.Header.BufferSz = sizeof(co),
@@ -429,6 +428,13 @@ static int Open(vlc_object_t *this)
(mfxExtBuffer*)&co2,
#endif
};
+ mfxExtBuffer *extended_params[] = {
+ (mfxExtBuffer*)&headers,
+ (mfxExtBuffer*)&co,
+#if QSV_HAVE_CO2
+ (mfxExtBuffer*)&co2,
+#endif
+ };
mfxVersion ver = { { MFX_VERSION_MINOR, MFX_VERSION_MAJOR } };
mfxIMPL impl;
@@ -599,11 +605,14 @@ static int Open(vlc_object_t *this)
headers.SPSBuffer = sps_buf;
headers.PPSBuffer = pps_buf;
sys->params.ExtParam = (mfxExtBuffer **)&extended_params;
- sys->params.NumExtParam = 1;
+ sys->params.NumExtParam =
+#if QSV_HAVE_CO2
+ 3;
+#else
+ 2;
+#endif
MFXVideoENCODE_GetVideoParam(sys->session, &sys->params);
- sys->params.NumExtParam = 0;
- sys->params.ExtParam = NULL;
i_extra = headers.SPSBufSize + headers.PPSBufSize;
p_extra = malloc(i_extra);
More information about the vlc-commits
mailing list