[FFmpeg-devel] [PATCH 2/2] avcodec: add bink2 video decoder
Michael Niedermayer
michael at niedermayer.cc
Sun Apr 7 03:07:25 EEST 2019
On Sun, Apr 07, 2019 at 09:15:32AM +1000, Peter Ross wrote:
> On Wed, Mar 27, 2019 at 09:21:47PM +0100, Paul B Mahol wrote:
> > Signed-off-by: Paul B Mahol <onemda at gmail.com>
> > ---
> > Missing deblocking.
> > ---
> > configure | 1 +
> > libavcodec/Makefile | 1 +
> > libavcodec/allcodecs.c | 1 +
> > libavcodec/avcodec.h | 1 +
> > libavcodec/bink2.c | 787 +++++++++++++++++++++++
> > libavcodec/bink2f.c | 1139 +++++++++++++++++++++++++++++++++
> > libavcodec/bink2g.c | 1342 +++++++++++++++++++++++++++++++++++++++
> > libavcodec/codec_desc.c | 7 +
> > libavformat/bink.c | 3 +-
>
> my comments below.
>
> this is a mammoth amount of work deserving of a better quality review.
>
> > +++ b/libavcodec/bink2.c
> > @@ -0,0 +1,787 @@
> > +/*
> > + * Bink video 2 decoder
> > + * Copyright (c) 2014 Konstantin Shishkov
> > + * Copyright (c) 2019 Paul B Mahol
> > + *
>
> > +static const uint8_t luma_repos[] = {
> > + 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15,
> > +};
>
> identical to msvideo1enc.c remap
> consider moving to libavcodec/mathops.h
>
> > +static const int32_t bink2g_dc_pat[] = {
> > + 1024, 1218, 1448, 1722, 2048,
> > + 2435, 2896, 3444, 4096, 4871,
> > + 5793, 6889, 8192, 9742, 11585, 13777, 16384,
> > + 19484, 23170, 27555, 32768, 38968, 46341,
> > + 55109, 65536, 77936, 92682, 110218, 131072,
> > + 155872, 185364, 220436, 262144, 311744,
> > + 370728, 440872, 524288,
> > +};
>
> this is so close to ff_dirac_qscale_tab it is not funny.
This table can be generated this way:
for (int i=0; i<37; i++)
printf("%d,\n", (int)lrint(1024 * pow(sqrt(sqrt(2)), i)));
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship: All citizens are under surveillance, all their steps and
actions recorded, for the politicians to enforce control.
Democracy: All politicians are under surveillance, all their steps and
actions recorded, for the citizens to enforce control.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190407/091b42ff/attachment.sig>
More information about the ffmpeg-devel
mailing list