On 6/22/17 2:52 PM, wm4 wrote:
> Affects in particular DXVA2/D3D11VA, which asks for 128 pixels
> alignment. The AVHWFramesContext will return AVFrames with that larger
> size set. We need to crop it back in the decoder.
> ---
>  libavcodec/hevc_refs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c
> index 0c1918793e..d21cd982df 100644
> --- a/libavcodec/hevc_refs.c
> +++ b/libavcodec/hevc_refs.c
> @@ -93,6 +93,9 @@ static HEVCFrame *alloc_frame(HEVCContext *s)
>          if (ret < 0)
>              return NULL;
>  
> +        frame->tf.f->width  = FFMIN(frame->tf.f->width,  s->avctx->width);
> +        frame->tf.f->height = FFMIN(frame->tf.f->height, s->avctx->height);
> +
>          frame->rpl_buf = av_buffer_allocz(s->pkt.nb_nals * 
> sizeof(RefPicListTab));
>          if (!frame->rpl_buf)
>              goto fail;
> 

fate-hevc-conformance-RAP_B_Bossen_1 changes its hash because of it.


_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to