X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Frv30.c;h=62177dda78b099163c3aeacca314fab582ec5a3e;hb=75abcdb3915e3abb2dc6b5f7d101c177dcfdb626;hp=0c6f343c9e61c2501e3419e8e4bcb5542d54910b;hpb=42b7678d655dbe1f8ce0f27bdea8ec778973a81d;p=ffmpeg diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c index 0c6f343c9e6..62177dda78b 100644 --- a/libavcodec/rv30.c +++ b/libavcodec/rv30.c @@ -2,25 +2,25 @@ * RV30 decoder * Copyright (c) 2007 Konstantin Shishkov * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** - * @file rv30.c + * @file * RV30 decoder */ @@ -71,7 +71,7 @@ static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t { int i, j, k; - for(i = 0; i < 4; i++, dst += r->s.b4_stride - 4){ + for(i = 0; i < 4; i++, dst += r->intra_types_stride - 4){ for(j = 0; j < 4; j+= 2){ int code = svq3_get_ue_golomb(gb) << 1; if(code >= 81*2){ @@ -79,7 +79,7 @@ static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t return -1; } for(k = 0; k < 2; k++){ - int A = dst[-r->s.b4_stride] + 1; + int A = dst[-r->intra_types_stride] + 1; int B = dst[-1] + 1; *dst++ = rv30_itype_from_context[A * 90 + B * 9 + rv30_itype_code[code + k]]; if(dst[-1] == 9){ @@ -111,7 +111,7 @@ static int rv30_decode_mb_info(RV34DecContext *r) av_log(s->avctx, AV_LOG_ERROR, "dquant needed\n"); code -= 6; } - if(s->pict_type != FF_B_TYPE) + if(s->pict_type != AV_PICTURE_TYPE_B) return rv30_p_types[code]; else return rv30_b_types[code]; @@ -266,9 +266,9 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx) return 0; } -AVCodec rv30_decoder = { +AVCodec ff_rv30_decoder = { "rv30", - CODEC_TYPE_VIDEO, + AVMEDIA_TYPE_VIDEO, CODEC_ID_RV30, sizeof(RV34DecContext), rv30_decode_init, @@ -276,5 +276,7 @@ AVCodec rv30_decoder = { ff_rv34_decode_end, ff_rv34_decode_frame, CODEC_CAP_DR1 | CODEC_CAP_DELAY, + .flush = ff_mpeg_flush, .long_name = NULL_IF_CONFIG_SMALL("RealVideo 3.0"), + .pix_fmts= ff_pixfmt_list_420, };