[x264-devel] Add tile format frame packing value
Anton Mitrofanov
git at videolan.org
Tue Feb 24 20:37:44 CET 2015
x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Tue Feb 3 14:51:28 2015 +0300| [0f84192e88d6adc4512f6f320a50a09b4608634c] | committer: Anton Mitrofanov
Add tile format frame packing value
Defined in 2014-02 edition.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=0f84192e88d6adc4512f6f320a50a09b4608634c
---
encoder/encoder.c | 11 ++++++++++-
x264.c | 3 ++-
x264.h | 2 +-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/encoder/encoder.c b/encoder/encoder.c
index b0a47a8..dffa356 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -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 df15e04..5c3df0f 100644
--- 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 612d048..7cc5fcc 100644
--- 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
More information about the x264-devel
mailing list