| 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 21 matching lines...) Expand all Loading... |
| 32 } | 32 } |
| 33 } | 33 } |
| 34 | 34 |
| 35 | 35 |
| 36 static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd, | 36 static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd, |
| 37 VP9_COMP *const cpi, | 37 VP9_COMP *const cpi, |
| 38 int filt_level, int partial_frame) { | 38 int filt_level, int partial_frame) { |
| 39 VP9_COMMON *const cm = &cpi->common; | 39 VP9_COMMON *const cm = &cpi->common; |
| 40 int64_t filt_err; | 40 int64_t filt_err; |
| 41 | 41 |
| 42 vp9_loop_filter_frame(cm->frame_to_show, cm, &cpi->td.mb.e_mbd, filt_level, 1, | 42 if (cpi->num_workers > 1) |
| 43 partial_frame); | 43 vp9_loop_filter_frame_mt(cm->frame_to_show, cm, cpi->td.mb.e_mbd.plane, |
| 44 filt_level, 1, partial_frame, |
| 45 cpi->workers, cpi->num_workers, &cpi->lf_row_sync); |
| 46 else |
| 47 vp9_loop_filter_frame(cm->frame_to_show, cm, &cpi->td.mb.e_mbd, filt_level, |
| 48 1, partial_frame); |
| 49 |
| 44 #if CONFIG_VP9_HIGHBITDEPTH | 50 #if CONFIG_VP9_HIGHBITDEPTH |
| 45 if (cm->use_highbitdepth) { | 51 if (cm->use_highbitdepth) { |
| 46 filt_err = vp9_highbd_get_y_sse(sd, cm->frame_to_show); | 52 filt_err = vp9_highbd_get_y_sse(sd, cm->frame_to_show); |
| 47 } else { | 53 } else { |
| 48 filt_err = vp9_get_y_sse(sd, cm->frame_to_show); | 54 filt_err = vp9_get_y_sse(sd, cm->frame_to_show); |
| 49 } | 55 } |
| 50 #else | 56 #else |
| 51 filt_err = vp9_get_y_sse(sd, cm->frame_to_show); | 57 filt_err = vp9_get_y_sse(sd, cm->frame_to_show); |
| 52 #endif // CONFIG_VP9_HIGHBITDEPTH | 58 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 53 | 59 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 int filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18); | 182 int filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18); |
| 177 #endif // CONFIG_VP9_HIGHBITDEPTH | 183 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 178 if (cm->frame_type == KEY_FRAME) | 184 if (cm->frame_type == KEY_FRAME) |
| 179 filt_guess -= 4; | 185 filt_guess -= 4; |
| 180 lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level); | 186 lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level); |
| 181 } else { | 187 } else { |
| 182 lf->filter_level = search_filter_level(sd, cpi, | 188 lf->filter_level = search_filter_level(sd, cpi, |
| 183 method == LPF_PICK_FROM_SUBIMAGE); | 189 method == LPF_PICK_FROM_SUBIMAGE); |
| 184 } | 190 } |
| 185 } | 191 } |
| OLD | NEW |