From 6eb29353d0a64b719305555d0c2c0727e0efa797 Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Fri, 17 Apr 2009 23:38:29 -0700 Subject: [PATCH] Enable asm predict_8x8_filter I'm not entirely sure how this snuck its way out of holger's intra pred patch. --- common/predict.c | 8 ++++---- common/predict.h | 5 +---- encoder/analyse.c | 2 +- encoder/macroblock.c | 2 +- encoder/slicetype.c | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/common/predict.c b/common/predict.c index 3c6cb108..fd07ae2e 100644 --- a/common/predict.c +++ b/common/predict.c @@ -496,7 +496,7 @@ static void predict_4x4_hu( uint8_t *src ) #define PT(x) \ edge[16+x] = F2(SRC(x-1,-1), SRC(x,-1), SRC(x+1,-1)); -void x264_predict_8x8_filter( uint8_t *src, uint8_t edge[33], int i_neighbor, int i_filters ) +static void predict_8x8_filter( uint8_t *src, uint8_t edge[33], int i_neighbor, int i_filters ) { /* edge[7..14] = l7..l0 * edge[15] = lt @@ -794,7 +794,7 @@ void x264_predict_8x8c_init( int cpu, x264_predict_t pf[7] ) #endif } -void x264_predict_8x8_init( int cpu, x264_predict8x8_t pf[12], x264_predict_8x8_filter_t *predict_8x8_filter ) +void x264_predict_8x8_init( int cpu, x264_predict8x8_t pf[12], x264_predict_8x8_filter_t *predict_filter ) { pf[I_PRED_8x8_V] = predict_8x8_v; pf[I_PRED_8x8_H] = predict_8x8_h; @@ -808,10 +808,10 @@ void x264_predict_8x8_init( int cpu, x264_predict8x8_t pf[12], x264_predict_8x8_ pf[I_PRED_8x8_DC_LEFT]= predict_8x8_dc_left; pf[I_PRED_8x8_DC_TOP] = predict_8x8_dc_top; pf[I_PRED_8x8_DC_128] = predict_8x8_dc_128; - *predict_8x8_filter = x264_predict_8x8_filter; + *predict_filter = predict_8x8_filter; #ifdef HAVE_MMX - x264_predict_8x8_init_mmx( cpu, pf, predict_8x8_filter ); + x264_predict_8x8_init_mmx( cpu, pf, predict_filter ); #endif } diff --git a/common/predict.h b/common/predict.h index 630cadd1..d0210abc 100644 --- a/common/predict.h +++ b/common/predict.h @@ -106,13 +106,10 @@ enum intra8x8_pred_e I_PRED_8x8_DC_128 = 11, }; -// FIXME enforce edge alignment via uint64_t ? -void x264_predict_8x8_filter( uint8_t *src, uint8_t edge[33], int i_neighbor, int i_filters ); - void x264_predict_16x16_init ( int cpu, x264_predict_t pf[7] ); void x264_predict_8x8c_init ( int cpu, x264_predict_t pf[7] ); void x264_predict_4x4_init ( int cpu, x264_predict_t pf[12] ); -void x264_predict_8x8_init ( int cpu, x264_predict8x8_t pf[12], x264_predict_8x8_filter_t *predict_8x8_filter ); +void x264_predict_8x8_init ( int cpu, x264_predict8x8_t pf[12], x264_predict_8x8_filter_t *predict_filter ); #endif diff --git a/encoder/analyse.c b/encoder/analyse.c index f7a671ed..f9958694 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -1005,7 +1005,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a ) p_dst_by = p_dst + 8*x + 8*y*FDEC_STRIDE; predict_4x4_mode_available( h->mb.i_neighbour8[idx], predict_mode, &i_max ); - x264_predict_8x8_filter( p_dst_by, edge, h->mb.i_neighbour8[idx], ALL_NEIGHBORS ); + h->predict_8x8_filter( p_dst_by, edge, h->mb.i_neighbour8[idx], ALL_NEIGHBORS ); for( i = 0; i < i_max; i++ ) { diff --git a/encoder/macroblock.c b/encoder/macroblock.c index 86d452ab..1aa15b20 100644 --- a/encoder/macroblock.c +++ b/encoder/macroblock.c @@ -548,7 +548,7 @@ void x264_macroblock_encode( x264_t *h ) { uint8_t *p_dst = &h->mb.pic.p_fdec[0][8 * (i&1) + 8 * (i>>1) * FDEC_STRIDE]; int i_mode = h->mb.cache.intra4x4_pred_mode[x264_scan8[4*i]]; - x264_predict_8x8_filter( p_dst, edge, h->mb.i_neighbour8[i], x264_pred_i4x4_neighbors[i_mode] ); + h->predict_8x8_filter( p_dst, edge, h->mb.i_neighbour8[i], x264_pred_i4x4_neighbors[i_mode] ); if( h->mb.b_lossless ) x264_predict_lossless_8x8( h, p_dst, i, i_mode, edge ); diff --git a/encoder/slicetype.c b/encoder/slicetype.c index ddc14fa6..d8cb623c 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -217,7 +217,7 @@ lowres_intra_mb: } i_icost = X264_MIN4( satds[0], satds[1], satds[2], satds[3] ); - x264_predict_8x8_filter( pix, edge, ALL_NEIGHBORS, ALL_NEIGHBORS ); + h->predict_8x8_filter( pix, edge, ALL_NEIGHBORS, ALL_NEIGHBORS ); for( i=3; i<9; i++ ) { int satd; -- 2.40.0