Mercurial > libavcodec.hg
comparison vc1.c @ 4604:40cd5f7f34e7 libavcodec
WMV3 Complex Profile initial support
author | kostya |
---|---|
date | Wed, 28 Feb 2007 06:39:58 +0000 |
parents | a96d905dcbaa |
children | d4feec96fd64 |
comparison
equal
deleted
inserted
replaced
4603:3d2b2a2a664e | 4604:40cd5f7f34e7 |
---|---|
1143 { | 1143 { |
1144 VC1Context *v = avctx->priv_data; | 1144 VC1Context *v = avctx->priv_data; |
1145 | 1145 |
1146 av_log(avctx, AV_LOG_DEBUG, "Header: %0X\n", show_bits(gb, 32)); | 1146 av_log(avctx, AV_LOG_DEBUG, "Header: %0X\n", show_bits(gb, 32)); |
1147 v->profile = get_bits(gb, 2); | 1147 v->profile = get_bits(gb, 2); |
1148 if (v->profile == 2) | 1148 if (v->profile == PROFILE_COMPLEX) |
1149 { | 1149 { |
1150 av_log(avctx, AV_LOG_ERROR, "Profile value 2 is forbidden (and WMV3 Complex Profile is unsupported)\n"); | 1150 av_log(avctx, AV_LOG_ERROR, "WMV3 Complex Profile is not fully supported\n"); |
1151 return -1; | |
1152 } | 1151 } |
1153 | 1152 |
1154 if (v->profile == PROFILE_ADVANCED) | 1153 if (v->profile == PROFILE_ADVANCED) |
1155 { | 1154 { |
1156 return decode_sequence_header_adv(v, gb); | 1155 return decode_sequence_header_adv(v, gb); |
1463 if (v->postprocflag) v->postproc = get_bits(gb, 1); | 1462 if (v->postprocflag) v->postproc = get_bits(gb, 1); |
1464 } | 1463 } |
1465 else | 1464 else |
1466 if (v->multires && v->s.pict_type != B_TYPE) v->respic = get_bits(gb, 2); | 1465 if (v->multires && v->s.pict_type != B_TYPE) v->respic = get_bits(gb, 2); |
1467 | 1466 |
1467 if(v->res_x8 && (v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE)){ | |
1468 if(get_bits1(gb))return -1; | |
1469 } | |
1468 //av_log(v->s.avctx, AV_LOG_INFO, "%c Frame: QP=[%i]%i (+%i/2) %i\n", | 1470 //av_log(v->s.avctx, AV_LOG_INFO, "%c Frame: QP=[%i]%i (+%i/2) %i\n", |
1469 // (v->s.pict_type == P_TYPE) ? 'P' : ((v->s.pict_type == I_TYPE) ? 'I' : 'B'), pqindex, v->pq, v->halfpq, v->rangeredfrm); | 1471 // (v->s.pict_type == P_TYPE) ? 'P' : ((v->s.pict_type == I_TYPE) ? 'I' : 'B'), pqindex, v->pq, v->halfpq, v->rangeredfrm); |
1470 | 1472 |
1471 if(v->s.pict_type == I_TYPE || v->s.pict_type == P_TYPE) v->use_ic = 0; | 1473 if(v->s.pict_type == I_TYPE || v->s.pict_type == P_TYPE) v->use_ic = 0; |
1472 | 1474 |
3433 vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset); | 3435 vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset); |
3434 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; | 3436 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; |
3435 s->dsp.vc1_inv_trans_8x8(s->block[i]); | 3437 s->dsp.vc1_inv_trans_8x8(s->block[i]); |
3436 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; | 3438 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; |
3437 for(j = 0; j < 64; j++) s->block[i][j] += 128; | 3439 for(j = 0; j < 64; j++) s->block[i][j] += 128; |
3440 if(!v->res_fasttx && v->res_x8) for(j = 0; j < 64; j++) s->block[i][j] += 16; | |
3438 s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | 3441 s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3439 if(v->pq >= 9 && v->overlap) { | 3442 if(v->pq >= 9 && v->overlap) { |
3440 if(v->c_avail) | 3443 if(v->c_avail) |
3441 s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | 3444 s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3442 if(v->a_avail) | 3445 if(v->a_avail) |
3536 vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, (i&4)?v->codingset2:v->codingset); | 3539 vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, (i&4)?v->codingset2:v->codingset); |
3537 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; | 3540 if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; |
3538 s->dsp.vc1_inv_trans_8x8(s->block[i]); | 3541 s->dsp.vc1_inv_trans_8x8(s->block[i]); |
3539 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; | 3542 if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; |
3540 for(j = 0; j < 64; j++) s->block[i][j] += 128; | 3543 for(j = 0; j < 64; j++) s->block[i][j] += 128; |
3544 if(!v->res_fasttx && v->res_x8) for(j = 0; j < 64; j++) s->block[i][j] += 16; | |
3541 s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize); | 3545 s->dsp.put_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize); |
3542 if(v->pq >= 9 && v->overlap) { | 3546 if(v->pq >= 9 && v->overlap) { |
3543 if(v->c_avail) | 3547 if(v->c_avail) |
3544 s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); | 3548 s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2)); |
3545 if(v->a_avail) | 3549 if(v->a_avail) |