Lines Matching defs:band

70  *  - 1 wavelet band  per plane, size factor 1:1, code pattern: 3
264 * Decode Indeo 4 band header.
267 * @param[in,out] band pointer to the band descriptor
277 IVIBandDesc temp_band, *band = &temp_band;
282 if (band->plane != plane || band->band_num != band_num) {
283 av_log(avctx, AV_LOG_ERROR, "Invalid band header sequence!\n");
287 band->is_empty = get_bits1(&ctx->gb);
288 if (!band->is_empty) {
289 int old_blk_size = band->blk_size;
295 band->is_halfpel = get_bits(&ctx->gb, 2);
296 if (band->is_halfpel >= 2) {
298 band->is_halfpel);
301 if (!band->is_halfpel)
304 band->checksum_present = get_bits1(&ctx->gb);
305 if (band->checksum_present)
306 band->checksum = get_bits(&ctx->gb, 16);
313 band->mb_size = 16 >> indx;
314 band->blk_size = 8 >> (indx >> 1);
316 band->inherit_mv = get_bits1(&ctx->gb);
317 band->inherit_qdelta = get_bits1(&ctx->gb);
319 band->glob_quant = get_bits(&ctx->gb, 5);
334 if (transform_id < 10 && band->blk_size < 8) {
341 band->inv_transform = transforms[transform_id].inv_trans;
342 band->dc_transform = transforms[transform_id].dc_trans;
343 band->is_2d_trans = transforms[transform_id].is_2d_trans;
346 band->transform_size = 8;
348 band->transform_size = 4;
350 if (band->blk_size != band->transform_size) {
351 av_log(avctx, AV_LOG_ERROR, "transform and block size mismatch (%d != %d)\n", band->transform_size, band->blk_size);
361 if (band->blk_size != 4) {
365 } else if (band->blk_size != 8) {
370 band->scan = scan_index_to_tab[scan_indx];
371 band->scan_size = band->blk_size;
383 band->quant_mat = quant_mat;
385 if (old_blk_size != band->blk_size) {
387 "The band block size does not match the configuration "
392 if (quant_index_to_tab[band->quant_mat] > 4 && band->blk_size == 4) {
394 band->quant_mat = 0;
397 if (band->scan_size != band->blk_size) {
401 if (band->transform_size == 8 && band->blk_size < 8) {
414 /* select appropriate rvmap table for this band */
415 band->rvmap_sel = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 3) : 8;
418 band->num_corr = 0; /* there is no corrections */
420 band->num_corr = get_bits(&ctx->gb, 8); /* get number of correction pairs */
421 if (band->num_corr > 61) {
423 band->num_corr);
428 for (i = 0; i < band->num_corr * 2; i++)
429 band->corr[i] = get_bits(&ctx->gb, 8);
433 if (band->blk_size == 8) {
434 band->intra_base = &ivi4_quant_8x8_intra[quant_index_to_tab[band->quant_mat]][0];
435 band->inter_base = &ivi4_quant_8x8_inter[quant_index_to_tab[band->quant_mat]][0];
437 band->intra_base = &ivi4_quant_4x4_intra[quant_index_to_tab[band->quant_mat]][0];
438 band->inter_base = &ivi4_quant_4x4_inter[quant_index_to_tab[band->quant_mat]][0];
442 band->intra_scale = NULL;
443 band->inter_scale = NULL;
447 if (!band->scan) {
448 av_log(avctx, AV_LOG_ERROR, "band->scan not set\n");
452 band->blk_vlc = arg_band->blk_vlc;
453 memcpy(arg_band, band, sizeof(*arg_band));
464 * @param[in,out] band pointer to the band descriptor
469 static int decode_mb_info(IVI45DecContext *ctx, IVIBandDesc *band,
475 int row_offset = band->mb_size * band->pitch;
479 offs = tile->ypos * band->pitch + tile->xpos;
481 blks_per_mb = band->mb_size != band->blk_size ? 4 : 1;
485 mv_scale = (ctx->planes[0].bands[0].mb_size >> 3) - (band->mb_size >> 3);
488 if (((tile->width + band->mb_size-1)/band->mb_size) * ((tile->height + band->mb_size-1)/band->mb_size) != tile->num_MBs) {
489 av_log(avctx, AV_LOG_ERROR, "num_MBs mismatch %d %d %d %d\n", tile->width, tile->height, band->mb_size, tile->num_MBs);
493 for (y = tile->ypos; y < tile->ypos + tile->height; y += band->mb_size) {
496 for (x = tile->xpos; x < tile->xpos + tile->width; x += band->mb_size) {
517 if (!band->plane && !band->band_num && ctx->in_q) {
524 if (band->inherit_mv && ref_mb) {
535 if (band->inherit_mv) {
552 if (band->inherit_qdelta) {
554 } else if (mb->cbp || (!band->plane && !band->band_num &&
564 if (band->inherit_mv) {
606 s= band->is_halfpel;
608 if ( x + (mb->mv_x >>s) + (y+ (mb->mv_y >>s))*band->pitch < 0 ||
609 x + ((mb->mv_x+s)>>s) + band->mb_size - 1
610 + (y+band->mb_size - 1 +((mb->mv_y+s)>>s))*band->pitch > band->bufsize -1) {
618 mb_offset += band->mb_size;