avformat/mpeg: demux ivtv captions
[ffmpeg.git] / libavcodec / av1_levels.h
blob164cb876ba1063a8d587622003f037899cf44bcf
1 /*
2 * Copyright (c) 2023 Intel Corporation
4 * This file is part of FFmpeg.
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef AVCODEC_AV1_LEVELS_H
22 #define AVCODEC_AV1_LEVELS_H
24 #include <stdint.h>
26 typedef struct AV1LevelDescriptor {
27 char name[4];
28 uint8_t level_idx;
30 uint32_t max_pic_size;
31 uint32_t max_h_size;
32 uint32_t max_v_size;
33 uint64_t max_display_rate;
34 uint64_t max_decode_rate;
36 uint32_t max_header_rate;
37 float main_mbps;
38 float high_mbps;
39 uint32_t main_cr;
40 uint32_t high_cr;
41 uint32_t max_tiles;
42 uint32_t max_tile_cols;
43 } AV1LevelDescriptor;
45 /**
46 * Guess the level of a stream from some parameters.
48 * Unknown parameters may be zero, in which case they will be ignored.
50 const AV1LevelDescriptor *ff_av1_guess_level(int64_t bitrate,
51 int tier,
52 int width,
53 int height,
54 int tile_rows,
55 int tile_cols,
56 float fps);
58 #endif /* AVCODEC_AV1_LEVELS_H */