[x264-devel] commit: Various cosmetics and minor fixes (Jason Garrett-Glaser )

git version control git at videolan.org
Mon Nov 10 02:41:09 CET 2008


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Sun Nov  9 17:34:31 2008 -0800| [f13d4637fe9b2f10b8c103500ac9293bfca3ad1f] | committer: Jason Garrett-Glaser 

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

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=f13d4637fe9b2f10b8c103500ac9293bfca3ad1f
---

 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 5e7a55e..d4036ae 100644
--- a/build/win32/libx264.vcproj
+++ b/build/win32/libx264.vcproj
@@ -310,40 +310,6 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\encoder\eval.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-						ObjectFile=".\obj/enc_release/"
-						ProgramDataBaseFileName="obj/enc_release/"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						ObjectFile=".\obj/enc_debug/"
-						ProgramDataBaseFileName="obj/enc_debug/"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release64|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-						ObjectFile=".\obj/enc_release/"
-						ProgramDataBaseFileName="obj/enc_release/"/>
-				</FileConfiguration>
-			</File>
-			<File
 				RelativePath="..\..\encoder\macroblock.c">
 				<FileConfiguration
 					Name="Release|Win32">
diff --git a/common/pixel.c b/common/pixel.c
index cf6ae03..6895414 100644
--- a/common/pixel.c
+++ b/common/pixel.c
@@ -674,7 +674,10 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         INIT2( sad, _sse2 );
         INIT2( sad_x3, _sse2 );
         INIT2( sad_x4, _sse2 );
-        INIT4( hadamard_ac, _sse2 );
+        if( !(cpu&X264_CPU_STACK_MOD4) )
+        {
+            INIT4( hadamard_ac, _sse2 );
+        }
         INIT_ADS( _sse2 );
         pixf->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 1af512b..73442f7 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 422ed61..eddf1dd 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 cb188e3..cdc973a 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" );



More information about the x264-devel mailing list