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 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 VP9_COMMON *cm, MACROBLOCKD *xd, | 1581 VP9_COMMON *cm, MACROBLOCKD *xd, |
1582 int frame_filter_level, | 1582 int frame_filter_level, |
1583 int y_only, int partial_frame) { | 1583 int y_only, int partial_frame) { |
1584 int start_mi_row, end_mi_row, mi_rows_to_filter; | 1584 int start_mi_row, end_mi_row, mi_rows_to_filter; |
1585 if (!frame_filter_level) return; | 1585 if (!frame_filter_level) return; |
1586 start_mi_row = 0; | 1586 start_mi_row = 0; |
1587 mi_rows_to_filter = cm->mi_rows; | 1587 mi_rows_to_filter = cm->mi_rows; |
1588 if (partial_frame && cm->mi_rows > 8) { | 1588 if (partial_frame && cm->mi_rows > 8) { |
1589 start_mi_row = cm->mi_rows >> 1; | 1589 start_mi_row = cm->mi_rows >> 1; |
1590 start_mi_row &= 0xfffffff8; | 1590 start_mi_row &= 0xfffffff8; |
1591 mi_rows_to_filter = MAX(cm->mi_rows / 8, 8); | 1591 mi_rows_to_filter = VPXMAX(cm->mi_rows / 8, 8); |
1592 } | 1592 } |
1593 end_mi_row = start_mi_row + mi_rows_to_filter; | 1593 end_mi_row = start_mi_row + mi_rows_to_filter; |
1594 vp9_loop_filter_frame_init(cm, frame_filter_level); | 1594 vp9_loop_filter_frame_init(cm, frame_filter_level); |
1595 vp9_loop_filter_rows(frame, cm, xd->plane, | 1595 vp9_loop_filter_rows(frame, cm, xd->plane, |
1596 start_mi_row, end_mi_row, | 1596 start_mi_row, end_mi_row, |
1597 y_only); | 1597 y_only); |
1598 } | 1598 } |
1599 | 1599 |
1600 void vp9_loop_filter_data_reset( | 1600 void vp9_loop_filter_data_reset( |
1601 LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer, | 1601 LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer, |
1602 struct VP9Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]) { | 1602 struct VP9Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]) { |
1603 lf_data->frame_buffer = frame_buffer; | 1603 lf_data->frame_buffer = frame_buffer; |
1604 lf_data->cm = cm; | 1604 lf_data->cm = cm; |
1605 lf_data->start = 0; | 1605 lf_data->start = 0; |
1606 lf_data->stop = 0; | 1606 lf_data->stop = 0; |
1607 lf_data->y_only = 0; | 1607 lf_data->y_only = 0; |
1608 memcpy(lf_data->planes, planes, sizeof(lf_data->planes)); | 1608 memcpy(lf_data->planes, planes, sizeof(lf_data->planes)); |
1609 } | 1609 } |
1610 | 1610 |
1611 int vp9_loop_filter_worker(LFWorkerData *const lf_data, void *unused) { | 1611 int vp9_loop_filter_worker(LFWorkerData *const lf_data, void *unused) { |
1612 (void)unused; | 1612 (void)unused; |
1613 vp9_loop_filter_rows(lf_data->frame_buffer, lf_data->cm, lf_data->planes, | 1613 vp9_loop_filter_rows(lf_data->frame_buffer, lf_data->cm, lf_data->planes, |
1614 lf_data->start, lf_data->stop, lf_data->y_only); | 1614 lf_data->start, lf_data->stop, lf_data->y_only); |
1615 return 1; | 1615 return 1; |
1616 } | 1616 } |
OLD | NEW |