comparison h263.c @ 1521:c232b6753012 libavcodec

h263 GOB decoding fix
author michael
date Sun, 12 Oct 2003 19:18:37 +0000
parents ad5461bad820
children 79dddc5cd990
comparison
equal deleted inserted replaced
1520:ad5461bad820 1521:c232b6753012
2841 * @return <0 if no resync found 2841 * @return <0 if no resync found
2842 */ 2842 */
2843 int ff_h263_resync(MpegEncContext *s){ 2843 int ff_h263_resync(MpegEncContext *s){
2844 int left, ret; 2844 int left, ret;
2845 2845
2846 if(s->codec_id==CODEC_ID_MPEG4) 2846 if(s->codec_id==CODEC_ID_MPEG4){
2847 skip_bits1(&s->gb); 2847 skip_bits1(&s->gb);
2848 2848 align_get_bits(&s->gb);
2849 align_get_bits(&s->gb); 2849 }
2850 2850
2851 if(show_bits(&s->gb, 16)==0){ 2851 if(show_bits(&s->gb, 16)==0){
2852 if(s->codec_id==CODEC_ID_MPEG4) 2852 if(s->codec_id==CODEC_ID_MPEG4)
2853 ret= mpeg4_decode_video_packet_header(s); 2853 ret= mpeg4_decode_video_packet_header(s);
2854 else 2854 else
3314 { 3314 {
3315 int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant; 3315 int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant;
3316 int16_t *mot_val; 3316 int16_t *mot_val;
3317 static int8_t quant_tab[4] = { -1, -2, 1, 2 }; 3317 static int8_t quant_tab[4] = { -1, -2, 1, 2 };
3318 const int xy= s->mb_x + s->mb_y * s->mb_stride; 3318 const int xy= s->mb_x + s->mb_y * s->mb_stride;
3319 3319
3320 if (s->pict_type == P_TYPE || s->pict_type==S_TYPE) { 3320 if (s->pict_type == P_TYPE || s->pict_type==S_TYPE) {
3321 do{ 3321 do{
3322 if (get_bits1(&s->gb)) { 3322 if (get_bits1(&s->gb)) {
3323 /* skip mb */ 3323 /* skip mb */
3324 s->mb_intra = 0; 3324 s->mb_intra = 0;