Mercurial > libavcodec.hg
comparison h263.c @ 699:f69f9cb461bc libavcodec
automatically detect broken opendivx codec and workaround, so bug=1 shouldnt be needed anymore for mpeg4 files, if there still are files which need bug=1 then tell me ...
author | michaelni |
---|---|
date | Thu, 26 Sep 2002 22:37:33 +0000 |
parents | e050a053e259 |
children | 0fb4c66527e1 |
comparison
equal
deleted
inserted
replaced
698:e050a053e259 | 699:f69f9cb461bc |
---|---|
4145 s->new_pred=0; | 4145 s->new_pred=0; |
4146 s->reduced_res_vop= 0; | 4146 s->reduced_res_vop= 0; |
4147 } | 4147 } |
4148 | 4148 |
4149 s->scalability= get_bits1(&s->gb); | 4149 s->scalability= get_bits1(&s->gb); |
4150 if(s->workaround_bugs==1) s->scalability=0; | 4150 |
4151 if (s->scalability) { | 4151 if (s->scalability) { |
4152 GetBitContext bak= s->gb; | |
4152 int dummy= s->hierachy_type= get_bits1(&s->gb); | 4153 int dummy= s->hierachy_type= get_bits1(&s->gb); |
4153 int ref_layer_id= get_bits(&s->gb, 4); | 4154 int ref_layer_id= get_bits(&s->gb, 4); |
4154 int ref_layer_sampling_dir= get_bits1(&s->gb); | 4155 int ref_layer_sampling_dir= get_bits1(&s->gb); |
4155 int h_sampling_factor_n= get_bits(&s->gb, 5); | 4156 int h_sampling_factor_n= get_bits(&s->gb, 5); |
4156 int h_sampling_factor_m= get_bits(&s->gb, 5); | 4157 int h_sampling_factor_m= get_bits(&s->gb, 5); |
4157 int v_sampling_factor_n= get_bits(&s->gb, 5); | 4158 int v_sampling_factor_n= get_bits(&s->gb, 5); |
4158 int v_sampling_factor_m= get_bits(&s->gb, 5); | 4159 int v_sampling_factor_m= get_bits(&s->gb, 5); |
4159 s->enhancement_type= get_bits1(&s->gb); | 4160 s->enhancement_type= get_bits1(&s->gb); |
4161 | |
4162 if( h_sampling_factor_n==0 || h_sampling_factor_m==0 | |
4163 || v_sampling_factor_n==0 || v_sampling_factor_m==0 || s->workaround_bugs==1){ | |
4164 | |
4165 fprintf(stderr, "illegal scalability header (VERY broken encoder), trying to workaround\n"); | |
4166 s->scalability=0; | |
4167 | |
4168 s->gb= bak; | |
4169 goto redo; | |
4170 } | |
4171 | |
4160 // bin shape stuff FIXME | 4172 // bin shape stuff FIXME |
4161 printf("scalability not supported\n"); | 4173 printf("scalability not supported\n"); |
4162 } | 4174 } |
4163 } | 4175 } |
4164 //printf("end Data %X %d\n", show_bits(&s->gb, 32), get_bits_count(&s->gb)&0x7); | 4176 //printf("end Data %X %d\n", show_bits(&s->gb, 32), get_bits_count(&s->gb)&0x7); |