ff_proresdsp_init(&ctx->prodsp, avctx);
avctx->coded_frame = &ctx->frame;
- ctx->frame.type = FF_I_TYPE;
+ ctx->frame.type = AV_PICTURE_TYPE_I;
ctx->frame.key_frame = 1;
ff_init_scantable_permutation(idct_permutation,
code = 5;
sign = 0;
for (i = 1; i < blocks_per_slice; i++, out += 64) {
- DECODE_CODEWORD(code, dc_codebook[FFMIN(code, 6)]);
+ DECODE_CODEWORD(code, dc_codebook[FFMIN(code, 6U)]);
if(code) sign ^= -(code & 1);
else sign = 0;
prev_dc += (((code + 1) >> 1) ^ sign) - sign;
int log2_block_count = av_log2(blocks_per_slice);
OPEN_READER(re, gb);
-
+ UPDATE_CACHE(re, gb); \
run = 4;
level = 2;
v_data_size = slice->data_size - y_data_size - u_data_size - hdr_size;
if (hdr_size > 7) v_data_size = AV_RB16(buf + 6);
- if (y_data_size < 0 || u_data_size < 0 || v_data_size < 0) {
+ if (y_data_size < 0 || u_data_size < 0 || v_data_size < 0
+ || hdr_size+y_data_size+u_data_size+v_data_size > slice->data_size){
av_log(avctx, AV_LOG_ERROR, "invalid plane data size\n");
return -1;
}