Message ID | 20180922161408.22052-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 674727291b340f7ee8af0e2df2293e7ba4e249ba |
Headers | show |
On 9/22/18, Michael Niedermayer <michael@niedermayer.cc> wrote: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/prosumer.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c > index a2932852c9..e6959bfb6c 100644 > --- a/libavcodec/prosumer.c > +++ b/libavcodec/prosumer.c > @@ -322,9 +322,6 @@ static void fill_lut(uint32_t *lut) > uint32_t b = a & 0xFFu; > uint32_t c, d, e; > > - if (b > 3) > - continue; > - > c = (b << 16) | table[i-1]; > d = 4 * (3 - b); > e = (((0xFFF00000u << d) & a) >> 20) & 0xFFF; > -- > 2.19.0 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > LGTM whole patchset. I assuming all files we have still decodes fine after this applied.
On Sat, Sep 22, 2018 at 06:24:14PM +0200, Paul B Mahol wrote: > On 9/22/18, Michael Niedermayer <michael@niedermayer.cc> wrote: > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > libavcodec/prosumer.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c > > index a2932852c9..e6959bfb6c 100644 > > --- a/libavcodec/prosumer.c > > +++ b/libavcodec/prosumer.c > > @@ -322,9 +322,6 @@ static void fill_lut(uint32_t *lut) > > uint32_t b = a & 0xFFu; > > uint32_t c, d, e; > > > > - if (b > 3) > > - continue; > > - > > c = (b << 16) | table[i-1]; > > d = 4 * (3 - b); > > e = (((0xFFF00000u << d) & a) >> 20) & 0xFFF; > > -- > > 2.19.0 > > > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > LGTM whole patchset. > > I assuming all files we have still decodes fine after this applied. the 2 files i found decode unchanged i also had some sloppy checksum code locally to confirm that the LUT did not change from any commit: @@ -332,6 +332,13 @@ static void fill_lut(uint32_t *lut) lut[i ] = 0x68000; lut[i+1] = 0; } + + uint64_t R = 1; + for (int i = 0; i<0x10000; i++) { + R += lut[i]; + R *= 12345987517121; + } + av_assert0(R == -4720894470766836899); } static av_cold int decode_init(AVCodecContext *avctx) [...]
On 9/22/18, Michael Niedermayer <michael@niedermayer.cc> wrote: > On Sat, Sep 22, 2018 at 06:24:14PM +0200, Paul B Mahol wrote: >> On 9/22/18, Michael Niedermayer <michael@niedermayer.cc> wrote: >> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> >> > --- >> > libavcodec/prosumer.c | 3 --- >> > 1 file changed, 3 deletions(-) >> > >> > diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c >> > index a2932852c9..e6959bfb6c 100644 >> > --- a/libavcodec/prosumer.c >> > +++ b/libavcodec/prosumer.c >> > @@ -322,9 +322,6 @@ static void fill_lut(uint32_t *lut) >> > uint32_t b = a & 0xFFu; >> > uint32_t c, d, e; >> > >> > - if (b > 3) >> > - continue; >> > - >> > c = (b << 16) | table[i-1]; >> > d = 4 * (3 - b); >> > e = (((0xFFF00000u << d) & a) >> 20) & 0xFFF; >> > -- >> > 2.19.0 >> > >> > _______________________________________________ >> > ffmpeg-devel mailing list >> > ffmpeg-devel@ffmpeg.org >> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > >> >> LGTM whole patchset. >> >> I assuming all files we have still decodes fine after this applied. > > the 2 files i found decode unchanged > > i also had some sloppy checksum code locally to confirm that the LUT did > not > change from any commit: > @@ -332,6 +332,13 @@ static void fill_lut(uint32_t *lut) > lut[i ] = 0x68000; > lut[i+1] = 0; > } > + > + uint64_t R = 1; > + for (int i = 0; i<0x10000; i++) { > + R += lut[i]; > + R *= 12345987517121; > + } > + av_assert0(R == -4720894470766836899); > } > > static av_cold int decode_init(AVCodecContext *avctx) > > [...] Should be fine.
On Sun, Sep 23, 2018 at 01:30:29PM +0200, Paul B Mahol wrote: > On 9/22/18, Michael Niedermayer <michael@niedermayer.cc> wrote: > > On Sat, Sep 22, 2018 at 06:24:14PM +0200, Paul B Mahol wrote: > >> On 9/22/18, Michael Niedermayer <michael@niedermayer.cc> wrote: > >> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > >> > --- > >> > libavcodec/prosumer.c | 3 --- > >> > 1 file changed, 3 deletions(-) > >> > > >> > diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c > >> > index a2932852c9..e6959bfb6c 100644 > >> > --- a/libavcodec/prosumer.c > >> > +++ b/libavcodec/prosumer.c > >> > @@ -322,9 +322,6 @@ static void fill_lut(uint32_t *lut) > >> > uint32_t b = a & 0xFFu; > >> > uint32_t c, d, e; > >> > > >> > - if (b > 3) > >> > - continue; > >> > - > >> > c = (b << 16) | table[i-1]; > >> > d = 4 * (3 - b); > >> > e = (((0xFFF00000u << d) & a) >> 20) & 0xFFF; > >> > -- > >> > 2.19.0 > >> > > >> > _______________________________________________ > >> > ffmpeg-devel mailing list > >> > ffmpeg-devel@ffmpeg.org > >> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > >> > > >> > >> LGTM whole patchset. > >> > >> I assuming all files we have still decodes fine after this applied. > > > > the 2 files i found decode unchanged > > > > i also had some sloppy checksum code locally to confirm that the LUT did > > not > > change from any commit: > > @@ -332,6 +332,13 @@ static void fill_lut(uint32_t *lut) > > lut[i ] = 0x68000; > > lut[i+1] = 0; > > } > > + > > + uint64_t R = 1; > > + for (int i = 0; i<0x10000; i++) { > > + R += lut[i]; > > + R *= 12345987517121; > > + } > > + av_assert0(R == -4720894470766836899); > > } > > > > static av_cold int decode_init(AVCodecContext *avctx) > > > > [...] > > Should be fine. will apply thanks [...]
diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index a2932852c9..e6959bfb6c 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -322,9 +322,6 @@ static void fill_lut(uint32_t *lut) uint32_t b = a & 0xFFu; uint32_t c, d, e; - if (b > 3) - continue; - c = (b << 16) | table[i-1]; d = 4 * (3 - b); e = (((0xFFF00000u << d) & a) >> 20) & 0xFFF;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/prosumer.c | 3 --- 1 file changed, 3 deletions(-)