diff options
author | John Koleszar <jkoleszar@google.com> | 2011-02-18 08:46:07 -0500 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2011-02-18 08:46:07 -0500 |
commit | d371ca93e51ae5c6cd088700f45f35dc9303e8c0 (patch) | |
tree | 85530c8f983fc3fa9e0d040b962ccbca0efc00e6 /vp8/encoder/onyx_if.c | |
parent | 597d02b5081d1f21740a25ee68c898b68a57654b (diff) | |
download | libvpx-d371ca93e51ae5c6cd088700f45f35dc9303e8c0.tar libvpx-d371ca93e51ae5c6cd088700f45f35dc9303e8c0.tar.gz libvpx-d371ca93e51ae5c6cd088700f45f35dc9303e8c0.tar.bz2 libvpx-d371ca93e51ae5c6cd088700f45f35dc9303e8c0.zip |
cosmetic: remove unnecessary scope
Clean up some unnecessary scoping around pick_filter_level.
Change-Id: Ic57fa33e3fcae37fe6beae977e5743783399d5af
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r-- | vp8/encoder/onyx_if.c | 72 |
1 files changed, 31 insertions, 41 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 0f93008ea..f47258d8c 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]; |