From 1529c129b8765a0acf342da91d67cb99c743dc6a Mon Sep 17 00:00:00 2001 From: jbrjake Date: Sat, 19 Dec 2009 15:19:12 +0000 Subject: Adds a very crude, CLI-only rotation filter to flip pixels vertically (mode 1), horizontally (mode 2), or both (mode 3, default). Called with --rotate. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3036 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- test/test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test/test.c') diff --git a/test/test.c b/test/test.c index 3d5e960a9..cc7629757 100644 --- a/test/test.c +++ b/test/test.c @@ -51,6 +51,8 @@ static int detelecine = 0; static char * detelecine_opt = 0; static int decomb = 0; static char * decomb_opt = 0; +static int rotate = 0; +static char * rotate_opt = 0; static int grayscale = 0; static int vcodec = HB_VCODEC_FFMPEG; static int h264_13 = 0; @@ -1070,6 +1072,12 @@ static int HandleEvents( hb_handle_t * h ) /* Add selected filters */ job->filters = hb_list_init(); + + if( rotate ) + { + hb_filter_rotate.settings = rotate_opt; + hb_list_add( job->filters, &hb_filter_rotate); + } if( detelecine ) { hb_filter_detelecine.settings = detelecine_opt; @@ -2326,6 +2334,8 @@ static void ShowHelp() " \n" " -7, --deblock Deblock video with pp7 filter\n" " (default 5:2)\n" + " --rotate Flips images axes\n" + " (default 3)\n" " -g, --grayscale Grayscale encoding\n" "\n" @@ -2498,6 +2508,7 @@ static int ParseOptions( int argc, char ** argv ) #define SRT_OFFSET 271 #define SRT_LANG 272 #define SRT_DEFAULT 273 + #define ROTATE_FILTER 274 for( ;; ) { @@ -2544,6 +2555,7 @@ static int ParseOptions( int argc, char ** argv ) { "detelecine", optional_argument, NULL, '9' }, { "decomb", optional_argument, NULL, '5' }, { "grayscale", no_argument, NULL, 'g' }, + { "rotate", optional_argument, NULL, ROTATE_FILTER }, { "strict-anamorphic", no_argument, &anamorphic_mode, 1 }, { "loose-anamorphic", no_argument, &anamorphic_mode, 2 }, { "custom-anamorphic", no_argument, &anamorphic_mode, 3 }, @@ -2844,6 +2856,13 @@ static int ParseOptions( int argc, char ** argv ) case 'g': grayscale = 1; break; + case ROTATE_FILTER: + if( optarg != NULL ) + { + rotate_opt = strdup( optarg ); + } + rotate = 1; + break; case DISPLAY_WIDTH: if( optarg != NULL ) { -- cgit v1.2.3