30 #define BITSTREAM_READER_LE
49 #define IVI5_PIC_SIZE_ESC 15
51 #define IVI5_IS_PROTECTED 0x20
93 int result, i, p, tile_size, pic_size_indx, mb_size, blk_size;
94 int quant_mat, blk_size_changed = 0;
106 if (tile_size > 256) {
117 av_log(avctx,
AV_LOG_ERROR,
"Scalability: unsupported subdivision! Luma bands: %d, chroma bands: %d\n",
154 blk_size_changed = 1;
157 for (p = 0; p <= 1; p++) {
165 mb_size = blk_size << !mb_size;
167 blk_size_changed = mb_size != band->
mb_size || blk_size != band->
blk_size;
168 if (blk_size_changed) {
179 switch ((p << 2) + i) {
216 quant_mat = (pic_conf.
luma_bands > 1) ? i+1 : 0;
261 if (blk_size_changed) {
266 "Couldn't reallocate internal structures!\n");
289 }
while (i & 0x8000);
382 if (band_flags & 1) {
396 if (band_flags & 0x10) {
405 for (i = 0; i < band->
num_corr * 2; i++)
423 if (band_flags & 0x20) {
447 int x, y, mv_x, mv_y, mv_delta, offs, mb_offset,
448 mv_scale, blks_per_mb;
570 int result, i,
t, idx1, idx2, pos;
592 for (i = 0; i < band->
num_corr; i++) {
593 idx1 = band->
corr[i*2];
594 idx2 = band->
corr[i*2+1];
625 for (i = band->
num_corr-1; i >= 0; i--) {
626 idx1 = band->
corr[i*2];
627 idx2 = band->
corr[i*2+1];
637 "Band checksum mismatch! Plane %d, band %d, received: %x, calculated: %x\n",
738 const uint8_t *buf = avpkt->
data;
739 int buf_size = avpkt->
size;
749 "Error while decoding picture header: %d\n", result);
763 for (p = 0; p < 3; p++) {
768 "Error while decoding band: %d, plane: %d\n", b, p);