[FFmpeg-trac] #7706(avcodec:open): 20-30% perf drop in FFmpeg (H264) transcode performance with VAAPI

FFmpeg trac at avcodec.org
Wed Oct 30 11:20:11 EET 2019


#7706: 20-30% perf drop in FFmpeg (H264) transcode performance with VAAPI
-------------------------------------+-------------------------------------
             Reporter:  eero-t       |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  important    |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  vaapi        |               Blocked By:
  regression                         |
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by fulinjie):

 One possible reason:

 For old API encode2, vaBeginPicture and vaSyncSurface will be called in a
 more "asynchronous" way:

 Two pics will be sent to encoder without vaSyncSurface, thus the encoder
 would not be blocked by the sync and map procedure.


 {{{
 [mpeg2_vaapi @ 0x55a3ad371200] vaBeginPicture happens here.
     Last message repeated 1 times
 [mpeg2_vaapi @ 0x55a3ad371200] vaSyncSurface happens here.
     Last message repeated 1 times
 }}}

 For new send/receive API, vaBeginPicture is strictly followed by
 vaSyncSurface.
 {{{
 [mpeg2_vaapi @ 0x55bb10ea9200] vaBeginPicture happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaSyncSurface happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaBeginPicture happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaSyncSurface happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaBeginPicture happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaSyncSurface happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaBeginPicture happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaSyncSurface happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaBeginPicture happens here.
 [mpeg2_vaapi @ 0x55bb10ea9200] vaSyncSurface happens here.
 }}}

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


More information about the FFmpeg-trac mailing list