Commit 30b3825e authored by Fiona Glaser's avatar Fiona Glaser

Fix miscompilation with gcc 4.3 on ARM

Aliasing violation in spatial prediction caused nasty artifacts.
Shut up two other GCC warnings while we're at it.
parent d2e7a5a6
......@@ -259,11 +259,17 @@ static int x264_mb_predict_mv_direct16x16_spatial( x264_t *h )
if( ref[0] >= 0 )
x264_mb_predict_mv_16x16( h, 0, ref[0], mv[0] );
else
*(uint32_t*)mv[0] = 0;
{
mv[0][0] = 0;
mv[0][1] = 0;
}
if( ref[1] >= 0 )
x264_mb_predict_mv_16x16( h, 1, ref[1], mv[1] );
else
*(uint32_t*)mv[1] = 0;
{
mv[1][0] = 0;
mv[1][1] = 0;
}
x264_macroblock_cache_ref( h, 0, 0, 4, 4, 0, ref[0] );
x264_macroblock_cache_ref( h, 0, 0, 4, 4, 1, ref[1] );
......
......@@ -236,7 +236,7 @@ static const int i_sub_mb_p_cost_table[4] = {
static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a );
static uint16_t x264_cost_ref[92][3][33];
static x264_pthread_mutex_t cost_ref_mutex = X264_PTHREAD_MUTEX_INITIALIZER;
static UNUSED x264_pthread_mutex_t cost_ref_mutex = X264_PTHREAD_MUTEX_INITIALIZER;
int x264_analyse_init_costs( x264_t *h, int qp )
{
......@@ -1101,7 +1101,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
{
uint64_t pels_h = 0;
uint8_t pels_v[7];
uint16_t i_nnz[2];
uint16_t i_nnz[2] = {0}; //shut up gcc
uint8_t *p_dst_by;
int j;
int cbp_luma_new = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment