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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 for (j = 0; j < 2; j++) | 668 for (j = 0; j < 2; j++) |
669 { | 669 { |
670 u[j] = (u[j]*alpha + u1_const)>>16; | 670 u[j] = (u[j]*alpha + u1_const)>>16; |
671 v[j] = (v[j]*alpha + v1_const)>>16; | 671 v[j] = (v[j]*alpha + v1_const)>>16; |
672 } | 672 } |
673 u += stride; | 673 u += stride; |
674 v += stride; | 674 v += stride; |
675 } | 675 } |
676 } | 676 } |
677 | 677 |
| 678 #if CONFIG_POSTPROC_VISUALIZER |
678 static void constrain_line (int x_0, int *x_1, int y_0, int *y_1, int width, int
height) | 679 static void constrain_line (int x_0, int *x_1, int y_0, int *y_1, int width, int
height) |
679 { | 680 { |
680 int dx; | 681 int dx; |
681 int dy; | 682 int dy; |
682 | 683 |
683 if (*x_1 > width) | 684 if (*x_1 > width) |
684 { | 685 { |
685 dx = *x_1 - x_0; | 686 dx = *x_1 - x_0; |
686 dy = *y_1 - y_0; | 687 dy = *y_1 - y_0; |
687 | 688 |
(...skipping 22 matching lines...) Expand all Loading... |
710 if (*y_1 < 0) | 711 if (*y_1 < 0) |
711 { | 712 { |
712 dx = *x_1 - x_0; | 713 dx = *x_1 - x_0; |
713 dy = *y_1 - y_0; | 714 dy = *y_1 - y_0; |
714 | 715 |
715 *y_1 = 0; | 716 *y_1 = 0; |
716 if (dy) | 717 if (dy) |
717 *x_1 = ((0-y_0)*dx)/dy + x_0; | 718 *x_1 = ((0-y_0)*dx)/dy + x_0; |
718 } | 719 } |
719 } | 720 } |
| 721 #endif // CONFIG_POSTPROC_VISUALIZER |
720 | 722 |
721 #if CONFIG_POSTPROC | 723 #if CONFIG_POSTPROC |
722 int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
*ppflags) | 724 int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
*ppflags) |
723 { | 725 { |
724 int q = oci->filter_level * 10 / 6; | 726 int q = oci->filter_level * 10 / 6; |
725 int flags = ppflags->post_proc_flag; | 727 int flags = ppflags->post_proc_flag; |
726 int deblock_level = ppflags->deblocking_level; | 728 int deblock_level = ppflags->deblocking_level; |
727 int noise_level = ppflags->noise_level; | 729 int noise_level = ppflags->noise_level; |
728 | 730 |
729 if (!oci->frame_to_show) | 731 if (!oci->frame_to_show) |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 | 1199 |
1198 *dest = oci->post_proc_buffer; | 1200 *dest = oci->post_proc_buffer; |
1199 | 1201 |
1200 /* handle problem with extending borders */ | 1202 /* handle problem with extending borders */ |
1201 dest->y_width = oci->Width; | 1203 dest->y_width = oci->Width; |
1202 dest->y_height = oci->Height; | 1204 dest->y_height = oci->Height; |
1203 dest->uv_height = dest->y_height / 2; | 1205 dest->uv_height = dest->y_height / 2; |
1204 return 0; | 1206 return 0; |
1205 } | 1207 } |
1206 #endif | 1208 #endif |
OLD | NEW |