Add ssse3 aom_smooth_h_predictor_4xh
[aom.git] / obudec.h
blobe80dfd7b23068bdfdd7283b5d3eba2d5edc8bf3a
1 /*
2 * Copyright (c) 2017, Alliance for Open Media. All rights reserved
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.
11 #ifndef OBUDEC_H_
12 #define OBUDEC_H_
14 #include "./tools_common.h"
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 struct ObuDecInputContext {
21 struct AvxInputContext *avx_ctx;
22 uint8_t *buffer;
23 size_t buffer_capacity;
24 size_t bytes_buffered;
27 // Returns 1 when file data starts with what appears to be a Temporal Delimiter
28 // OBU as defined by Section 5 of the AV1 bitstream specification.
29 int file_is_obu(struct ObuDecInputContext *obu_ctx);
31 // Reads one Temporal Unit from the input file. Returns 0 when a TU is
32 // successfully read, 1 when end of file is reached, and less than 0 when an
33 // error occurs. Stores TU data in 'buffer'. Reallocs buffer to match TU size,
34 // returns buffer capacity via 'buffer_size', and returns size of buffered data
35 // via 'bytes_read'.
36 int obudec_read_temporal_unit(struct ObuDecInputContext *obu_ctx,
37 uint8_t **buffer, size_t *bytes_read,
38 #if CONFIG_SCALABILITY
39 size_t *buffer_size, int last_layer_id
40 #else
41 size_t *buffer_size
42 #endif
45 void obudec_free(struct ObuDecInputContext *obu_ctx);
47 #ifdef __cplusplus
48 } /* extern "C" */
49 #endif
51 #endif // OBUDEC_H_