FFmpeg
Macros | Functions | Variables
h264_levels.c File Reference
#include "libavutil/common.h"
#include "libavcodec/h264_levels.h"

Go to the source code of this file.

Macros

#define CHECK(expected, format, ...)
 

Functions

int main (void)
 

Variables

struct {
   int   width
 
   int   height
 
   int   level_idc
 
test_sizes []
 
struct {
   int   width
 
   int   height
 
   int   framerate
 
   int   level_idc
 
test_framerate []
 
struct {
   int   width
 
   int   height
 
   int   dpb_size
 
   int   level_idc
 
test_dpb []
 
struct {
   int64_t   bitrate
 
   int   profile_idc
 
   int   level_idc
 
test_bitrate []
 
struct {
   const char *   name
 
   int   profile_idc
 
   int64_t   bitrate
 
   int   width
 
   int   height
 
   int   dpb_frames
 
   int   level_idc
 
test_all []
 

Macro Definition Documentation

#define CHECK (   expected,
  format,
  ... 
)
Value:
do { \
if (expected ? (!level || level->level_idc != expected) \
: !!level) { \
av_log(NULL, AV_LOG_ERROR, "Incorrect level for " \
format ": expected %d, got %d.\n", __VA_ARGS__, \
expected, level ? level->level_idc : -1); \
return 1; \
} \
} while (0)
#define NULL
Definition: coverity.c:32
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate.The lists are not just lists
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
if(ret)
uint8_t level
Definition: svq3.c:207
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return

Referenced by main().

Function Documentation

int main ( void  )

Definition at line 176 of file h264_levels.c.

Variable Documentation

int width

Definition at line 23 of file h264_levels.c.

Referenced by main().

int height

Definition at line 24 of file h264_levels.c.

Referenced by main().

int level_idc
const { ... } test_sizes[]

Referenced by main().

int framerate
const { ... } test_framerate[]

Referenced by main().

int dpb_size

Definition at line 107 of file h264_levels.c.

Referenced by main(), nvdec_h264_start_frame(), and nvdec_hevc_start_frame().

const { ... } test_dpb[]
Initial value:
= {
{ 176, 144, 4, 10 },
{ 176, 144, 8, 11 },
{ 176, 144, 16, 12 },
{ 1280, 720, 1, 31 },
{ 1280, 720, 5, 31 },
{ 1280, 720, 9, 40 },
{ 1280, 720, 10, 50 },
{ 1920, 1080, 1, 40 },
{ 1920, 1080, 5, 50 },
{ 1920, 1080, 13, 50 },
{ 1920, 1080, 14, 51 },
{ 3840, 2160, 5, 51 },
{ 3840, 2160, 6, 60 },
{ 3840, 2160, 16, 60 },
{ 7680, 4320, 5, 60 },
{ 7680, 4320, 6, 0 },
}

Referenced by main().

int64_t bitrate
int profile_idc

Definition at line 132 of file h264_levels.c.

const { ... } test_bitrate[]
Initial value:
= {
{ 2500000, 77, 21 },
{ 2500000, 100, 20 },
{ 2500000, 244, 13 },
{ 100000000, 77, 50 },
{ 100000000, 100, 50 },
{ 100000000, 244, 41 },
{ 999999999, 77, 0 },
{ 999999999, 100, 62 },
{ 32 * 1200, 66, 10 },
{ 32 * 1500, 100, 10 },
{ 96 * 1200, 66, 11 },
{ 96 * 1500, 100, 9 },
{ 144 * 1200, 66, 11 },
{ 144 * 1500, 100, 11 },
}

Referenced by main().

const char* name

Definition at line 154 of file h264_levels.c.

int dpb_frames
const { ... } test_all[]
Initial value:
= {
{ "Bluray 1080p 40Mb/s", 100, 40000000, 1920, 1080, 4, 41 },
{ "Bluray 1080p 24Mb/s", 100, 24000000, 1920, 1080, 4, 40 },
{ "Bluray 720p 40Mb/s", 100, 40000000, 1280, 720, 6, 41 },
{ "Bluray 720p 24Mb/s", 100, 24000000, 1280, 720, 6, 40 },
{ "Bluray PAL 40Mb/s", 100, 40000000, 720, 576, 6, 41 },
{ "Bluray PAL 24Mb/s", 100, 24000000, 720, 576, 6, 32 },
{ "Bluray PAL 16Mb/s", 100, 16800000, 720, 576, 6, 31 },
{ "Bluray PAL 12Mb/s", 100, 12000000, 720, 576, 5, 30 },
{ "Bluray NTSC 40Mb/s", 100, 40000000, 720, 480, 6, 41 },
{ "Bluray NTSC 24Mb/s", 100, 24000000, 720, 480, 6, 32 },
{ "Bluray NTSC 16Mb/s", 100, 16800000, 720, 480, 6, 31 },
{ "Bluray NTSC 12Mb/s", 100, 12000000, 720, 480, 6, 30 },
}

Referenced by main().