Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-09-05 17:23:11 +0400
committerMichael Niedermayer <michaelni@gmx.at>2002-09-05 17:23:11 +0400
commit0b61920aa7318388d1716f20b7977246a67d33eb (patch)
tree0f704d537fd272b0f23b4b7144e9edefdf1d656d /libavcodec/rv10.c
parentcfda33cbadea66854b7ff0ebf9e55ee4572e923a (diff)
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
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r--libavcodec/rv10.c18
1 files changed, 15 insertions, 3 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 */
}