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

marco subversion at mplayerhq.hu
Sun Sep 9 14:53:35 CEST 2007


Author: marco
Date: Sun Sep  9 14:53:35 2007
New Revision: 1315

Log:
add debugging information about how the frame will be encoded

Modified:
   dirac/libavcodec/dirac.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Sun Sep  9 14:53:35 2007
@@ -3672,10 +3672,14 @@ static int encode_frame(AVCodecContext *
     DiracContext *s = avctx->priv_data;
     AVFrame *picture = data;
     unsigned char *dst = &buf[5];
-    int reference = 0;
+    int reference;
     int size;
 
-    dprintf(avctx, "Encoding frame %p size=%d\n", buf, buf_size);
+    reference = (s->next_parse_code & 0x04) == 0x04;
+    s->refs   = s->next_parse_code & 0x03;
+
+    dprintf(avctx, "Encoding frame %p size=%d of type=%02X isref=%d refs=%d\n",
+            buf, buf_size, s->next_parse_code, reference, s->refs);
 
     init_put_bits(&s->pb, buf, buf_size);
     s->avctx = avctx;
@@ -3686,13 +3690,10 @@ static int encode_frame(AVCodecContext *
         dirac_encode_access_unit_header(s);
         s->next_parse_code = 0x0C;
     } else if (s->next_parse_code == 0x0C) {
-        s->refs = 0;
-        reference = 1;
         dirac_encode_parse_info(s, 0x0C);
         dirac_encode_frame(s);
         s->next_parse_code = 0x0C; /* XXX: Disabled inter frames.  */
     } else if (s->next_parse_code == 0x09) {
-        s->refs = 1;
         s->ref[0] = s->refframes[0].frame.display_picture_number;
         dirac_encode_parse_info(s, 0x00);
         dirac_encode_frame(s);



More information about the FFmpeg-soc mailing list