From d371ca93e51ae5c6cd088700f45f35dc9303e8c0 Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Fri, 18 Feb 2011 08:46:07 -0500 Subject: [PATCH] cosmetic: remove unnecessary scope Clean up some unnecessary scoping around pick_filter_level. Change-Id: Ic57fa33e3fcae37fe6beae977e5743783399d5af --- vp8/encoder/onyx_if.c | 72 ++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 41 deletions(-) diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 0f93008..f47258d 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -4412,58 +4412,48 @@ static void encode_frame_to_data_rate else cm->frame_to_show = &cm->yv12_fb[cm->new_fb_idx]; - //#pragma omp parallel sections + if (cm->no_lpf) { + cm->filter_level = 0; + } + else + { + struct vpx_usec_timer timer; - //#pragma omp section - { - if (cm->no_lpf) - { - cm->filter_level = 0; - } - else - { - struct vpx_usec_timer timer; - - vpx_usec_timer_start(&timer); - - if (cpi->sf.auto_filter == 0) - vp8cx_pick_filter_level_fast(cpi->Source, cpi); - else - vp8cx_pick_filter_level(cpi->Source, cpi); + vpx_usec_timer_start(&timer); - vpx_usec_timer_mark(&timer); + if (cpi->sf.auto_filter == 0) + vp8cx_pick_filter_level_fast(cpi->Source, cpi); + else + vp8cx_pick_filter_level(cpi->Source, cpi); - cpi->time_pick_lpf += vpx_usec_timer_elapsed(&timer); - } + vpx_usec_timer_mark(&timer); - if (cm->filter_level > 0) - { - vp8cx_set_alt_lf_level(cpi, cm->filter_level); - vp8_loop_filter_frame(cm, &cpi->mb.e_mbd, cm->filter_level); - cm->last_filter_type = cm->filter_type; - cm->last_sharpness_level = cm->sharpness_level; - } + cpi->time_pick_lpf += vpx_usec_timer_elapsed(&timer); + } - /* Move storing frame_type out of the above loop since it is also - * needed in motion search besides loopfilter */ - cm->last_frame_type = cm->frame_type; + if (cm->filter_level > 0) + { + vp8cx_set_alt_lf_level(cpi, cm->filter_level); + vp8_loop_filter_frame(cm, &cpi->mb.e_mbd, cm->filter_level); + cm->last_filter_type = cm->filter_type; + cm->last_sharpness_level = cm->sharpness_level; + } - vp8_yv12_extend_frame_borders_ptr(cm->frame_to_show); + /* Move storing frame_type out of the above loop since it is also + * needed in motion search besides loopfilter */ + cm->last_frame_type = cm->frame_type; - if (cpi->oxcf.error_resilient_mode == 1) - { - cm->refresh_entropy_probs = 0; - } + vp8_yv12_extend_frame_borders_ptr(cm->frame_to_show); - } -//#pragma omp section - { - // build the bitstream - vp8_pack_bitstream(cpi, dest, size); - } + if (cpi->oxcf.error_resilient_mode == 1) + { + cm->refresh_entropy_probs = 0; } + // build the bitstream + vp8_pack_bitstream(cpi, dest, size); + { YV12_BUFFER_CONFIG *lst_yv12 = &cm->yv12_fb[cm->lst_fb_idx]; YV12_BUFFER_CONFIG *new_yv12 = &cm->yv12_fb[cm->new_fb_idx]; -- 2.7.4