xref: /aosp_15_r20/external/libaom/av1/decoder/obu.h (revision 77c1e3ccc04c968bd2bc212e87364f250e820521)
1 /*
2  * Copyright (c) 2017, 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_OBU_H_
13 #define AOM_AV1_DECODER_OBU_H_
14 
15 #include "aom/aom_codec.h"
16 #include "av1/decoder/decoder.h"
17 
18 // Try to decode one frame from a buffer.
19 // Returns 1 if we decoded a frame,
20 //         0 if we didn't decode a frame but that's okay
21 //           (eg, if there was a frame but we skipped it),
22 //     or -1 on error
23 int aom_decode_frame_from_obus(struct AV1Decoder *pbi, const uint8_t *data,
24                                const uint8_t *data_end,
25                                const uint8_t **p_data_end);
26 
27 aom_codec_err_t aom_get_num_layers_from_operating_point_idc(
28     int operating_point_idc, unsigned int *number_spatial_layers,
29     unsigned int *number_temporal_layers);
30 
31 #endif  // AOM_AV1_DECODER_OBU_H_
32