27     { 
"1",    30,    36864,    350,      0,  16,  1,  1,     552960,    128,      0, 2, 2 },
 
   28     { 
"2",    60,   122880,   1500,      0,  16,  1,  1,    3686400,   1500,      0, 2, 2 },
 
   29     { 
"2.1",  63,   245760,   3000,      0,  20,  1,  1,    7372800,   3000,      0, 2, 2 },
 
   30     { 
"3",    90,   552960,   6000,      0,  30,  2,  2,   16588800,   6000,      0, 2, 2 },
 
   31     { 
"3.1",  93,   983040,  10000,      0,  40,  3,  3,   33177600,  10000,      0, 2, 2 },
 
   32     { 
"4",   120,  2228224,  12000,  30000,  75,  5,  5,   66846720,  12000,  30000, 4, 4 },
 
   33     { 
"4.1", 123,  2228224,  20000,  50000,  75,  5,  5,  133693440,  20000,  50000, 4, 4 },
 
   34     { 
"5",   150,  8912896,  25000, 100000, 200, 11, 10,  267386880,  25000, 100000, 6, 4 },
 
   35     { 
"5.1", 153,  8912896,  40000, 160000, 200, 11, 10,  534773760,  40000, 160000, 8, 4 },
 
   36     { 
"5.2", 156,  8912896,  60000, 240000, 200, 11, 10, 1069547520,  60000, 240000, 8, 4 },
 
   37     { 
"6",   180, 35651584,  60000, 240000, 600, 22, 20, 1069547520,  60000, 240000, 8, 4 },
 
   38     { 
"6.1", 183, 35651584, 120000, 480000, 600, 22, 20, 2139095040, 120000, 480000, 8, 4 },
 
   39     { 
"6.2", 186, 35651584, 240000, 800000, 600, 22, 20, 4278190080, 240000, 800000, 6, 4 },
 
   49       4, 0, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1,  667,  733, 1.000, 1.0 },
 
   51       4, 0, 2, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1000, 1100, 1.500, 1.0 },
 
   53       4, 0, 2, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1333, 1467, 2.000, 1.0 },
 
   55       1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1000, 1100, 1.500, 1.0 },
 
   56     { 
"Screen-Extended Main",
 
   57       9, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1000, 1100, 1.500, 1.0 },
 
   59       2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1000, 1100, 1.875, 1.0 },
 
   60     { 
"Screen-Extended Main 10",
 
   61       9, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1000, 1100, 1.875, 1.0 },
 
   63       4, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1500, 1650, 2.250, 1.0 },
 
   64     { 
"Main Still Picture",
 
   65       3, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1000, 1100, 1.500, 1.0 },
 
   67       4, 0, 2, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1667, 1833, 2.500, 0.5 },
 
   69       4, 0, 2, 1, 0, 0, 1, 0, 0, 0, 0, 1, 2000, 2200, 3.000, 0.5 },
 
   71       4, 0, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2000, 2200, 3.000, 0.5 },
 
   72     { 
"High Throughput 4:4:4",
 
   73       5, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2000, 2200, 3.000, 0.5 },
 
   74     { 
"Screen-Extended Main 4:4:4",
 
   75       9, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2000, 2200, 3.000, 0.5 },
 
   76     { 
"Screen-Extended High Throughput 4:4:4",
 
   77       9, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2000, 2200, 3.000, 0.5 },
 
   79       4, 0, 2, 1, 1, 0, 0, 0, 0, 0, 0, 1, 2500, 2750, 3.750, 0.5 },
 
   80     { 
"High Throughput 4:4:4 10",
 
   81       5, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 2500, 2750, 3.750, 0.5 },
 
   82     { 
"Screen-Extended Main 4:4:4 10",
 
   83       9, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 2500, 2750, 3.750, 0.5 },
 
   84     { 
"Screen-Extended High Throughput 4:4:4 10",
 
   85       9, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 2500, 2750, 3.750, 0.5 },
 
   87       4, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 3000, 3300, 4.500, 0.5 },
 
   88     { 
"High Throughput 4:4:4 14",
 
   89       5, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3500, 3850, 5.250, 0.5 },
 
   90     { 
"Screen-Extended High Throughput 4:4:4 14",
 
   91       9, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3500, 3850, 5.250, 0.5 },
 
   93       4, 0, 2, 1, 1, 1, 1, 1, 0, 1, 0, 2, 1000, 1100, 1.500, 1.0 },
 
   95       4, 0, 2, 1, 1, 0, 1, 1, 0, 1, 0, 2, 1000, 1100, 1.875, 1.0 },
 
   97       4, 0, 2, 1, 0, 0, 1, 1, 0, 1, 0, 2, 1500, 1650, 2.250, 1.0 },
 
   98     { 
"Main 4:2:2 10 Intra",
 
   99       4, 0, 2, 1, 1, 0, 1, 0, 0, 1, 0, 2, 1667, 1833, 2.500, 0.5 },
 
  100     { 
"Main 4:2:2 12 Intra",
 
  101       4, 0, 2, 1, 0, 0, 1, 0, 0, 1, 0, 2, 2000, 2200, 3.000, 0.5 },
 
  102     { 
"Main 4:4:4 Intra",
 
  103       4, 0, 2, 1, 1, 1, 0, 0, 0, 1, 0, 2, 2000, 2200, 3.000, 0.5 },
 
  104     { 
"Main 4:4:4 10 Intra",
 
  105       4, 0, 2, 1, 1, 0, 0, 0, 0, 1, 0, 2, 2500, 2750, 3.750, 0.5 },
 
  106     { 
"Main 4:4:4 12 Intra",
 
  107       4, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 2, 3000, 3300, 4.500, 0.5 },
 
  108     { 
"Main 4:4:4 16 Intra",
 
  109       4, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 2, 4000, 4400, 6.000, 0.5 },
 
  110     { 
"Main 4:4:4 Still Picture",
 
  111       4, 0, 2, 1, 1, 1, 0, 0, 0, 1, 1, 2, 2000, 2200, 3.000, 0.5 },
 
  112     { 
"Main 4:4:4 16 Still Picture",
 
  113       4, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 2, 4000, 4400, 6.000, 0.5 },
 
  114     { 
"High Throughput 4:4:4 16 Intra",
 
  115       5, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 4000, 4400, 6.000, 0.5 },
 
  124         if (h265_levels[i].level_idc == level_idc)
 
  125             return &h265_levels[i];
 
  147 #define check_flag(name) \ 
  148         if (profile->name < 2) { \ 
  149             if (profile->name != ptl->general_ ## name ## _constraint_flag) \ 
  174                                                int tile_rows, 
int tile_cols,
 
  175                                                int max_dec_pic_buffering)
 
  178     int pic_size, lbr_flag, hbr_factor;
 
  187         profile = &h265_profiles[3];
 
  190     pic_size = width * 
height;
 
  200             hbr_factor = 24 - 12 * lbr_flag;
 
  204         hbr_factor = 2 - lbr_flag;
 
  209         int max_br, max_dpb_size;
 
  231         if (bitrate > (int64_t)profile->
cpb_nal_factor * hbr_factor * max_br)
 
  242         if (max_dec_pic_buffering > max_dpb_size)
 
static const H265LevelDescriptor h265_levels[]
static const H265ProfileDescriptor h265_profiles[]
uint8_t general_profile_idc
uint8_t general_tier_flag
#define FF_ARRAY_ELEMS(a)
const H265LevelDescriptor * ff_h265_guess_level(const H265RawProfileTierLevel *ptl, int64_t bitrate, int width, int height, int slice_segments, int tile_rows, int tile_cols, int max_dec_pic_buffering)
Guess the level of a stream from some parameters. 
uint8_t general_lower_bit_rate_constraint_flag
uint8_t general_profile_compatibility_flag[32]
uint8_t general_profile_space
const H265LevelDescriptor * ff_h265_get_level(int level_idc)
uint16_t max_slice_segments_per_picture
const H265ProfileDescriptor * ff_h265_get_profile(const H265RawProfileTierLevel *ptl)