Mercurial > libavcodec.hg
comparison vp3.c @ 7038:110080ab2391 libavcodec
Remove the START_TIMER/STOP_TIMER from vp3.c, they clutter the output and
might cost CPU.
author | reimar |
---|---|
date | Mon, 09 Jun 2008 16:30:59 +0000 |
parents | 480faa9f79dd |
children | e943e1409077 |
comparison
equal
deleted
inserted
replaced
7037:480faa9f79dd | 7038:110080ab2391 |
---|---|
1785 if (!s->flipped_image) stride = -stride; | 1785 if (!s->flipped_image) stride = -stride; |
1786 | 1786 |
1787 for (y = 0; y < height; y++) { | 1787 for (y = 0; y < height; y++) { |
1788 | 1788 |
1789 for (x = 0; x < width; x++) { | 1789 for (x = 0; x < width; x++) { |
1790 START_TIMER | |
1791 /* do not perform left edge filter for left columns frags */ | 1790 /* do not perform left edge filter for left columns frags */ |
1792 if ((x > 0) && | 1791 if ((x > 0) && |
1793 (s->all_fragments[fragment].coding_method != MODE_COPY)) { | 1792 (s->all_fragments[fragment].coding_method != MODE_COPY)) { |
1794 horizontal_filter( | 1793 horizontal_filter( |
1795 plane_data + s->all_fragments[fragment].first_pixel, | 1794 plane_data + s->all_fragments[fragment].first_pixel, |
1825 plane_data + s->all_fragments[fragment + width].first_pixel, | 1824 plane_data + s->all_fragments[fragment + width].first_pixel, |
1826 stride, bounding_values); | 1825 stride, bounding_values); |
1827 } | 1826 } |
1828 | 1827 |
1829 fragment++; | 1828 fragment++; |
1830 STOP_TIMER("loop filter") | |
1831 } | 1829 } |
1832 } | 1830 } |
1833 } | 1831 } |
1834 } | 1832 } |
1835 | 1833 |
2227 } | 2225 } |
2228 | 2226 |
2229 s->current_frame.qscale_table= s->qscale_table; //FIXME allocate individual tables per AVFrame | 2227 s->current_frame.qscale_table= s->qscale_table; //FIXME allocate individual tables per AVFrame |
2230 s->current_frame.qstride= 0; | 2228 s->current_frame.qstride= 0; |
2231 | 2229 |
2232 {START_TIMER | |
2233 init_frame(s, &gb); | 2230 init_frame(s, &gb); |
2234 STOP_TIMER("init_frame")} | |
2235 | 2231 |
2236 #if KEYFRAMES_ONLY | 2232 #if KEYFRAMES_ONLY |
2237 if (!s->keyframe) { | 2233 if (!s->keyframe) { |
2238 | 2234 |
2239 memcpy(s->current_frame.data[0], s->golden_frame.data[0], | 2235 memcpy(s->current_frame.data[0], s->golden_frame.data[0], |
2244 s->current_frame.linesize[2] * s->height / 2); | 2240 s->current_frame.linesize[2] * s->height / 2); |
2245 | 2241 |
2246 } else { | 2242 } else { |
2247 #endif | 2243 #endif |
2248 | 2244 |
2249 {START_TIMER | |
2250 if (unpack_superblocks(s, &gb)){ | 2245 if (unpack_superblocks(s, &gb)){ |
2251 av_log(s->avctx, AV_LOG_ERROR, "error in unpack_superblocks\n"); | 2246 av_log(s->avctx, AV_LOG_ERROR, "error in unpack_superblocks\n"); |
2252 return -1; | 2247 return -1; |
2253 } | 2248 } |
2254 STOP_TIMER("unpack_superblocks")} | |
2255 {START_TIMER | |
2256 if (unpack_modes(s, &gb)){ | 2249 if (unpack_modes(s, &gb)){ |
2257 av_log(s->avctx, AV_LOG_ERROR, "error in unpack_modes\n"); | 2250 av_log(s->avctx, AV_LOG_ERROR, "error in unpack_modes\n"); |
2258 return -1; | 2251 return -1; |
2259 } | 2252 } |
2260 STOP_TIMER("unpack_modes")} | |
2261 {START_TIMER | |
2262 if (unpack_vectors(s, &gb)){ | 2253 if (unpack_vectors(s, &gb)){ |
2263 av_log(s->avctx, AV_LOG_ERROR, "error in unpack_vectors\n"); | 2254 av_log(s->avctx, AV_LOG_ERROR, "error in unpack_vectors\n"); |
2264 return -1; | 2255 return -1; |
2265 } | 2256 } |
2266 STOP_TIMER("unpack_vectors")} | |
2267 {START_TIMER | |
2268 if (unpack_dct_coeffs(s, &gb)){ | 2257 if (unpack_dct_coeffs(s, &gb)){ |
2269 av_log(s->avctx, AV_LOG_ERROR, "error in unpack_dct_coeffs\n"); | 2258 av_log(s->avctx, AV_LOG_ERROR, "error in unpack_dct_coeffs\n"); |
2270 return -1; | 2259 return -1; |
2271 } | 2260 } |
2272 STOP_TIMER("unpack_dct_coeffs")} | |
2273 {START_TIMER | |
2274 | 2261 |
2275 reverse_dc_prediction(s, 0, s->fragment_width, s->fragment_height); | 2262 reverse_dc_prediction(s, 0, s->fragment_width, s->fragment_height); |
2276 if ((avctx->flags & CODEC_FLAG_GRAY) == 0) { | 2263 if ((avctx->flags & CODEC_FLAG_GRAY) == 0) { |
2277 reverse_dc_prediction(s, s->fragment_start[1], | 2264 reverse_dc_prediction(s, s->fragment_start[1], |
2278 s->fragment_width / 2, s->fragment_height / 2); | 2265 s->fragment_width / 2, s->fragment_height / 2); |
2279 reverse_dc_prediction(s, s->fragment_start[2], | 2266 reverse_dc_prediction(s, s->fragment_start[2], |
2280 s->fragment_width / 2, s->fragment_height / 2); | 2267 s->fragment_width / 2, s->fragment_height / 2); |
2281 } | 2268 } |
2282 STOP_TIMER("reverse_dc_prediction")} | |
2283 {START_TIMER | |
2284 | 2269 |
2285 for (i = 0; i < s->macroblock_height; i++) | 2270 for (i = 0; i < s->macroblock_height; i++) |
2286 render_slice(s, i); | 2271 render_slice(s, i); |
2287 STOP_TIMER("render_fragments")} | 2272 |
2288 | |
2289 {START_TIMER | |
2290 apply_loop_filter(s); | 2273 apply_loop_filter(s); |
2291 STOP_TIMER("apply_loop_filter")} | |
2292 #if KEYFRAMES_ONLY | 2274 #if KEYFRAMES_ONLY |
2293 } | 2275 } |
2294 #endif | 2276 #endif |
2295 | 2277 |
2296 *data_size=sizeof(AVFrame); | 2278 *data_size=sizeof(AVFrame); |