[FFmpeg-soc] [soc]: r1321 - dirac/libavcodec/dirac.c

marco subversion at mplayerhq.hu
Sun Sep 9 17:07:51 CEST 2007


Author: marco
Date: Sun Sep  9 17:07:51 2007
New Revision: 1321

Log:
switch reference frames every 5 frames

Modified:
   dirac/libavcodec/dirac.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Sun Sep  9 17:07:51 2007
@@ -3686,6 +3686,7 @@ static int encode_frame(AVCodecContext *
     unsigned char *dst = &buf[5];
     int reference;
     int size;
+    static int intercnt = 0;
 
     reference = (s->next_parse_code & 0x04) == 0x04;
     s->refs   = s->next_parse_code & 0x03;
@@ -3709,6 +3710,10 @@ static int encode_frame(AVCodecContext *
         s->ref[0] = s->refframes[0].frame.display_picture_number;
         dirac_encode_parse_info(s, 0x09);
         dirac_encode_frame(s);
+        if (++intercnt == 5) {
+            s->next_parse_code = 0x0C;
+            intercnt = 0;
+        }
     }
 
     if (reference) {



More information about the FFmpeg-soc mailing list