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

FFmpeg trac at avcodec.org
Sun May 5 14:48:27 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 lizhong1008):

 Replying to [comment:23 atorp]:
 > Hi lizhong1008,
 >
 > I think you need to add this change:
 > {{{
 > #if QSV_HAVE_ICQ
 > +#if QSV_HAVE_QVBR
 >     else if (avctx->global_quality > 0 && !avctx->rc_max_rate) {
 > +#else
 > +    else if (avctx->global_quality > 0) {
 > +#endif
 >         rc_mode = MFX_RATECONTROL_ICQ;
 >         rc_desc = "intelligent constant quality (ICQ)";
 >     }
 > #endif
 > }}}

 ICQ mode doen't need to set a max_rate. If max_rate is set with
 global_quality, we should assume QVBR is user required. If some codec
 (such as mpeg2) dosen't support QVBR (or any other BRC mode), it will be
 checked at
 https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/qsvenc.c#L392.
 Then an error will be returned, and user should aware that current BRC
 mode (QVBR) is not supported, and he should input valid BRC parameters.
 IMHO, I haven't found such logic has big problem.

 > And regarding your patch ​https://patchwork.ffmpeg.org/patch/12935/ it
 doesn't work.
 > Any other solution?

 It is weird. Probably I need to build FFmpeg form source code now? But I
 will be quite appreciated if you can provide an runtime solution(not a way
 of disable compile) since I have no much time to working on Windows.

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


More information about the FFmpeg-trac mailing list