Message ID | 20170921061233.27549-1-zhong.li@intel.com |
---|---|
State | Superseded |
Headers | show |
> -----Original Message----- > From: Li, Zhong > Sent: Thursday, September 21, 2017 2:13 PM > To: ffmpeg-devel@ffmpeg.org > Cc: sw@jkqxz.net; Zhao, Jun <jun.zhao@intel.com>; nfxjfg@googlemail.com; > Li, Zhong <zhong.li@intel.com> > Subject: [FFmpeg-devel][PATCH V2] mpeg2_hwaccel: always submit twice > for a frame with two fileds. > > Though this patch to fix https://trac.ffmpeg.org/ticket/6668, I belive it is > unnecessary to set SLICE_FLAG_ALLOW_FIELD flag to other hwaccels(dxva, > vdpau, etc). > > Signed-off-by: Zhong Li <zhong.li@intel.com> > --- > libavcodec/mpeg12dec.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index > 22c29c1505..701845a46c 100644 > --- a/libavcodec/mpeg12dec.c > +++ b/libavcodec/mpeg12dec.c > @@ -1689,8 +1689,7 @@ static int mpeg_field_start(MpegEncContext *s, > const uint8_t *buf, int buf_size) > return AVERROR_INVALIDDATA; > } > > - if (s->avctx->hwaccel && > - (s->avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) { > + if (s->avctx->hwaccel) { > if ((ret = s->avctx->hwaccel->end_frame(s->avctx)) < 0) { > av_log(avctx, AV_LOG_ERROR, > "hardware accelerator failed to decode first > field\n"); > -- > 2.11.0 Any comment for this patch?
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 22c29c1505..701845a46c 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1689,8 +1689,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) return AVERROR_INVALIDDATA; } - if (s->avctx->hwaccel && - (s->avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) { + if (s->avctx->hwaccel) { if ((ret = s->avctx->hwaccel->end_frame(s->avctx)) < 0) { av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode first field\n");
Though this patch to fix https://trac.ffmpeg.org/ticket/6668, I belive it is unnecessary to set SLICE_FLAG_ALLOW_FIELD flag to other hwaccels(dxva, vdpau, etc). Signed-off-by: Zhong Li <zhong.li@intel.com> --- libavcodec/mpeg12dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)