]> git.sesse.net Git - vlc/commitdiff
* x264: added aspect support.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 23 Apr 2004 19:00:06 +0000 (19:00 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 23 Apr 2004 19:00:06 +0000 (19:00 +0000)
 * transcode: added H264 codec id.
 * demux: added h264 demux shortcut.

modules/codec/x264.c
modules/demux/demux2.c
modules/stream_out/transcode.c

index 3a9467afd34e7abd43c947f9d1be0e56acef9199..686f20b270a13a9011ae0ed1c579c991b4a9f5a1 100644 (file)
@@ -2,7 +2,7 @@
  * x264.c: h264 video encoder
  *****************************************************************************
  * Copyright (C) 2004 VideoLAN
- * $Id: encoder.c 7342 2004-04-13 14:13:07Z gbazin $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -38,7 +38,7 @@ static void Close( vlc_object_t * );
 
 vlc_module_begin();
     set_description( _("h264 video encoder using x264 library"));
-    set_capability( "encoder", 10 );
+    set_capability( "encoder", 200 );
     set_callbacks( Open, Close );
 vlc_module_end();
 
@@ -100,9 +100,11 @@ static int  Open ( vlc_object_t *p_this )
 
     if( p_enc->fmt_in.video.i_aspect > 0 )
     {
-        /* TODO */
-        p_sys->param.vui.i_sar_width = 0;
-        p_sys->param.vui.i_sar_height = 0;
+        p_sys->param.vui.i_sar_width = p_enc->fmt_in.video.i_aspect *
+                                       p_enc->fmt_in.video.i_height *
+                                       p_enc->fmt_in.video.i_height /
+                                       p_enc->fmt_in.video.i_width;
+        p_sys->param.vui.i_sar_height = p_enc->fmt_in.video.i_height;
     }
     if( p_enc->fmt_in.video.i_frame_rate_base > 0 )
     {
index 1a363d5600c66489553a5c9d8bdd1887efbd0067..3f22ab48a3a07cf02d3bc7af6af11347cf49f9c2 100644 (file)
@@ -65,6 +65,7 @@ vlc_module_begin();
     add_shortcut( "mpgv" );
     add_shortcut( "rawdv" );
     add_shortcut( "ogg" );
+    add_shortcut( "h264" );
 vlc_module_end();
 
 /*****************************************************************************
index 12b3b591328b7e1c998cbc35687f95b24d636896..fa022c1d7990524a9a8ed706665b132330cb20a9 100644 (file)
@@ -631,6 +631,7 @@ static struct
     { VLC_FOURCC( 'S', 'V', 'Q', '1' ), CODEC_ID_SVQ1 },
 #if LIBAVCODEC_BUILD >= 4666
     { VLC_FOURCC( 'S', 'V', 'Q', '3' ), CODEC_ID_SVQ3 },
+    { VLC_FOURCC( 'h', '2', '6', '4' ), CODEC_ID_H264 },
 #endif
 
     /* raw video code, only used for 'encoding' */