]> git.sesse.net Git - vlc/commitdiff
1088->1080 fix for broken HDTV encoders; could be disabled via --no-hdtv-fix
authorMarian Durkovic <md@videolan.org>
Wed, 19 Oct 2005 07:09:09 +0000 (07:09 +0000)
committerMarian Durkovic <md@videolan.org>
Wed, 19 Oct 2005 07:09:09 +0000 (07:09 +0000)
src/input/decoder.c
src/libvlc.h

index fb1f9319c6736e0665bc5b36aaf1839dbb2bf15c..43ecf076f5c3602be4bf2a49b371a8422f15731c 100644 (file)
@@ -926,10 +926,11 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
                 p_dec->fmt_out.video.i_height;
         }
 
-        if( p_dec->fmt_out.video.i_visible_height == 1088 )
+        if( p_dec->fmt_out.video.i_visible_height == 1088 &&
+            var_CreateGetBool( p_dec, "hdtv-fix" ) )
         {
-/*            p_dec->fmt_out.video.i_visible_height = 1080;  */
-            msg_Warn( p_dec, "Broken HDTV stream (display_height=1088)");
+            p_dec->fmt_out.video.i_visible_height = 1080;
+            msg_Warn( p_dec, "Fixing broken HDTV stream (display_height=1088)");
         }
 
         if( !p_dec->fmt_out.video.i_sar_num ||
index 38fbadc37cb1864b37dbc92352bec2c65e7d9fd8..68e2e9a82a22ca29b6ad771bacec56a88bd46f73 100644 (file)
@@ -288,6 +288,13 @@ static char *ppsz_align_descriptions[] =
     "aspect, or a float value (1.25, 1.3333, etc.) expressing pixel " \
     "squareness.")
 
+#define HDTV_FIX_TEXT N_("Fix HDTV height")
+#define HDTV_FIX_LONGTEXT N_( \
+    "This option allows proper handling of HDTV-1080 video format " \
+    "even if broken encoder incorrectly set height to 1088 lines. " \
+    "Disable this option only if your video has non-standard format " \
+    "requiring all 1088 lines.")
+
 #define MASPECT_RATIO_TEXT N_("Monitor aspect ratio")
 #define MASPECT_RATIO_LONGTEXT N_( \
     "This will force the monitor aspect ratio. Most monitors have a 4:3." \
@@ -1017,6 +1024,7 @@ vlc_module_begin();
                ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, VLC_FALSE );
     add_string( "monitor-aspect-ratio", "4:3", NULL,
                MASPECT_RATIO_TEXT, MASPECT_RATIO_LONGTEXT, VLC_FALSE );
+    add_bool( "hdtv-fix", 1, NULL, HDTV_FIX_TEXT, HDTV_FIX_LONGTEXT, VLC_TRUE );
     add_bool( "video-deco", 1, NULL, VIDEO_DECO_TEXT,
               VIDEO_DECO_LONGTEXT, VLC_TRUE );
     add_string( "video-title", NULL, NULL, VIDEO_TITLE_TEXT,