printf("read_quant_table error\n");
av_log(f->avctx, AV_LOG_ERROR, "read_quant_table error\n");
static int read_header(FFV1Context *f){    uint8_t state[CONTEXT_SIZE]={0};    int i, context_count;    CABACContext * const c= &f->c;        f->version= get_symbol(c, state, 0, 7);    f->ac= f->avctx->coder_type= get_symbol(c, state, 0, 7);    f->colorspace= get_symbol(c, state, 0, 7); //YUV cs type    get_cabac(c, state); //no chroma = false    f->chroma_h_shift= get_symbol(c, state, 0, 7);    f->chroma_v_shift= get_symbol(c, state, 0, 7);    get_cabac(c, state); //transparency plane    f->plane_count= 2;    if(f->colorspace==0){        switch(16*f->chroma_h_shift + f->chroma_v_shift){        case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P; break;        case 0x10: f->avctx->pix_fmt= PIX_FMT_YUV422P; break;        case 0x11: f->avctx->pix_fmt= PIX_FMT_YUV420P; break;        case 0x20: f->avctx->pix_fmt= PIX_FMT_YUV411P; break;        case 0x33: f->avctx->pix_fmt= PIX_FMT_YUV410P; break;        default:            fprintf(stderr, "format not supported\n");            return -1;        }    }else if(f->colorspace==1){        if(f->chroma_h_shift || f->chroma_v_shift){            fprintf(stderr, "chroma subsampling not supported in this colorspace\n");            return -1;        }        f->avctx->pix_fmt= PIX_FMT_RGBA32;    }else{        fprintf(stderr, "colorspace not supported\n");        return -1;    }//printf("%d %d %d\n", f->chroma_h_shift, f->chroma_v_shift,f->avctx->pix_fmt);    context_count=1;    for(i=0; i<5; i++){        context_count*= read_quant_table(c, f->quant_table[i], context_count);        if(context_count < 0){            printf("read_quant_table error\n");            return -1;        }    }    context_count= (context_count+1)/2;        for(i=0; i<f->plane_count; i++){        PlaneContext * const p= &f->plane[i];        p->context_count= context_count;        if(f->ac){            if(!p->state) p->state= av_malloc(CONTEXT_SIZE*p->context_count*sizeof(uint8_t));        }else{            if(!p->vlc_state) p->vlc_state= av_malloc(p->context_count*sizeof(VlcState));        }    }        return 0;}