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

Andreas Håkon andreas.hakon at protonmail.com
Tue Apr 23 11:34:45 EEST 2019


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, 23 de April de 2019 9:29, Andreas Håkon <andreas.hakon at protonmail.com> wrote:

> ‐‐‐‐‐‐‐ 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)" > "QSV_VERSION_ATLEAST(1, 11)"
> So,
> "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)"
>
> Why?
> 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.
>
> Regards.
> A.H.
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hi Li,

Here the updated patch.
I hope you agree with it!

Regards.
A.H.

---

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-libavcodec-QSV-protect-GPB-code-with-CO3-define-v2.patch.txt
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190423/4db9456d/attachment.txt>


More information about the ffmpeg-devel mailing list