Add support for creating Simple Profile (I-frame only, no arithmetic coding)
authorAnuradha Suraparaju <anuradha@rd.bbc.co.uk>
Tue, 9 Sep 2008 14:47:47 +0000 (14:47 +0000)
committerDiego Biurrun <diego@biurrun.de>
Tue, 9 Sep 2008 14:47:47 +0000 (14:47 +0000)
Dirac bytestreams.  patch by Anuradha Suraparaju, anuradha rd.bbc.co uk

Originally committed as revision 15286 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/libdiracenc.c
libavcodec/libschroedingerenc.c

index ee827ce..b0de344 100644 (file)
@@ -175,9 +175,11 @@ static int libdirac_encode_init(AVCodecContext *avccontext)
     }
 
     /* Intra-only sequence */
-    if (avccontext->gop_size == 0 )
+    if (avccontext->gop_size == 0 ) {
         p_dirac_params->enc_ctx.enc_params.num_L1 = 0;
-    else
+        if (avccontext->coder_type == FF_CODER_TYPE_VLC)
+            p_dirac_params->enc_ctx.enc_params.using_ac = 0;
+    } else
         avccontext->has_b_frames = 1;
 
     if (avccontext->flags & CODEC_FLAG_QSCALE) {
index 03d9312..2d84621 100644 (file)
@@ -149,6 +149,11 @@ static int libschroedinger_encode_init(AVCodecContext *avccontext)
         schro_encoder_setting_set_double (p_schro_params->encoder,
                                           "gop_structure",
                                           SCHRO_ENCODER_GOP_INTRA_ONLY);
+
+        if (avccontext->coder_type == FF_CODER_TYPE_VLC) {
+            schro_encoder_setting_set_double (p_schro_params->encoder,
+                                              "enable_noarith", 1);
+        }
     }
     else {
         schro_encoder_setting_set_double (p_schro_params->encoder,