]> git.sesse.net Git - x264/commitdiff
Add tile format frame packing value
authorAnton Mitrofanov <BugMaster@narod.ru>
Tue, 3 Feb 2015 11:51:28 +0000 (14:51 +0300)
committerAnton Mitrofanov <BugMaster@narod.ru>
Mon, 23 Feb 2015 17:09:32 +0000 (20:09 +0300)
Defined in 2014-02 edition.

encoder/encoder.c
x264.c
x264.h

index b0a47a865f283421a81f1ce8301d1af436e7d591..dffa35603be8fe0dff3c011db6966d6a9fdfb536 100644 (file)
@@ -591,11 +591,20 @@ static int x264_validate_parameters( x264_t *h, int b_open )
         h->param.i_dpb_size = 1;
     }
 
-    if( h->param.i_frame_packing < -1 || h->param.i_frame_packing > 6 )
+    if( h->param.i_frame_packing < -1 || h->param.i_frame_packing > 7 )
     {
         x264_log( h, X264_LOG_WARNING, "ignoring unknown frame packing value\n" );
         h->param.i_frame_packing = -1;
     }
+    if( h->param.i_frame_packing == 7 &&
+        ((h->param.i_width - h->param.crop_rect.i_left - h->param.crop_rect.i_right)  % 3 ||
+         (h->param.i_height - h->param.crop_rect.i_top - h->param.crop_rect.i_bottom) % 3) )
+    {
+        x264_log( h, X264_LOG_ERROR, "cropped resolution %dx%d not compatible with tile format frame packing\n",
+                  h->param.i_width - h->param.crop_rect.i_left - h->param.crop_rect.i_right,
+                  h->param.i_height - h->param.crop_rect.i_top - h->param.crop_rect.i_bottom );
+        return -1;
+    }
 
     /* Detect default ffmpeg settings and terminate with an error. */
     if( b_open )
diff --git a/x264.c b/x264.c
index df15e04f0d7b521b2a7f69f47127fc5dc1d0520b..5c3df0f9c2f397bccb88c5b961c75b2d2ec54e63 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -704,7 +704,8 @@ static void help( x264_param_t *defaults, int longhelp )
         "                                  - 3: side by side - L is on the left, R on the right\n"
         "                                  - 4: top bottom - L is on top, R on bottom\n"
         "                                  - 5: frame alternation - one view per frame\n"
-        "                                  - 6: mono - 2D frame without any frame packing\n" );
+        "                                  - 6: mono - 2D frame without any frame packing\n"
+        "                                  - 7: tile format - L is on top-left, R split across\n" );
     H0( "\n" );
     H0( "Ratecontrol:\n" );
     H0( "\n" );
diff --git a/x264.h b/x264.h
index 612d0488f87bccd670a107811f117343ff055375..7cc5fccf9cddeea74c6496d01924ae25dcd03f5b 100644 (file)
--- a/x264.h
+++ b/x264.h
@@ -41,7 +41,7 @@
 
 #include "x264_config.h"
 
-#define X264_BUILD 145
+#define X264_BUILD 146
 
 /* Application developers planning to link against a shared library version of
  * libx264 from a Microsoft Visual Studio or similar development environment