|
|
|
@ -1859,7 +1859,11 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n |
|
|
|
|
s->quant_precision=5; |
|
|
|
|
put_bits(&s->pb, 1, 0); /* not 8 bit == false */ |
|
|
|
|
put_bits(&s->pb, 1, s->mpeg_quant); /* quant type= (0=h263 style)*/ |
|
|
|
|
if(s->mpeg_quant) put_bits(&s->pb, 2, 0); /* no custom matrixes */ |
|
|
|
|
|
|
|
|
|
if(s->mpeg_quant){ |
|
|
|
|
ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix); |
|
|
|
|
ff_write_quant_matrix(&s->pb, s->avctx->inter_matrix); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (vo_ver_id != 1) |
|
|
|
|
put_bits(&s->pb, 1, s->quarter_sample); |
|
|
|
@ -4551,14 +4555,15 @@ static int decode_vol_header(MpegEncContext *s, GetBitContext *gb){ |
|
|
|
|
skip_bits(gb, 4); //video_object_layer_shape_extension
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
skip_bits1(gb); /* marker */ |
|
|
|
|
check_marker(gb, "before time_increment_resolution"); |
|
|
|
|
|
|
|
|
|
s->time_increment_resolution = get_bits(gb, 16); |
|
|
|
|
|
|
|
|
|
s->time_increment_bits = av_log2(s->time_increment_resolution - 1) + 1; |
|
|
|
|
if (s->time_increment_bits < 1) |
|
|
|
|
s->time_increment_bits = 1; |
|
|
|
|
skip_bits1(gb); /* marker */ |
|
|
|
|
|
|
|
|
|
check_marker(gb, "before fixed_vop_rate"); |
|
|
|
|
|
|
|
|
|
if (get_bits1(gb) != 0) { /* fixed_vop_rate */ |
|
|
|
|
skip_bits(gb, s->time_increment_bits); |
|
|
|
@ -4648,8 +4653,8 @@ static int decode_vol_header(MpegEncContext *s, GetBitContext *gb){ |
|
|
|
|
/* replicate last value */ |
|
|
|
|
for(; i<64; i++){ |
|
|
|
|
int j= s->dsp.idct_permutation[ ff_zigzag_direct[i] ]; |
|
|
|
|
s->intra_matrix[j]= v; |
|
|
|
|
s->chroma_intra_matrix[j]= v; |
|
|
|
|
s->intra_matrix[j]= last; |
|
|
|
|
s->chroma_intra_matrix[j]= last; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4842,7 +4847,10 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ |
|
|
|
|
printf("my guess is %d bits ;)\n",s->time_increment_bits); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
time_increment= get_bits(gb, s->time_increment_bits); |
|
|
|
|
if(IS_3IV1) time_increment= get_bits1(gb); //FIXME investigate further
|
|
|
|
|
else time_increment= get_bits(gb, s->time_increment_bits); |
|
|
|
|
|
|
|
|
|
// printf("%d %X\n", s->time_increment_bits, time_increment);
|
|
|
|
|
//printf(" type:%d modulo_time_base:%d increment:%d\n", s->pict_type, time_incr, time_increment);
|
|
|
|
|
if(s->pict_type!=B_TYPE){ |
|
|
|
|
s->last_time_base= s->time_base; |
|
|
|
|