mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
- Bug fix on MV prediction for MPEG4 caused by new H.263 GOB code.
Originally committed as revision 215 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
102d39088b
commit
8547282b6c
@ -782,11 +782,11 @@ int h263_decode_mb(MpegEncContext *s,
|
|||||||
unsigned int gfid;
|
unsigned int gfid;
|
||||||
|
|
||||||
/* Check for GOB Start Code */
|
/* Check for GOB Start Code */
|
||||||
|
if (s->mb_x == 0) {
|
||||||
val = show_bits(&s->gb, 16);
|
val = show_bits(&s->gb, 16);
|
||||||
|
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
/* We have a GBSC probably with GSTUFF */
|
/* We have a GBSC probably with GSTUFF */
|
||||||
//skip_bits(&s->gb, 16); /* Drop the zeros */
|
skip_bits(&s->gb, 16); /* Drop the zeros */
|
||||||
while (get_bits1(&s->gb) == 0); /* Seek the '1' bit */
|
while (get_bits1(&s->gb) == 0); /* Seek the '1' bit */
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr,"\nGOB Start Code at MB %d\n",
|
fprintf(stderr,"\nGOB Start Code at MB %d\n",
|
||||||
@ -799,12 +799,15 @@ int h263_decode_mb(MpegEncContext *s,
|
|||||||
fprintf(stderr, "\nGN: %u GFID: %u Quant: %u\n", gn, gfid, s->qscale);
|
fprintf(stderr, "\nGN: %u GFID: %u Quant: %u\n", gn, gfid, s->qscale);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
/* FIXME: In the future H.263+ will have intra prediction */
|
||||||
|
/* and we are gonna need another way to detect MPEG4 */
|
||||||
|
if (!s->h263_pred) {
|
||||||
if (s->mb_y == s->gob_number)
|
if (s->mb_y == s->gob_number)
|
||||||
s->first_gob_line = 1;
|
s->first_gob_line = 1;
|
||||||
else
|
else
|
||||||
s->first_gob_line = 0;
|
s->first_gob_line = 0;
|
||||||
|
}
|
||||||
if (s->pict_type == P_TYPE) {
|
if (s->pict_type == P_TYPE) {
|
||||||
if (get_bits1(&s->gb)) {
|
if (get_bits1(&s->gb)) {
|
||||||
/* skip mb */
|
/* skip mb */
|
||||||
@ -1215,9 +1218,8 @@ int h263_decode_picture_header(MpegEncContext *s)
|
|||||||
skip_bits1(&s->gb); /* camera off */
|
skip_bits1(&s->gb); /* camera off */
|
||||||
skip_bits1(&s->gb); /* freeze picture release off */
|
skip_bits1(&s->gb); /* freeze picture release off */
|
||||||
|
|
||||||
/* Reset GOB data */
|
/* Reset GOB number */
|
||||||
s->gob_number = 0;
|
s->gob_number = 0;
|
||||||
s->first_gob_line = 0;
|
|
||||||
|
|
||||||
format = get_bits(&s->gb, 3);
|
format = get_bits(&s->gb, 3);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user