comparison mpeg12.c @ 1389:da0b3a50d209 libavcodec

rate distortion mb decision support fix decoding of old %16!=0 divx fix assertion failure in motion_est.c
author michaelni
date Tue, 29 Jul 2003 02:09:12 +0000
parents f07e17427140
children f662e9c86cf2
comparison
equal deleted inserted replaced
1388:b5c65adac96a 1389:da0b3a50d209
1922 } 1922 }
1923 1923
1924 s->resync_mb_x= s->mb_x; 1924 s->resync_mb_x= s->mb_x;
1925 s->resync_mb_y= s->mb_y = start_code; 1925 s->resync_mb_y= s->mb_y = start_code;
1926 s->mb_skip_run= 0; 1926 s->mb_skip_run= 0;
1927 ff_init_block_index(s);
1927 1928
1928 for(;;) { 1929 for(;;) {
1929 s->dsp.clear_blocks(s->block[0]); 1930 s->dsp.clear_blocks(s->block[0]);
1930 1931
1931 ret = mpeg_decode_mb(s, s->block); 1932 ret = mpeg_decode_mb(s, s->block);
1957 s->motion_val[xy + wrap][1] = motion_y; 1958 s->motion_val[xy + wrap][1] = motion_y;
1958 s->motion_val[xy + 1 + wrap][0] = motion_x; 1959 s->motion_val[xy + 1 + wrap][0] = motion_x;
1959 s->motion_val[xy + 1 + wrap][1] = motion_y; 1960 s->motion_val[xy + 1 + wrap][1] = motion_y;
1960 } 1961 }
1961 1962
1963 s->dest[0] += 16;
1964 s->dest[1] += 8;
1965 s->dest[2] += 8;
1966
1962 MPV_decode_mb(s, s->block); 1967 MPV_decode_mb(s, s->block);
1963 1968
1964 if (++s->mb_x >= s->mb_width) { 1969 if (++s->mb_x >= s->mb_width) {
1965 if(s->avctx->codec_tag == ff_get_fourcc("VCR2")) 1970 if(s->avctx->codec_tag == ff_get_fourcc("VCR2"))
1966 exchange_uv((AVFrame*)s->current_picture_ptr); 1971 exchange_uv((AVFrame*)s->current_picture_ptr);
1967 1972
1968 ff_draw_horiz_band(s, 16*s->mb_y, 16); 1973 ff_draw_horiz_band(s, 16*s->mb_y, 16);
1981 fprintf(stderr, "end missmatch left=%d\n", left); 1986 fprintf(stderr, "end missmatch left=%d\n", left);
1982 return -1; 1987 return -1;
1983 }else 1988 }else
1984 goto eos; 1989 goto eos;
1985 } 1990 }
1991
1992 ff_init_block_index(s);
1986 } 1993 }
1987 1994
1988 /* skip mb handling */ 1995 /* skip mb handling */
1989 if (s->mb_skip_run == -1) { 1996 if (s->mb_skip_run == -1) {
1990 /* read again increment */ 1997 /* read again increment */