#include <string.h>
#include "avcodec.h"
-#include "get_bits.h"
+#include "internal.h"
#include "vp56.h"
#include "vp56data.h"
return AVERROR_INVALIDDATA;
vp56_rac_gets(c, 2);
if (vp56_rac_get(c)) {
- av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n");
+ avpriv_report_missing_feature(s->avctx, "Interlacing");
return AVERROR_PATCHWELCOME;
}
rows = vp56_rac_gets(c, 8); /* number of stored macroblock rows */
if (!s->macroblocks || /* first frame */
16*cols != s->avctx->coded_width ||
16*rows != s->avctx->coded_height) {
- avcodec_set_dimensions(s->avctx, 16*cols, 16*rows);
+ int ret = ff_set_dimensions(s->avctx, 16 * cols, 16 * rows);
+ if (ret < 0)
+ return ret;
return VP56_SIZE_CHANGE;
}
} else if (!s->macroblocks)
if ((ret = ff_vp56_init(avctx, 1, 0)) < 0)
return ret;
+ ff_vp5dsp_init(&s->vp56dsp);
s->vp56_coord_div = vp5_coord_div;
s->parse_vector_adjustment = vp5_parse_vector_adjustment;
s->parse_coeff = vp5_parse_coeff;
.init = vp5_decode_init,
.close = ff_vp56_free,
.decode = ff_vp56_decode_frame,
- .capabilities = CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_DR1,
};