From f13d4637fe9b2f10b8c103500ac9293bfca3ad1f Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Sun, 9 Nov 2008 17:34:31 -0800 Subject: [PATCH] Various cosmetics and minor fixes Disable hadamard_ac sse2/ssse3 under stack_mod4 Fix one MSVC compilation warning Fix compilation in debug mode in certain cases on x64 Remove eval.c from MSVC project Fix crash when VBV is used in CQP mode Patches by MasterNobody --- build/win32/libx264.vcproj | 34 ---------------------------------- common/pixel.c | 10 ++++++++-- common/x86/mc-c.c | 2 +- encoder/macroblock.c | 2 +- encoder/ratecontrol.c | 4 ++++ 5 files changed, 14 insertions(+), 38 deletions(-) diff --git a/build/win32/libx264.vcproj b/build/win32/libx264.vcproj index 5e7a55eb..d4036aeb 100644 --- a/build/win32/libx264.vcproj +++ b/build/win32/libx264.vcproj @@ -309,40 +309,6 @@ ProgramDataBaseFileName="obj/enc_release/"/> - - - - - - - - - - - var[PIXEL_8x8] = x264_pixel_var_8x8_sse2; pixf->intra_sad_x3_16x16 = x264_intra_sad_x3_16x16_sse2; @@ -716,7 +719,10 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf ) INIT7( satd, _ssse3 ); INIT7( satd_x3, _ssse3 ); INIT7( satd_x4, _ssse3 ); - INIT4( hadamard_ac, _ssse3 ); + if( !(cpu&X264_CPU_STACK_MOD4) ) + { + INIT4( hadamard_ac, _ssse3 ); + } INIT_ADS( _ssse3 ); pixf->sa8d[PIXEL_16x16]= x264_pixel_sa8d_16x16_ssse3; pixf->sa8d[PIXEL_8x8] = x264_pixel_sa8d_8x8_ssse3; diff --git a/common/x86/mc-c.c b/common/x86/mc-c.c index 1af512bf..73442f77 100644 --- a/common/x86/mc-c.c +++ b/common/x86/mc-c.c @@ -102,8 +102,8 @@ static void (* const x264_pixel_avg_wtab_##instr[6])( uint8_t *, int, uint8_t *, PIXEL_AVG_WTAB(mmxext, mmxext, mmxext, mmxext, mmxext, mmxext) #ifdef ARCH_X86 PIXEL_AVG_WTAB(cache32_mmxext, mmxext, cache32_mmxext, cache32_mmxext, cache32_mmxext, cache32_mmxext) -#endif PIXEL_AVG_WTAB(cache64_mmxext, mmxext, cache64_mmxext, cache64_mmxext, cache64_mmxext, cache64_mmxext) +#endif PIXEL_AVG_WTAB(sse2, mmxext, mmxext, mmxext, sse2, sse2) PIXEL_AVG_WTAB(cache64_sse2, mmxext, cache64_mmxext, cache64_sse2, cache64_sse2, cache64_sse2) diff --git a/encoder/macroblock.c b/encoder/macroblock.c index 422ed61e..eddf1ddf 100644 --- a/encoder/macroblock.c +++ b/encoder/macroblock.c @@ -679,7 +679,7 @@ void x264_macroblock_encode( x264_t *h ) * Check if the current MB could be encoded as a [PB]_SKIP (it supposes you use * the previous QP *****************************************************************************/ -int x264_macroblock_probe_skip( x264_t *h, const int b_bidir ) +int x264_macroblock_probe_skip( x264_t *h, int b_bidir ) { DECLARE_ALIGNED_16( int16_t dct4x4[4][4][4] ); DECLARE_ALIGNED_16( int16_t dct2x2[2][2] ); diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index cb188e39..cdc973ae 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -260,7 +260,11 @@ int x264_ratecontrol_new( x264_t *h ) if( h->param.rc.i_vbv_buffer_size ) { if( h->param.rc.i_rc_method == X264_RC_CQP ) + { x264_log(h, X264_LOG_WARNING, "VBV is incompatible with constant QP, ignored.\n"); + h->param.rc.i_vbv_max_bitrate = 0; + h->param.rc.i_vbv_buffer_size = 0; + } else if( h->param.rc.i_vbv_max_bitrate == 0 ) { x264_log( h, X264_LOG_DEBUG, "VBV maxrate unspecified, assuming CBR\n" ); -- 2.47.3