[FFmpeg-trac] #8119(avcodec:new): mpeg2_vaapi encoder "QP" parameter for CQP

FFmpeg trac at avcodec.org
Thu Sep 5 11:41:36 EEST 2019


#8119: mpeg2_vaapi encoder "QP" parameter for CQP
-------------------------------------+-------------------------------------
             Reporter:  ahakon       |                     Type:
                                     |  enhancement
               Status:  new          |                 Priority:  normal
            Component:  avcodec      |                  Version:  git-
             Keywords:               |  master
  vaapi_encode_mpeg2, cqp            |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 When using the CQP Rate Control (-c:v mpeg2_vaapi -rc_mode CQP)
 the current implementation only accepts the global_quality to configure
 it. This value is set using the "-q:v" option, but this value isn't in the
 common range 0-31 (in fact, 0.09 corresponds to 10, 0.1 to 11, etc.).

 However, in the H.264 VAAPI encoder (h264_vaapi) the explicit parameter
 "QP" exists. And this value sets the GENERIC VAAPI ENCODER value of
 "explicit_qp". See:

 https://github.com/FFmpeg/FFmpeg/blob/f30fb5ef626140d6e286a22e4f5ca7e7f5b97c67/libavcodec/vaapi_encode_h264.c#L1258
 https://github.com/FFmpeg/FFmpeg/blob/f30fb5ef626140d6e286a22e4f5ca7e7f5b97c67/libavcodec/vaapi_encode_h264.c#L1236

 So, only adding this "-qp" parameter to the MPEG2 VAAPI ENCODER, then it
 will enable the option to use the common 0-31 range with this encoder. In
 fact, a very small of new source lines are required. Just copy&paste!

 Regards.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8119>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list