OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 cm->postproc_state.prev_mip = cm->mip; | 625 cm->postproc_state.prev_mip = cm->mip; |
626 cm->mip = temp; | 626 cm->mip = temp; |
627 | 627 |
628 // Update the upper left visible macroblock ptrs. | 628 // Update the upper left visible macroblock ptrs. |
629 cm->mi = cm->mip + cm->mi_stride + 1; | 629 cm->mi = cm->mip + cm->mi_stride + 1; |
630 cm->postproc_state.prev_mi = cm->postproc_state.prev_mip + cm->mi_stride + 1; | 630 cm->postproc_state.prev_mi = cm->postproc_state.prev_mip + cm->mi_stride + 1; |
631 } | 631 } |
632 | 632 |
633 int vp9_post_proc_frame(struct VP9Common *cm, | 633 int vp9_post_proc_frame(struct VP9Common *cm, |
634 YV12_BUFFER_CONFIG *dest, vp9_ppflags_t *ppflags) { | 634 YV12_BUFFER_CONFIG *dest, vp9_ppflags_t *ppflags) { |
635 const int q = MIN(63, cm->lf.filter_level * 10 / 6); | 635 const int q = MIN(105, cm->lf.filter_level * 2); |
636 const int flags = ppflags->post_proc_flag; | 636 const int flags = ppflags->post_proc_flag; |
637 YV12_BUFFER_CONFIG *const ppbuf = &cm->post_proc_buffer; | 637 YV12_BUFFER_CONFIG *const ppbuf = &cm->post_proc_buffer; |
638 struct postproc_state *const ppstate = &cm->postproc_state; | 638 struct postproc_state *const ppstate = &cm->postproc_state; |
639 | 639 |
640 if (!cm->frame_to_show) | 640 if (!cm->frame_to_show) |
641 return -1; | 641 return -1; |
642 | 642 |
643 if (!flags) { | 643 if (!flags) { |
644 *dest = *cm->frame_to_show; | 644 *dest = *cm->frame_to_show; |
645 return 0; | 645 return 0; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 /* handle problem with extending borders */ | 743 /* handle problem with extending borders */ |
744 dest->y_width = cm->width; | 744 dest->y_width = cm->width; |
745 dest->y_height = cm->height; | 745 dest->y_height = cm->height; |
746 dest->uv_width = dest->y_width >> cm->subsampling_x; | 746 dest->uv_width = dest->y_width >> cm->subsampling_x; |
747 dest->uv_height = dest->y_height >> cm->subsampling_y; | 747 dest->uv_height = dest->y_height >> cm->subsampling_y; |
748 | 748 |
749 swap_mi_and_prev_mi(cm); | 749 swap_mi_and_prev_mi(cm); |
750 return 0; | 750 return 0; |
751 } | 751 } |
752 #endif // CONFIG_VP9_POSTPROC | 752 #endif // CONFIG_VP9_POSTPROC |
OLD | NEW |