diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-09-05 13:23:11 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-09-05 13:23:11 +0000 |
commit | 0b61920aa7318388d1716f20b7977246a67d33eb (patch) | |
tree | 0f704d537fd272b0f23b4b7144e9edefdf1d656d | |
parent | cfda33cbadea66854b7ff0ebf9e55ee4572e923a (diff) | |
download | ffmpeg-0b61920aa7318388d1716f20b7977246a67d33eb.tar.gz |
fixing rv10 encoding (ffmpeg can at least decode its own rv10 files now)
Originally committed as revision 907 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/rv10.c | 18 | ||||
-rw-r--r-- | tests/ffmpeg.regression.ref | 4 |
2 files changed, 17 insertions, 5 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 0e75f4e440..72a412eb5e 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -223,8 +223,18 @@ int rv_decode_dc(MpegEncContext *s, int n) /* write RV 1.0 compatible frame header */ void rv10_encode_picture_header(MpegEncContext *s, int picture_number) { + int full_frame= 1; + align_put_bits(&s->pb); + + if(full_frame){ + put_bits(&s->pb, 8, 0xc0); /* packet header */ + put_bits(&s->pb, 16, 0x4000); /* len */ + put_bits(&s->pb, 16, 0x4000); /* pos */ + } + put_bits(&s->pb, 8, picture_number&0xFF); + put_bits(&s->pb, 1, 1); /* marker */ put_bits(&s->pb, 1, (s->pict_type == P_TYPE)); @@ -238,9 +248,11 @@ void rv10_encode_picture_header(MpegEncContext *s, int picture_number) } /* if multiple packets per frame are sent, the position at which to display the macro blocks is coded here */ - put_bits(&s->pb, 6, 0); /* mb_x */ - put_bits(&s->pb, 6, 0); /* mb_y */ - put_bits(&s->pb, 12, s->mb_width * s->mb_height); + if(!full_frame){ + put_bits(&s->pb, 6, 0); /* mb_x */ + put_bits(&s->pb, 6, 0); /* mb_y */ + put_bits(&s->pb, 12, s->mb_width * s->mb_height); + } put_bits(&s->pb, 3, 0); /* ignored */ } diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref index a94025f6b0..d4134564d0 100644 --- a/tests/ffmpeg.regression.ref +++ b/tests/ffmpeg.regression.ref @@ -9,8 +9,8 @@ c1f6c8ee7a24d8345deddf1a24ca3756 *./data/out.yuv 145c98a175e760f8ba1997edf15b2964 *./data/out.yuv 3ad5ac82d92157d2483ab007fb0a8881 *./data/a-mjpeg.avi 278033451d7a6bfeb8339abbe4228499 *./data/out.yuv -ccbf683d781fa3cdfa18b618731fc74b *./data/a-rv10.rm -c4402129ece7bef30c034ef293d86104 *./data/out.yuv +202adaf59c09d703b55fc7dd95eace25 *./data/a-rv10.rm +c1f6c8ee7a24d8345deddf1a24ca3756 *./data/out.yuv 21f8ff9f1daacd9133683bb4ea0f50a4 *./data/a-mp2.mp2 116d1290ba1b4eb98fdee52e423417b1 *./data/out.wav 048b9c3444c788bac6ce5cc3a8f4db00 *./data/a-ac3.rm |