[FFmpeg-devel] [PATCH v3] libavcodec/vp9: fix ref-frame size judging method
Ronald S. Bultje
rsbultje at gmail.com
Tue Jul 9 14:22:31 EEST 2019
Hi,
On Mon, Jul 8, 2019 at 6:23 PM Yan Cen <mryancen at gmail.com> wrote:
> From: yancen <cenx.yan at intel.com>
>
> There is no need all reference frame demension is valid in libvpx.
>
Haven't we discussed this before? Anyway, it seems you're really eager to
get this in, so I'll drop my objection. (I still think this could cause
issues in HW decoders.)
- if (!s->s.refs[s->s.h.refidx[0]].f->buf[0] ||
> - !s->s.refs[s->s.h.refidx[1]].f->buf[0] ||
> - !s->s.refs[s->s.h.refidx[2]].f->buf[0]) {
> - av_log(avctx, AV_LOG_ERROR, "Not all references are
> available\n");
> - return AVERROR_INVALIDDATA;
> + if (0 == sizeof(s->s.refs[s->s.h.refidx[0]])) {
> + if (0 == sizeof(s->s.refs[s->s.h.refidx[1]].f->buf[0])) {
> + if (0 == s->s.refs[s->s.h.refidx[2]].f->buf[0]) {
> + av_log(avctx, AV_LOG_ERROR, "All references are
> unavailable\n");
> + return AVERROR_INVALIDDATA;
> + } else {
> +
> av_frame_copy(s->s.refs[s->s.h.refidx[1]].f,s->s.refs[s->s.h.refidx[2]].f);
> +
> av_frame_copy(s->s.refs[s->s.h.refidx[0]].f,s->s.refs[s->s.h.refidx[2]].f);
> + }
>
[..]
This is concealment code for missing references and is unrelated to the ref
frame size judgement patch. Could you please split this off in a separate
patch? Also, we don't use 0 == sizeof(..) or 0 == .. in ffmpeg, we just use
!.., please adjust that style.
Ronald
More information about the ffmpeg-devel
mailing list