On Thu, Apr 12, 2018 at 02:42:11PM +0200, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol <one...@gmail.com> > --- > libavcodec/dxv.c | 1032 > ++++++++++++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 1003 insertions(+), 29 deletions(-) > > diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c > index 529e211258..cd7b693663 100644 > --- a/libavcodec/dxv.c > +++ b/libavcodec/dxv.c > @@ -1,6 +1,7 @@ > /* > * Resolume DXV decoder > * Copyright (C) 2015 Vittorio Giovara <vittorio.giov...@gmail.com> > + * Copyright (C) 2018 Paul B Mahol > * > * This file is part of FFmpeg. > *
[...] > @@ -169,6 +368,728 @@ static int dxv_decompress_dxt1(AVCodecContext *avctx) > return 0; > } > > +typedef struct OpcodeTable { > + int16_t next; > + uint8_t val1; > + uint8_t val2; > +} OpcodeTable; > + > +static int fill_ltable(GetByteContext *gb, uint32_t *table, int *nb_elements) > +{ > + unsigned half = 512, bits = 1023, left = 1024, input, mask; > + int value, counter = 0, rshift = 10, lshift = 30; > + > + mask = bytestream2_get_le32(gb) >> 2; > + while (left) { > + if (bytestream2_get_bytes_left(gb) < 0 || counter >= 256) bytestream2_get_bytes_left returns unsigned so it cannot be negative [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "I am not trying to be anyone's saviour, I'm trying to think about the future and not be sad" - Elon Musk
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel