[FFmpeg-trac] #7839(avcodec:new): QVBR breaks mpeg2_qsv

FFmpeg trac at avcodec.org
Mon Apr 15 12:48:49 EEST 2019


#7839: QVBR breaks mpeg2_qsv
-------------------------------------+-------------------------------------
             Reporter:  atorp        |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  qsv          |               Blocked By:
  regression                         |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by atorp):

 Hi,

 More information...

 If I compile with this simple patch:
 {{{
 diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
 index f2f4d38503..2990a85eba 100644
 --- a/libavcodec/qsvenc.h
 +++ b/libavcodec/qsvenc.h
 @@ -35,7 +35,7 @@
  #include "qsv_internal.h"

  #define QSV_HAVE_CO2 QSV_VERSION_ATLEAST(1, 6)
 -#define QSV_HAVE_CO3 QSV_VERSION_ATLEAST(1, 11)
 +#define QSV_HAVE_CO3 0
  #define QSV_HAVE_CO_VPS  QSV_VERSION_ATLEAST(1, 17)

  #define QSV_HAVE_TRELLIS QSV_VERSION_ATLEAST(1, 8)
 }}}

 To disable the use of the QVBR mode, then code fails to compile!
 {{{
 /build/fail_comp: line 1: declare: `'': not a valid identifier
 /build/fail_comp: line 1: declare: `'': not a valid identifier
 /build/fail_comp: line 1: declare: `'': not a valid identifier
 /build/fail_comp: line 1: declare: `'': not a valid identifier
 Likely error:
                 co3->QVBRQuality);
                 ^~~
                 co2
 C:/ffmpeg-git/libavcodec/qsvenc.c:199:16: note: each undeclared identifier
 is reported only once for each function it appears in
 C:/ffmpeg-git/libavcodec/qsvenc.c: In function 'init_video_param':
 C:/ffmpeg-git/libavcodec/qsvenc.c:602:16: error: 'QSVEncContext' {aka 's
 truct QSVEncContext'} has no member named 'extco3'; did you mean 'extco'?
              q->extco3.QVBRQuality = av_clip(avctx->global_quality, 0,
 51);
                 ^~~~~~
                 extco
 make: *** [/ffmpeg-git/ffbuild/common.mak:60: libavcodec/qsvenc.o] Error 1
 }}}

 I feel at least some more code needs to be protected with a "#if
 QSV_HAVE_CO3".

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7839#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list