* RV40 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 libavcodec/rv40.c
+ * @file
* RV40 decoder
*/
+#include "libavutil/imgutils.h"
+
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
si->pts = get_bits(gb, 13);
if(!si->type || !get_bits1(gb))
rv40_parse_picture_size(gb, &w, &h);
- if(avcodec_check_dimensions(r->s.avctx, w, h) < 0)
+ if(av_image_check_size(w, h, 0, r->s.avctx) < 0)
return -1;
si->width = w;
si->height = h;
if(--r->s.mb_skip_run)
return RV34_MB_SKIP;
- if(r->avail_cache[5-1])
+ if(r->avail_cache[6-1])
blocks[r->mb_type[mb_pos - 1]]++;
- if(r->avail_cache[5-4]){
+ if(r->avail_cache[6-4]){
blocks[r->mb_type[mb_pos - s->mb_stride]]++;
- if(r->avail_cache[5-2])
+ if(r->avail_cache[6-2])
blocks[r->mb_type[mb_pos - s->mb_stride + 1]]++;
- if(r->avail_cache[5-5])
+ if(r->avail_cache[6-5])
blocks[r->mb_type[mb_pos - s->mb_stride - 1]]++;
}
prev_type = i;
}
}
- if(s->pict_type == FF_P_TYPE){
+ if(s->pict_type == AV_PICTURE_TYPE_P){
prev_type = block_num_to_ptype_vlc_num[prev_type];
q = get_vlc2(gb, ptype_vlc[prev_type].table, PTYPE_VLC_BITS, 1);
if(q < PBTYPE_ESCAPE)
}
}
-static inline void rv40_adaptive_loop_filter(uint8_t *src, const int step,
+static av_always_inline void rv40_adaptive_loop_filter(uint8_t *src, const int step,
const int stride, const int dmode,
const int lim_q1, const int lim_p1,
const int alpha,
return 0;
}
-AVCodec rv40_decoder = {
+AVCodec ff_rv40_decoder = {
"rv40",
- CODEC_TYPE_VIDEO,
+ AVMEDIA_TYPE_VIDEO,
CODEC_ID_RV40,
sizeof(RV34DecContext),
rv40_decode_init,