[FFmpeg-devel] [PATCH] libavcodec: QSV protect GPB code with CO3 define

Andreas Håkon andreas.hakon at protonmail.com
Tue Apr 23 10:29:09 EEST 2019

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, 23 de April de 2019 8:39, Li, Zhong <zhong.li at intel.com> wrote:

> I belive they are different. If you extend the MARCIO, they are actually:
> IMHO, your patch is only needed when disable "QSV_HAVE_CO3", but tiket#7839 is not root caused now.
> I will consider to accept it when tiket#7839 is root caused.

Hi Li,

With all due respect.
You're assuming that:
 "QSV_VERSION_ATLEAST(1, 18)" implies that "QSV_VERSION_ATLEAST(1, 11)"

But the CODE doesn't say that!

The code uses:
 "#if QSV_HAVE_CO3"

And then ***every*** use of the "co3" member needs to be protected by this clausule.
Futhermore, this is true in every part of the source code in "qsvenc.c"... except at
two points (I need to review my patch, as I noticed another block not protected).

This is a must, even if "QSV_VERSION_ATLEAST(1, 18)" > "QSV_VERSION_ATLEAST(1, 11)"
Because the option "QSV_HAVE_CO3" can be rewriten (for example, disabled).

So the conclusion is that the code doesn't say "QSV_VERSION_ATLEAST(x)".

Anyway, thanks for discussing it. Stay tuned, while I prepare another patch
protecting all cases.



More information about the ffmpeg-devel mailing list