From fe45b496464a77b2ae4d6cf4a3c46ce5444e4368 Mon Sep 17 00:00:00 2001 From: SAPikachu Date: Sun, 25 Dec 2011 15:27:55 +0000 Subject: [PATCH] AviSynth 16bit hack --- input/avs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/input/avs.c b/input/avs.c index 62f006e4f..cba2bd510 100644 --- a/input/avs.c +++ b/input/avs.c @@ -314,6 +314,14 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c info->csp = X264_CSP_NONE; info->vfr = 0; + if( opt->bit_depth > 8 ) + { + FAIL_IF_ERROR( info->width & 3, "avisynth 16bit hack requires that width is at least mod4\n" ) + x264_cli_log( "avs", X264_LOG_INFO, "avisynth 16bit hack enabled\n" ); + info->csp |= X264_CSP_HIGH_DEPTH; + info->width >>= 1; + } + *p_handle = h; return 0; }