Skip to content
Browse files

AviSynth 16bit hack

  • Loading branch information...
1 parent bd9310e commit fe45b496464a77b2ae4d6cf4a3c46ce5444e4368 @SAPikachu SAPikachu committed with
Showing with 8 additions and 0 deletions.
  1. +8 −0 input/avs.c
View
8 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;
}

0 comments on commit fe45b49

Please sign in to comment.
Something went wrong with that request. Please try again.