OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 22 matching lines...) Expand all Loading... |
33 pthread_mutex_t *mutex_; | 33 pthread_mutex_t *mutex_; |
34 pthread_cond_t *cond_; | 34 pthread_cond_t *cond_; |
35 #endif | 35 #endif |
36 // Allocate memory to store the loop-filtered superblock index in each row. | 36 // Allocate memory to store the loop-filtered superblock index in each row. |
37 int *cur_sb_col; | 37 int *cur_sb_col; |
38 // The optimal sync_range for different resolution and platform should be | 38 // The optimal sync_range for different resolution and platform should be |
39 // determined by testing. Currently, it is chosen to be a power-of-2 number. | 39 // determined by testing. Currently, it is chosen to be a power-of-2 number. |
40 int sync_range; | 40 int sync_range; |
41 } VP9LfSync; | 41 } VP9LfSync; |
42 | 42 |
43 // WorkerData for the FrameWorker thread. It contains all the information of | |
44 // the worker and decode structures for decoding a frame. | |
45 typedef struct FrameWorkerData { | |
46 struct VP9Decoder *pbi; | |
47 const uint8_t *data; | |
48 const uint8_t *data_end; | |
49 size_t data_size; | |
50 int result; | |
51 int worker_id; | |
52 | |
53 // scratch_buffer is used in frame parallel mode only. | |
54 // It is used to make a copy of the compressed data. | |
55 uint8_t *scratch_buffer; | |
56 size_t scratch_buffer_size; | |
57 } FrameWorkerData; | |
58 | |
59 // Allocate memory for loopfilter row synchronization. | 43 // Allocate memory for loopfilter row synchronization. |
60 void vp9_loop_filter_alloc(struct VP9Common *cm, VP9LfSync *lf_sync, | 44 void vp9_loop_filter_alloc(struct VP9Common *cm, VP9LfSync *lf_sync, |
61 int rows, int width); | 45 int rows, int width); |
62 | 46 |
63 // Deallocate loopfilter synchronization related mutex and data. | 47 // Deallocate loopfilter synchronization related mutex and data. |
64 void vp9_loop_filter_dealloc(VP9LfSync *lf_sync, int rows); | 48 void vp9_loop_filter_dealloc(VP9LfSync *lf_sync, int rows); |
65 | 49 |
66 // Multi-threaded loopfilter that uses the tile threads. | 50 // Multi-threaded loopfilter that uses the tile threads. |
67 void vp9_loop_filter_frame_mt(YV12_BUFFER_CONFIG *frame, | 51 void vp9_loop_filter_frame_mt(YV12_BUFFER_CONFIG *frame, |
68 struct VP9Decoder *pbi, | 52 struct VP9Decoder *pbi, |
69 struct VP9Common *cm, | 53 struct VP9Common *cm, |
70 int frame_filter_level, | 54 int frame_filter_level, |
71 int y_only); | 55 int y_only); |
72 | 56 |
73 #endif // VP9_DECODER_VP9_DTHREAD_H_ | 57 #endif // VP9_DECODER_VP9_DTHREAD_H_ |
OLD | NEW |