• 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_DECODER_DTHREAD_H_
13 #define AOM_AV1_DECODER_DTHREAD_H_
14 
15 #include "config/aom_config.h"
16 
17 #include "aom_util/aom_thread.h"
18 #include "aom/internal/aom_codec_internal.h"
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 struct AV1Common;
25 struct AV1Decoder;
26 struct ThreadData;
27 
28 typedef struct DecWorkerData {
29   struct ThreadData *td;
30   const uint8_t *data_end;
31   struct aom_internal_error_info error_info;
32 } DecWorkerData;
33 
34 // WorkerData for the FrameWorker thread. It contains all the information of
35 // the worker and decode structures for decoding a frame.
36 typedef struct FrameWorkerData {
37   struct AV1Decoder *pbi;
38   const uint8_t *data;
39   const uint8_t *data_end;
40   size_t data_size;
41   void *user_priv;
42   int worker_id;
43   int received_frame;
44   int frame_context_ready;  // Current frame's context is ready to read.
45   int frame_decoded;        // Finished decoding current frame.
46 } FrameWorkerData;
47 
48 #ifdef __cplusplus
49 }  // extern "C"
50 #endif
51 
52 #endif  // AOM_AV1_DECODER_DTHREAD_H_
53