[FFmpeg-trac] #5821(avcodec:new): jerky result when using hevc_vaapi encoding on Skylake cpu

FFmpeg trac at avcodec.org
Tue Oct 25 14:26:46 EEST 2016


#5821: jerky result when using hevc_vaapi encoding on Skylake cpu
-------------------------------------+-------------------------------------
             Reporter:  trivita      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  h265, hevc,  |               Blocked By:
  vaapi                              |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by jkqxz):

 Sounds like
 <https://git.libav.org/?p=libav.git;a=commit;h=b8cac1e83066aa87e8402c146c81b77a11b5eec3>.

 Does it happen:
 (a) If you encode with no B-frames (add "-bf 0" to the encode options).
 or
 (b) If you apply this patch:
 {{{
 diff --git a/libavcodec/vaapi_encode_h265.c
 b/libavcodec/vaapi_encode_h265.c
 index db339aa..006cc2a 100644
 --- a/libavcodec/vaapi_encode_h265.c
 +++ b/libavcodec/vaapi_encode_h265.c
 @@ -897,12 +897,12 @@ static int
 vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)

          mseq->log2_max_pic_order_cnt_lsb_minus4 = 8;
          mseq->vps_sub_layer_ordering_info_present_flag = 0;
 -        mseq->vps_max_dec_pic_buffering_minus1[0] = 1;
 -        mseq->vps_max_num_reorder_pics[0]         = ctx->b_per_p;
 +        mseq->vps_max_dec_pic_buffering_minus1[0] = (avctx->max_b_frames
 > 0) + 1;
 +        mseq->vps_max_num_reorder_pics[0]         = (avctx->max_b_frames
 > 0);
          mseq->vps_max_latency_increase_plus1[0]   = 0;
          mseq->sps_sub_layer_ordering_info_present_flag = 0;
 -        mseq->sps_max_dec_pic_buffering_minus1[0] = 1;
 -        mseq->sps_max_num_reorder_pics[0]         = ctx->b_per_p;
 +        mseq->sps_max_dec_pic_buffering_minus1[0] = (avctx->max_b_frames
 > 0) + 1;
 +        mseq->sps_max_num_reorder_pics[0]         = (avctx->max_b_frames
 > 0);
          mseq->sps_max_latency_increase_plus1[0]   = 0;

          mseq->vps_timing_info_present_flag = 1;
 }}}

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


More information about the FFmpeg-trac mailing list