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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 s += 8; | 1142 s += 8; |
1143 lfl += 1; | 1143 lfl += 1; |
1144 mask_16x16 >>= 1; | 1144 mask_16x16 >>= 1; |
1145 mask_8x8 >>= 1; | 1145 mask_8x8 >>= 1; |
1146 mask_4x4 >>= 1; | 1146 mask_4x4 >>= 1; |
1147 mask_4x4_int >>= 1; | 1147 mask_4x4_int >>= 1; |
1148 } | 1148 } |
1149 } | 1149 } |
1150 #endif // CONFIG_VP9_HIGHBITDEPTH | 1150 #endif // CONFIG_VP9_HIGHBITDEPTH |
1151 | 1151 |
1152 static void filter_block_plane_non420(VP9_COMMON *cm, | 1152 void vp9_filter_block_plane_non420(VP9_COMMON *cm, |
1153 struct macroblockd_plane *plane, | 1153 struct macroblockd_plane *plane, |
1154 MODE_INFO *mi_8x8, | 1154 MODE_INFO *mi_8x8, |
1155 int mi_row, int mi_col) { | 1155 int mi_row, int mi_col) { |
1156 const int ss_x = plane->subsampling_x; | 1156 const int ss_x = plane->subsampling_x; |
1157 const int ss_y = plane->subsampling_y; | 1157 const int ss_y = plane->subsampling_y; |
1158 const int row_step = 1 << ss_y; | 1158 const int row_step = 1 << ss_y; |
1159 const int col_step = 1 << ss_x; | 1159 const int col_step = 1 << ss_x; |
1160 const int row_step_stride = cm->mi_stride * row_step; | 1160 const int row_step_stride = cm->mi_stride * row_step; |
1161 struct buf_2d *const dst = &plane->dst; | 1161 struct buf_2d *const dst = &plane->dst; |
1162 uint8_t* const dst0 = dst->buf; | 1162 uint8_t* const dst0 = dst->buf; |
1163 unsigned int mask_16x16[MI_BLOCK_SIZE] = {0}; | 1163 unsigned int mask_16x16[MI_BLOCK_SIZE] = {0}; |
1164 unsigned int mask_8x8[MI_BLOCK_SIZE] = {0}; | 1164 unsigned int mask_8x8[MI_BLOCK_SIZE] = {0}; |
1165 unsigned int mask_4x4[MI_BLOCK_SIZE] = {0}; | 1165 unsigned int mask_4x4[MI_BLOCK_SIZE] = {0}; |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 | 1591 |
1592 // TODO(JBB): Make setup_mask work for non 420. | 1592 // TODO(JBB): Make setup_mask work for non 420. |
1593 if (use_420) | 1593 if (use_420) |
1594 vp9_setup_mask(cm, mi_row, mi_col, mi + mi_col, cm->mi_stride, | 1594 vp9_setup_mask(cm, mi_row, mi_col, mi + mi_col, cm->mi_stride, |
1595 &lfm); | 1595 &lfm); |
1596 | 1596 |
1597 for (plane = 0; plane < num_planes; ++plane) { | 1597 for (plane = 0; plane < num_planes; ++plane) { |
1598 if (use_420) | 1598 if (use_420) |
1599 vp9_filter_block_plane(cm, &planes[plane], mi_row, &lfm); | 1599 vp9_filter_block_plane(cm, &planes[plane], mi_row, &lfm); |
1600 else | 1600 else |
1601 filter_block_plane_non420(cm, &planes[plane], mi + mi_col, | 1601 vp9_filter_block_plane_non420(cm, &planes[plane], mi + mi_col, |
1602 mi_row, mi_col); | 1602 mi_row, mi_col); |
1603 } | 1603 } |
1604 } | 1604 } |
1605 } | 1605 } |
1606 } | 1606 } |
1607 | 1607 |
1608 void vp9_loop_filter_frame(YV12_BUFFER_CONFIG *frame, | 1608 void vp9_loop_filter_frame(YV12_BUFFER_CONFIG *frame, |
1609 VP9_COMMON *cm, MACROBLOCKD *xd, | 1609 VP9_COMMON *cm, MACROBLOCKD *xd, |
1610 int frame_filter_level, | 1610 int frame_filter_level, |
1611 int y_only, int partial_frame) { | 1611 int y_only, int partial_frame) { |
1612 int start_mi_row, end_mi_row, mi_rows_to_filter; | 1612 int start_mi_row, end_mi_row, mi_rows_to_filter; |
(...skipping 22 matching lines...) Expand all Loading... |
1635 lf_data->y_only = 0; | 1635 lf_data->y_only = 0; |
1636 vpx_memcpy(lf_data->planes, planes, sizeof(lf_data->planes)); | 1636 vpx_memcpy(lf_data->planes, planes, sizeof(lf_data->planes)); |
1637 } | 1637 } |
1638 | 1638 |
1639 int vp9_loop_filter_worker(LFWorkerData *const lf_data, void *unused) { | 1639 int vp9_loop_filter_worker(LFWorkerData *const lf_data, void *unused) { |
1640 (void)unused; | 1640 (void)unused; |
1641 vp9_loop_filter_rows(lf_data->frame_buffer, lf_data->cm, lf_data->planes, | 1641 vp9_loop_filter_rows(lf_data->frame_buffer, lf_data->cm, lf_data->planes, |
1642 lf_data->start, lf_data->stop, lf_data->y_only); | 1642 lf_data->start, lf_data->stop, lf_data->y_only); |
1643 return 1; | 1643 return 1; |
1644 } | 1644 } |
OLD | NEW |