[FFmpeg-devel] [PATCH v3] libavcodec/vp9: fix ref-frame size judging method

Paul B Mahol onemda at gmail.com
Tue Jul 9 14:38:54 EEST 2019


On 7/9/19, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> 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.)

Sorry but patch quality is unacceptable.

>
> -            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
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list