X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Featgv.c;h=37f84bf5efacec4a7a0f3f5b8b08b840c58ec6ab;hb=c48883163d6c7ff0806687bf3ee33ca9f8e7dede;hp=26bf524339faacefe1aa391eb66930832b433ae3;hpb=f0a7b67a356def037d26f9460b22c86d82be2b89;p=ffmpeg diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index 26bf524339f..37f84bf5efa 100644 --- a/libavcodec/eatgv.c +++ b/libavcodec/eatgv.c @@ -29,7 +29,7 @@ */ #include "avcodec.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #include "libavutil/lzo.h" #include "libavutil/imgutils.h" @@ -157,7 +157,7 @@ static int tgv_decode_inter(TgvContext * s, const uint8_t *buf, const uint8_t *b vector_bits = AV_RL16(&buf[6]); buf += 12; - /* allocate codebook buffers as neccessary */ + /* allocate codebook buffers as necessary */ if (num_mvs > s->num_mvs) { s->mv_codebook = av_realloc(s->mv_codebook, num_mvs*2*sizeof(int)); s->num_mvs = num_mvs; @@ -278,7 +278,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, pal_count = AV_RL16(&buf[6]); buf += 12; for(i=0; i= 3; i++) { - s->palette[i] = AV_RB24(buf); + s->palette[i] = 0xFF << 24 | AV_RB24(buf); buf += 3; } } @@ -289,11 +289,11 @@ static int tgv_decode_frame(AVCodecContext *avctx, /* shuffle */ FFSWAP(AVFrame, s->frame, s->last_frame); if (!s->frame.data[0]) { - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; s->frame.linesize[0] = s->width; - /* allocate additional 12 bytes to accomodate av_memcpy_backptr() OUTBUF_PADDED optimisation */ + /* allocate additional 12 bytes to accommodate av_memcpy_backptr() OUTBUF_PADDED optimisation */ s->frame.data[0] = av_malloc(s->width*s->height + 12); if (!s->frame.data[0]) return AVERROR(ENOMEM);