static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band,

                           AVCodecContext *avctx)

{

    int plane, band_num, indx, transform_id, scan_indx;

    int i;



    plane    = get_bits(&ctx->gb, 2);

    band_num = get_bits(&ctx->gb, 4);

    if (band->plane != plane || band->band_num != band_num) {

        av_log(avctx, AV_LOG_ERROR, "Invalid band header sequence!\n");

        return AVERROR_INVALIDDATA;

    }



    band->is_empty = get_bits1(&ctx->gb);

    if (!band->is_empty) {

        int old_blk_size = band->blk_size;

        /* skip header size

         * If header size is not given, header size is 4 bytes. */

        if (get_bits1(&ctx->gb))

            skip_bits(&ctx->gb, 16);



        band->is_halfpel = get_bits(&ctx->gb, 2);

        if (band->is_halfpel >= 2) {

            av_log(avctx, AV_LOG_ERROR, "Invalid/unsupported mv resolution: %d!\n",

                   band->is_halfpel);

            return AVERROR_INVALIDDATA;

        }

#if IVI4_STREAM_ANALYSER

        if (!band->is_halfpel)

            ctx->uses_fullpel = 1;

#endif



        band->checksum_present = get_bits1(&ctx->gb);

        if (band->checksum_present)

            band->checksum = get_bits(&ctx->gb, 16);



        indx = get_bits(&ctx->gb, 2);

        if (indx == 3) {

            av_log(avctx, AV_LOG_ERROR, "Invalid block size!\n");

            return AVERROR_INVALIDDATA;

        }

        band->mb_size  = 16 >> indx;

        band->blk_size = 8 >> (indx >> 1);



        band->inherit_mv     = get_bits1(&ctx->gb);

        band->inherit_qdelta = get_bits1(&ctx->gb);



        band->glob_quant = get_bits(&ctx->gb, 5);



        if (!get_bits1(&ctx->gb) || ctx->frame_type == IVI4_FRAMETYPE_INTRA) {

            transform_id = get_bits(&ctx->gb, 5);

            if (transform_id >= FF_ARRAY_ELEMS(transforms) ||

                !transforms[transform_id].inv_trans) {

                avpriv_request_sample(avctx, "Transform %d", transform_id);

                return AVERROR_PATCHWELCOME;

            }

            if ((transform_id >= 7 && transform_id <= 9) ||

                 transform_id == 17) {

                avpriv_request_sample(avctx, "DCT transform");

                return AVERROR_PATCHWELCOME;

            }



#if IVI4_STREAM_ANALYSER

            if ((transform_id >= 0 && transform_id <= 2) || transform_id == 10)

                ctx->uses_haar = 1;

#endif



            band->inv_transform = transforms[transform_id].inv_trans;

            band->dc_transform  = transforms[transform_id].dc_trans;

            band->is_2d_trans   = transforms[transform_id].is_2d_trans;

            if (transform_id < 10)

                band->transform_size = 8;

            else

                band->transform_size = 4;



            if (band->blk_size != band->transform_size)

                return AVERROR_INVALIDDATA;



            scan_indx = get_bits(&ctx->gb, 4);

            if (scan_indx == 15) {

                av_log(avctx, AV_LOG_ERROR, "Custom scan pattern encountered!\n");

                return AVERROR_INVALIDDATA;

            }

            if (scan_indx > 4 && scan_indx < 10) {

                if (band->blk_size != 4)

                    return AVERROR_INVALIDDATA;

            } else if (band->blk_size != 8)

                return AVERROR_INVALIDDATA;



            band->scan = scan_index_to_tab[scan_indx];



            band->quant_mat = get_bits(&ctx->gb, 5);

            if (band->quant_mat >= FF_ARRAY_ELEMS(quant_index_to_tab)) {



                if (band->quant_mat == 31)

                    av_log(avctx, AV_LOG_ERROR,

                           "Custom quant matrix encountered!\n");

                else

                    avpriv_request_sample(avctx, "Quantization matrix %d",

                                          band->quant_mat);

                band->quant_mat = -1;

                return AVERROR_INVALIDDATA;

            }

        } else {

            if (old_blk_size != band->blk_size) {

                av_log(avctx, AV_LOG_ERROR,

                       "The band block size does not match the configuration "

                       "inherited\n");

                return AVERROR_INVALIDDATA;

            }

            if (band->quant_mat < 0) {

                av_log(avctx, AV_LOG_ERROR, "Invalid quant_mat inherited\n");

                return AVERROR_INVALIDDATA;

            }

        }



        /* decode block huffman codebook */

        if (!get_bits1(&ctx->gb))

            band->blk_vlc.tab = ctx->blk_vlc.tab;

        else

            if (ff_ivi_dec_huff_desc(&ctx->gb, 1, IVI_BLK_HUFF,

                                     &band->blk_vlc, avctx))

                return AVERROR_INVALIDDATA;



        /* select appropriate rvmap table for this band */

        band->rvmap_sel = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 3) : 8;



        /* decode rvmap probability corrections if any */

        band->num_corr = 0; /* there is no corrections */

        if (get_bits1(&ctx->gb)) {

            band->num_corr = get_bits(&ctx->gb, 8); /* get number of correction pairs */

            if (band->num_corr > 61) {

                av_log(avctx, AV_LOG_ERROR, "Too many corrections: %d\n",

                       band->num_corr);

                return AVERROR_INVALIDDATA;

            }



            /* read correction pairs */

            for (i = 0; i < band->num_corr * 2; i++)

                band->corr[i] = get_bits(&ctx->gb, 8);

        }

    }



    if (band->blk_size == 8) {

        band->intra_base = &ivi4_quant_8x8_intra[quant_index_to_tab[band->quant_mat]][0];

        band->inter_base = &ivi4_quant_8x8_inter[quant_index_to_tab[band->quant_mat]][0];

    } else {

        band->intra_base = &ivi4_quant_4x4_intra[quant_index_to_tab[band->quant_mat]][0];

        band->inter_base = &ivi4_quant_4x4_inter[quant_index_to_tab[band->quant_mat]][0];

    }



    /* Indeo 4 doesn't use scale tables */

    band->intra_scale = NULL;

    band->inter_scale = NULL;



    align_get_bits(&ctx->gb);



    return 0;

}

static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band,

                           AVCodecContext *avctx)

{

    int plane, band_num, indx, transform_id, scan_indx;

    int i;



    plane    = get_bits(&ctx->gb, 2);

    band_num = get_bits(&ctx->gb, 4);

    if (band->plane != plane || band->band_num != band_num) {

        av_log(avctx, AV_LOG_ERROR, "Invalid band header sequence!\n");

        return AVERROR_INVALIDDATA;

    }



    band->is_empty = get_bits1(&ctx->gb);

    if (!band->is_empty) {

        int old_blk_size = band->blk_size;

        



        if (get_bits1(&ctx->gb))

            skip_bits(&ctx->gb, 16);



        band->is_halfpel = get_bits(&ctx->gb, 2);

        if (band->is_halfpel >= 2) {

            av_log(avctx, AV_LOG_ERROR, "Invalid/unsupported mv resolution: %d!\n",

                   band->is_halfpel);

            return AVERROR_INVALIDDATA;

        }

#if IVI4_STREAM_ANALYSER

        if (!band->is_halfpel)

            ctx->uses_fullpel = 1;

#endif



        band->checksum_present = get_bits1(&ctx->gb);

        if (band->checksum_present)

            band->checksum = get_bits(&ctx->gb, 16);



        indx = get_bits(&ctx->gb, 2);

        if (indx == 3) {

            av_log(avctx, AV_LOG_ERROR, "Invalid block size!\n");

            return AVERROR_INVALIDDATA;

        }

        band->mb_size  = 16 >> indx;

        band->blk_size = 8 >> (indx >> 1);



        band->inherit_mv     = get_bits1(&ctx->gb);

        band->inherit_qdelta = get_bits1(&ctx->gb);



        band->glob_quant = get_bits(&ctx->gb, 5);



        if (!get_bits1(&ctx->gb) || ctx->frame_type == IVI4_FRAMETYPE_INTRA) {

            transform_id = get_bits(&ctx->gb, 5);

            if (transform_id >= FF_ARRAY_ELEMS(transforms) ||

                !transforms[transform_id].inv_trans) {

                avpriv_request_sample(avctx, "Transform %d", transform_id);

                return AVERROR_PATCHWELCOME;

            }

            if ((transform_id >= 7 && transform_id <= 9) ||

                 transform_id == 17) {

                avpriv_request_sample(avctx, "DCT transform");

                return AVERROR_PATCHWELCOME;

            }



#if IVI4_STREAM_ANALYSER

            if ((transform_id >= 0 && transform_id <= 2) || transform_id == 10)

                ctx->uses_haar = 1;

#endif



            band->inv_transform = transforms[transform_id].inv_trans;

            band->dc_transform  = transforms[transform_id].dc_trans;

            band->is_2d_trans   = transforms[transform_id].is_2d_trans;

            if (transform_id < 10)

                band->transform_size = 8;

            else

                band->transform_size = 4;



            if (band->blk_size != band->transform_size)

                return AVERROR_INVALIDDATA;



            scan_indx = get_bits(&ctx->gb, 4);

            if (scan_indx == 15) {

                av_log(avctx, AV_LOG_ERROR, "Custom scan pattern encountered!\n");

                return AVERROR_INVALIDDATA;

            }

            if (scan_indx > 4 && scan_indx < 10) {

                if (band->blk_size != 4)

                    return AVERROR_INVALIDDATA;

            } else if (band->blk_size != 8)

                return AVERROR_INVALIDDATA;



            band->scan = scan_index_to_tab[scan_indx];



            band->quant_mat = get_bits(&ctx->gb, 5);

            if (band->quant_mat >= FF_ARRAY_ELEMS(quant_index_to_tab)) {



                if (band->quant_mat == 31)

                    av_log(avctx, AV_LOG_ERROR,

                           "Custom quant matrix encountered!\n");

                else

                    avpriv_request_sample(avctx, "Quantization matrix %d",

                                          band->quant_mat);

                band->quant_mat = -1;

                return AVERROR_INVALIDDATA;

            }

        } else {

            if (old_blk_size != band->blk_size) {

                av_log(avctx, AV_LOG_ERROR,

                       "The band block size does not match the configuration "

                       "inherited\n");

                return AVERROR_INVALIDDATA;

            }

            if (band->quant_mat < 0) {

                av_log(avctx, AV_LOG_ERROR, "Invalid quant_mat inherited\n");

                return AVERROR_INVALIDDATA;

            }

        }



        

        if (!get_bits1(&ctx->gb))

            band->blk_vlc.tab = ctx->blk_vlc.tab;

        else

            if (ff_ivi_dec_huff_desc(&ctx->gb, 1, IVI_BLK_HUFF,

                                     &band->blk_vlc, avctx))

                return AVERROR_INVALIDDATA;



        

        band->rvmap_sel = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 3) : 8;



        

        band->num_corr = 0; 

        if (get_bits1(&ctx->gb)) {

            band->num_corr = get_bits(&ctx->gb, 8); 

            if (band->num_corr > 61) {

                av_log(avctx, AV_LOG_ERROR, "Too many corrections: %d\n",

                       band->num_corr);

                return AVERROR_INVALIDDATA;

            }



            

            for (i = 0; i < band->num_corr * 2; i++)

                band->corr[i] = get_bits(&ctx->gb, 8);

        }

    }



    if (band->blk_size == 8) {

        band->intra_base = &ivi4_quant_8x8_intra[quant_index_to_tab[band->quant_mat]][0];

        band->inter_base = &ivi4_quant_8x8_inter[quant_index_to_tab[band->quant_mat]][0];

    } else {

        band->intra_base = &ivi4_quant_4x4_intra[quant_index_to_tab[band->quant_mat]][0];

        band->inter_base = &ivi4_quant_4x4_inter[quant_index_to_tab[band->quant_mat]][0];

    }



    

    band->intra_scale = NULL;

    band->inter_scale = NULL;



    align_get_bits(&ctx->gb);



    return 0;

}

static int FUNC_0(IVI45DecContext *VAR_0, IVIBandDesc *VAR_1,

                           AVCodecContext *VAR_2)

{

    int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;

    int VAR_8;



    VAR_3    = get_bits(&VAR_0->gb, 2);

    VAR_4 = get_bits(&VAR_0->gb, 4);

    if (VAR_1->VAR_3 != VAR_3 || VAR_1->VAR_4 != VAR_4) {

        av_log(VAR_2, AV_LOG_ERROR, "Invalid VAR_1 header sequence!\n");

        return AVERROR_INVALIDDATA;

    }



    VAR_1->is_empty = get_bits1(&VAR_0->gb);

    if (!VAR_1->is_empty) {

        int VAR_9 = VAR_1->blk_size;

        



        if (get_bits1(&VAR_0->gb))

            skip_bits(&VAR_0->gb, 16);



        VAR_1->is_halfpel = get_bits(&VAR_0->gb, 2);

        if (VAR_1->is_halfpel >= 2) {

            av_log(VAR_2, AV_LOG_ERROR, "Invalid/unsupported mv resolution: %d!\n",

                   VAR_1->is_halfpel);

            return AVERROR_INVALIDDATA;

        }

#if IVI4_STREAM_ANALYSER

        if (!VAR_1->is_halfpel)

            VAR_0->uses_fullpel = 1;

#endif



        VAR_1->checksum_present = get_bits1(&VAR_0->gb);

        if (VAR_1->checksum_present)

            VAR_1->checksum = get_bits(&VAR_0->gb, 16);



        VAR_5 = get_bits(&VAR_0->gb, 2);

        if (VAR_5 == 3) {

            av_log(VAR_2, AV_LOG_ERROR, "Invalid block size!\n");

            return AVERROR_INVALIDDATA;

        }

        VAR_1->mb_size  = 16 >> VAR_5;

        VAR_1->blk_size = 8 >> (VAR_5 >> 1);



        VAR_1->inherit_mv     = get_bits1(&VAR_0->gb);

        VAR_1->inherit_qdelta = get_bits1(&VAR_0->gb);



        VAR_1->glob_quant = get_bits(&VAR_0->gb, 5);



        if (!get_bits1(&VAR_0->gb) || VAR_0->frame_type == IVI4_FRAMETYPE_INTRA) {

            VAR_6 = get_bits(&VAR_0->gb, 5);

            if (VAR_6 >= FF_ARRAY_ELEMS(transforms) ||

                !transforms[VAR_6].inv_trans) {

                avpriv_request_sample(VAR_2, "Transform %d", VAR_6);

                return AVERROR_PATCHWELCOME;

            }

            if ((VAR_6 >= 7 && VAR_6 <= 9) ||

                 VAR_6 == 17) {

                avpriv_request_sample(VAR_2, "DCT transform");

                return AVERROR_PATCHWELCOME;

            }



#if IVI4_STREAM_ANALYSER

            if ((VAR_6 >= 0 && VAR_6 <= 2) || VAR_6 == 10)

                VAR_0->uses_haar = 1;

#endif



            VAR_1->inv_transform = transforms[VAR_6].inv_trans;

            VAR_1->dc_transform  = transforms[VAR_6].dc_trans;

            VAR_1->is_2d_trans   = transforms[VAR_6].is_2d_trans;

            if (VAR_6 < 10)

                VAR_1->transform_size = 8;

            else

                VAR_1->transform_size = 4;



            if (VAR_1->blk_size != VAR_1->transform_size)

                return AVERROR_INVALIDDATA;



            VAR_7 = get_bits(&VAR_0->gb, 4);

            if (VAR_7 == 15) {

                av_log(VAR_2, AV_LOG_ERROR, "Custom scan pattern encountered!\n");

                return AVERROR_INVALIDDATA;

            }

            if (VAR_7 > 4 && VAR_7 < 10) {

                if (VAR_1->blk_size != 4)

                    return AVERROR_INVALIDDATA;

            } else if (VAR_1->blk_size != 8)

                return AVERROR_INVALIDDATA;



            VAR_1->scan = scan_index_to_tab[VAR_7];



            VAR_1->quant_mat = get_bits(&VAR_0->gb, 5);

            if (VAR_1->quant_mat >= FF_ARRAY_ELEMS(quant_index_to_tab)) {



                if (VAR_1->quant_mat == 31)

                    av_log(VAR_2, AV_LOG_ERROR,

                           "Custom quant matrix encountered!\n");

                else

                    avpriv_request_sample(VAR_2, "Quantization matrix %d",

                                          VAR_1->quant_mat);

                VAR_1->quant_mat = -1;

                return AVERROR_INVALIDDATA;

            }

        } else {

            if (VAR_9 != VAR_1->blk_size) {

                av_log(VAR_2, AV_LOG_ERROR,

                       "The VAR_1 block size does not match the configuration "

                       "inherited\n");

                return AVERROR_INVALIDDATA;

            }

            if (VAR_1->quant_mat < 0) {

                av_log(VAR_2, AV_LOG_ERROR, "Invalid quant_mat inherited\n");

                return AVERROR_INVALIDDATA;

            }

        }



        

        if (!get_bits1(&VAR_0->gb))

            VAR_1->blk_vlc.tab = VAR_0->blk_vlc.tab;

        else

            if (ff_ivi_dec_huff_desc(&VAR_0->gb, 1, IVI_BLK_HUFF,

                                     &VAR_1->blk_vlc, VAR_2))

                return AVERROR_INVALIDDATA;



        

        VAR_1->rvmap_sel = get_bits1(&VAR_0->gb) ? get_bits(&VAR_0->gb, 3) : 8;



        

        VAR_1->num_corr = 0; 

        if (get_bits1(&VAR_0->gb)) {

            VAR_1->num_corr = get_bits(&VAR_0->gb, 8); 

            if (VAR_1->num_corr > 61) {

                av_log(VAR_2, AV_LOG_ERROR, "Too many corrections: %d\n",

                       VAR_1->num_corr);

                return AVERROR_INVALIDDATA;

            }



            

            for (VAR_8 = 0; VAR_8 < VAR_1->num_corr * 2; VAR_8++)

                VAR_1->corr[VAR_8] = get_bits(&VAR_0->gb, 8);

        }

    }



    if (VAR_1->blk_size == 8) {

        VAR_1->intra_base = &ivi4_quant_8x8_intra[quant_index_to_tab[VAR_1->quant_mat]][0];

        VAR_1->inter_base = &ivi4_quant_8x8_inter[quant_index_to_tab[VAR_1->quant_mat]][0];

    } else {

        VAR_1->intra_base = &ivi4_quant_4x4_intra[quant_index_to_tab[VAR_1->quant_mat]][0];

        VAR_1->inter_base = &ivi4_quant_4x4_inter[quant_index_to_tab[VAR_1->quant_mat]][0];

    }



    

    VAR_1->intra_scale = NULL;

    VAR_1->inter_scale = NULL;



    align_get_bits(&VAR_0->gb);



    return 0;

}

static int FUNC_0(IVI45DecContext *VAR_0, IVIBandDesc *VAR_1,
AVCodecContext *VAR_2)
{ int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7; int VAR_8; VAR_3    = get_bits(&VAR_0->gb, 2); VAR_4 = get_bits(&VAR_0->gb, 4); if (VAR_1->VAR_3 != VAR_3 || VAR_1->VAR_4 != VAR_4) { av_log(VAR_2, AV_LOG_ERROR, "Invalid VAR_1 header sequence!\n"); return AVERROR_INVALIDDATA; } VAR_1->is_empty = get_bits1(&VAR_0->gb); if (!VAR_1->is_empty) { int VAR_9 = VAR_1->blk_size; if (get_bits1(&VAR_0->gb))
skip_bits(&VAR_0->gb, 16); VAR_1->is_halfpel = get_bits(&VAR_0->gb, 2); if (VAR_1->is_halfpel >= 2) { av_log(VAR_2, AV_LOG_ERROR, "Invalid/unsupported mv resolution: %d!\n",
VAR_1->is_halfpel); return AVERROR_INVALIDDATA; } #if IVI4_STREAM_ANALYSER
if (!VAR_1->is_halfpel)
VAR_0->uses_fullpel = 1; #endif
VAR_1->checksum_present = get_bits1(&VAR_0->gb); if (VAR_1->checksum_present)
VAR_1->checksum = get_bits(&VAR_0->gb, 16); VAR_5 = get_bits(&VAR_0->gb, 2); if (VAR_5 == 3) { av_log(VAR_2, AV_LOG_ERROR, "Invalid block size!\n"); return AVERROR_INVALIDDATA; } VAR_1->mb_size  = 16 >> VAR_5; VAR_1->blk_size = 8 >> (VAR_5 >> 1); VAR_1->inherit_mv     = get_bits1(&VAR_0->gb); VAR_1->inherit_qdelta = get_bits1(&VAR_0->gb); VAR_1->glob_quant = get_bits(&VAR_0->gb, 5); if (!get_bits1(&VAR_0->gb) || VAR_0->frame_type == IVI4_FRAMETYPE_INTRA) { VAR_6 = get_bits(&VAR_0->gb, 5); if (VAR_6 >= FF_ARRAY_ELEMS(transforms) ||
!transforms[VAR_6].inv_trans) { avpriv_request_sample(VAR_2, "Transform %d", VAR_6); return AVERROR_PATCHWELCOME; } if ((VAR_6 >= 7 && VAR_6 <= 9) ||
VAR_6 == 17) { avpriv_request_sample(VAR_2, "DCT transform"); return AVERROR_PATCHWELCOME; } #if IVI4_STREAM_ANALYSER
if ((VAR_6 >= 0 && VAR_6 <= 2) || VAR_6 == 10)
VAR_0->uses_haar = 1; #endif
VAR_1->inv_transform = transforms[VAR_6].inv_trans; VAR_1->dc_transform  = transforms[VAR_6].dc_trans; VAR_1->is_2d_trans   = transforms[VAR_6].is_2d_trans; if (VAR_6 < 10)
VAR_1->transform_size = 8; else
VAR_1->transform_size = 4; if (VAR_1->blk_size != VAR_1->transform_size)
return AVERROR_INVALIDDATA; VAR_7 = get_bits(&VAR_0->gb, 4); if (VAR_7 == 15) { av_log(VAR_2, AV_LOG_ERROR, "Custom scan pattern encountered!\n"); return AVERROR_INVALIDDATA; } if (VAR_7 > 4 && VAR_7 < 10) { if (VAR_1->blk_size != 4)
return AVERROR_INVALIDDATA; } else if (VAR_1->blk_size != 8) return AVERROR_INVALIDDATA; VAR_1->scan = scan_index_to_tab[VAR_7]; VAR_1->quant_mat = get_bits(&VAR_0->gb, 5); if (VAR_1->quant_mat >= FF_ARRAY_ELEMS(quant_index_to_tab)) { if (VAR_1->quant_mat == 31)
av_log(VAR_2, AV_LOG_ERROR,
"Custom quant matrix encountered!\n"); else
avpriv_request_sample(VAR_2, "Quantization matrix %d",
VAR_1->quant_mat); VAR_1->quant_mat = -1; return AVERROR_INVALIDDATA; } } else { if (VAR_9 != VAR_1->blk_size) { av_log(VAR_2, AV_LOG_ERROR,
"The VAR_1 block size does not match the configuration "
"inherited\n"); return AVERROR_INVALIDDATA; } if (VAR_1->quant_mat < 0) { av_log(VAR_2, AV_LOG_ERROR, "Invalid quant_mat inherited\n"); return AVERROR_INVALIDDATA; } } if (!get_bits1(&VAR_0->gb))
VAR_1->blk_vlc.tab = VAR_0->blk_vlc.tab; else
if (ff_ivi_dec_huff_desc(&VAR_0->gb, 1, IVI_BLK_HUFF,
&VAR_1->blk_vlc, VAR_2))
return AVERROR_INVALIDDATA; VAR_1->rvmap_sel = get_bits1(&VAR_0->gb) ? get_bits(&VAR_0->gb, 3) : 8; VAR_1->num_corr = 0; if (get_bits1(&VAR_0->gb)) { VAR_1->num_corr = get_bits(&VAR_0->gb, 8); if (VAR_1->num_corr > 61) { av_log(VAR_2, AV_LOG_ERROR, "Too many corrections: %d\n",
VAR_1->num_corr); return AVERROR_INVALIDDATA; } for (VAR_8 = 0; VAR_8 < VAR_1->num_corr * 2; VAR_8++) VAR_1->corr[VAR_8] = get_bits(&VAR_0->gb, 8); } } if (VAR_1->blk_size == 8) { VAR_1->intra_base = &ivi4_quant_8x8_intra[quant_index_to_tab[VAR_1->quant_mat]][0]; VAR_1->inter_base = &ivi4_quant_8x8_inter[quant_index_to_tab[VAR_1->quant_mat]][0]; } else { VAR_1->intra_base = &ivi4_quant_4x4_intra[quant_index_to_tab[VAR_1->quant_mat]][0]; VAR_1->inter_base = &ivi4_quant_4x4_inter[quant_index_to_tab[VAR_1->quant_mat]][0]; } VAR_1->intra_scale = NULL; VAR_1->inter_scale = NULL; align_get_bits(&VAR_0->gb); return 0; }