Index: source/libvpx/vp8/decoder/onyxd_if.c |
=================================================================== |
--- source/libvpx/vp8/decoder/onyxd_if.c (revision 60257) |
+++ source/libvpx/vp8/decoder/onyxd_if.c (working copy) |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (c) 2010 The VP8 project authors. All Rights Reserved. |
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
* |
* Use of this source code is governed by a BSD-style license |
* that can be found in the LICENSE file in the root of the source |
@@ -142,6 +142,10 @@ |
if (!pbi) |
return; |
+#if CONFIG_MULTITHREAD |
+ if (pbi->b_multithreaded_rd) |
+ vp8mt_de_alloc_temp_buffers(pbi, pbi->common.mb_rows); |
+#endif |
vp8_decoder_remove_threads(pbi); |
vp8_remove_common(&pbi->common); |
vpx_free(pbi); |
@@ -355,67 +359,41 @@ |
return retcode; |
} |
- if (pbi->b_multithreaded_lf && pbi->common.filter_level != 0) |
- vp8_stop_lfthread(pbi); |
- |
- if (swap_frame_buffers (cm)) |
+ if (pbi->b_multithreaded_rd && cm->multi_token_partition != ONE_PARTITION) |
{ |
- pbi->common.error.error_code = VPX_CODEC_ERROR; |
- pbi->common.error.setjmp = 0; |
- return -1; |
- } |
- |
-/* |
- if (!pbi->b_multithreaded_lf) |
+ if (swap_frame_buffers (cm)) |
+ { |
+ pbi->common.error.error_code = VPX_CODEC_ERROR; |
+ pbi->common.error.setjmp = 0; |
+ return -1; |
+ } |
+ } else |
{ |
- struct vpx_usec_timer lpftimer; |
- vpx_usec_timer_start(&lpftimer); |
- // Apply the loop filter if appropriate. |
+ if (swap_frame_buffers (cm)) |
+ { |
+ pbi->common.error.error_code = VPX_CODEC_ERROR; |
+ pbi->common.error.setjmp = 0; |
+ return -1; |
+ } |
- if (cm->filter_level > 0) |
- vp8_loop_filter_frame(cm, &pbi->mb, cm->filter_level); |
+ if(pbi->common.filter_level) |
+ { |
+ struct vpx_usec_timer lpftimer; |
+ vpx_usec_timer_start(&lpftimer); |
+ // Apply the loop filter if appropriate. |
- vpx_usec_timer_mark(&lpftimer); |
- pbi->time_loop_filtering += vpx_usec_timer_elapsed(&lpftimer); |
- }else{ |
- struct vpx_usec_timer lpftimer; |
- vpx_usec_timer_start(&lpftimer); |
- // Apply the loop filter if appropriate. |
- |
- if (cm->filter_level > 0) |
- vp8_mt_loop_filter_frame(cm, &pbi->mb, cm->filter_level); |
- |
- vpx_usec_timer_mark(&lpftimer); |
- pbi->time_loop_filtering += vpx_usec_timer_elapsed(&lpftimer); |
- } |
- if (cm->filter_level > 0) { |
- cm->last_frame_type = cm->frame_type; |
- cm->last_filter_type = cm->filter_type; |
- cm->last_sharpness_level = cm->sharpness_level; |
- } |
-*/ |
- |
- if(pbi->common.filter_level) |
- { |
- struct vpx_usec_timer lpftimer; |
- vpx_usec_timer_start(&lpftimer); |
- // Apply the loop filter if appropriate. |
- |
- if (pbi->b_multithreaded_lf && cm->multi_token_partition != ONE_PARTITION) |
- vp8_mt_loop_filter_frame(pbi); //cm, &pbi->mb, cm->filter_level); |
- else |
vp8_loop_filter_frame(cm, &pbi->mb, cm->filter_level); |
- vpx_usec_timer_mark(&lpftimer); |
- pbi->time_loop_filtering += vpx_usec_timer_elapsed(&lpftimer); |
+ vpx_usec_timer_mark(&lpftimer); |
+ pbi->time_loop_filtering += vpx_usec_timer_elapsed(&lpftimer); |
- cm->last_frame_type = cm->frame_type; |
- cm->last_filter_type = cm->filter_type; |
- cm->last_sharpness_level = cm->sharpness_level; |
+ cm->last_frame_type = cm->frame_type; |
+ cm->last_filter_type = cm->filter_type; |
+ cm->last_sharpness_level = cm->sharpness_level; |
+ } |
+ vp8_yv12_extend_frame_borders_ptr(cm->frame_to_show); |
} |
- vp8_yv12_extend_frame_borders_ptr(cm->frame_to_show); |
- |
#if 0 |
// DEBUG code |
//vp8_recon_write_yuv_frame("recon.yuv", cm->frame_to_show); |