*/
/**
- * @file libavcodec/rv40.c
+ * @file
* RV40 decoder
*/
+#include "libavcore/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]]++;
}
}
}
-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,