comparison h264_loopfilter.c @ 11042:74f672a1f763 libavcodec

Change wraper functions to always inline, they are faster now that way. 1% faster MBAFF decoding overall, maybe ~0.1% faster for the cathedral sample.
author michael
date Thu, 28 Jan 2010 11:37:35 +0000
parents 6d74270c4f6f
children 5f712d734793
comparison
equal deleted inserted replaced
11041:6d74270c4f6f 11042:74f672a1f763
97 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, 97 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
98 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, 98 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
99 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, 99 {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
100 }; 100 };
101 101
102 static void av_noinline filter_mb_edgev( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h) { 102 static void av_always_inline filter_mb_edgev( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h) {
103 const unsigned int index_a = qp + h->slice_alpha_c0_offset; 103 const unsigned int index_a = qp + h->slice_alpha_c0_offset;
104 const int alpha = alpha_table[index_a]; 104 const int alpha = alpha_table[index_a];
105 const int beta = beta_table[qp + h->slice_beta_offset]; 105 const int beta = beta_table[qp + h->slice_beta_offset];
106 if (alpha ==0 || beta == 0) return; 106 if (alpha ==0 || beta == 0) return;
107 107
114 h->s.dsp.h264_h_loop_filter_luma(pix, stride, alpha, beta, tc); 114 h->s.dsp.h264_h_loop_filter_luma(pix, stride, alpha, beta, tc);
115 } else { 115 } else {
116 h->s.dsp.h264_h_loop_filter_luma_intra(pix, stride, alpha, beta); 116 h->s.dsp.h264_h_loop_filter_luma_intra(pix, stride, alpha, beta);
117 } 117 }
118 } 118 }
119 static void av_noinline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) { 119 static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
120 const unsigned int index_a = qp + h->slice_alpha_c0_offset; 120 const unsigned int index_a = qp + h->slice_alpha_c0_offset;
121 const int alpha = alpha_table[index_a]; 121 const int alpha = alpha_table[index_a];
122 const int beta = beta_table[qp + h->slice_beta_offset]; 122 const int beta = beta_table[qp + h->slice_beta_offset];
123 if (alpha ==0 || beta == 0) return; 123 if (alpha ==0 || beta == 0) return;
124 124
267 } 267 }
268 } 268 }
269 } 269 }
270 } 270 }
271 271
272 static void av_noinline filter_mb_edgeh( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) { 272 static void av_always_inline filter_mb_edgeh( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
273 const unsigned int index_a = qp + h->slice_alpha_c0_offset; 273 const unsigned int index_a = qp + h->slice_alpha_c0_offset;
274 const int alpha = alpha_table[index_a]; 274 const int alpha = alpha_table[index_a];
275 const int beta = beta_table[qp + h->slice_beta_offset]; 275 const int beta = beta_table[qp + h->slice_beta_offset];
276 if (alpha ==0 || beta == 0) return; 276 if (alpha ==0 || beta == 0) return;
277 277
285 } else { 285 } else {
286 h->s.dsp.h264_v_loop_filter_luma_intra(pix, stride, alpha, beta); 286 h->s.dsp.h264_v_loop_filter_luma_intra(pix, stride, alpha, beta);
287 } 287 }
288 } 288 }
289 289
290 static void av_noinline filter_mb_edgech( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) { 290 static void av_always_inline filter_mb_edgech( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
291 const unsigned int index_a = qp + h->slice_alpha_c0_offset; 291 const unsigned int index_a = qp + h->slice_alpha_c0_offset;
292 const int alpha = alpha_table[index_a]; 292 const int alpha = alpha_table[index_a];
293 const int beta = beta_table[qp + h->slice_beta_offset]; 293 const int beta = beta_table[qp + h->slice_beta_offset];
294 if (alpha ==0 || beta == 0) return; 294 if (alpha ==0 || beta == 0) return;
295 295