• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2016, Alliance for Open Media. All rights reserved
3  *
4  * This source code is subject to the terms of the BSD 2 Clause License and
5  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6  * was not distributed with this source code in the LICENSE file, you can
7  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8  * Media Patent License 1.0 was not distributed with this source code in the
9  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10  */
11 
12 #ifndef AOM_AV1_ENCODER_ETHREAD_H_
13 #define AOM_AV1_ENCODER_ETHREAD_H_
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 struct AV1_COMP;
20 struct ThreadData;
21 struct AV1RowMTSyncData;
22 
23 typedef struct EncWorkerData {
24   struct AV1_COMP *cpi;
25   struct ThreadData *td;
26   int start;
27   int thread_id;
28 } EncWorkerData;
29 
30 void av1_row_mt_sync_read(AV1RowMTSync *const row_mt_sync, int r, int c);
31 void av1_row_mt_sync_write(AV1RowMTSync *const row_mt_sync, int r, int c,
32                            const int cols);
33 
34 void av1_row_mt_sync_read_dummy(struct AV1RowMTSyncData *const row_mt_sync,
35                                 int r, int c);
36 void av1_row_mt_sync_write_dummy(struct AV1RowMTSyncData *const row_mt_sync,
37                                  int r, int c, const int cols);
38 
39 void av1_row_mt_sync_mem_dealloc(AV1RowMTSync *row_mt_sync);
40 // Allocate memory for row based multi-threading synchronization.
41 void av1_row_mt_sync_mem_alloc(AV1RowMTSync *row_mt_sync, struct AV1Common *cm,
42                                int rows);
43 
44 void av1_encode_tiles_mt(struct AV1_COMP *cpi);
45 void av1_encode_tiles_row_mt(struct AV1_COMP *cpi);
46 
47 void av1_accumulate_frame_counts(struct FRAME_COUNTS *acc_counts,
48                                  const struct FRAME_COUNTS *counts);
49 
50 #ifdef __cplusplus
51 }  // extern "C"
52 #endif
53 
54 #endif  // AOM_AV1_ENCODER_ETHREAD_H_
55