Created
August 1, 2011 07:18
-
-
Save SAPikachu/1117711 to your computer and use it in GitHub Desktop.
x264 avisynth 16bit hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input/avs.c | 8 ++++++++ | |
1 files changed, 8 insertions(+), 0 deletions(-) | |
diff --git a/input/avs.c b/input/avs.c | |
index 59fab8c..373fa68 100644 | |
--- a/input/avs.c | |
+++ b/input/avs.c | |
@@ -267,6 +267,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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment