FFmpeg
Macros | Typedefs | Functions | Variables
pixfmt_best.c File Reference
#include "libavutil/pixdesc.c"

Go to the source code of this file.

Macros

#define find_best_wrapper(name, list)
 
#define TEST(input, expected)   test(input, expected, &pass, &fail, find_best_base)
 
#define TEST_SEMIPLANAR(input, expected)   test(input, expected, &pass, &fail, find_best_seminplanar)
 
#define TEST_PACKED(input, expected)   test(input, expected, &pass, &fail, find_best_packed)
 
#define TEST_SUBSAMPLED(input, expected)   test(input, expected, &pass, &fail, find_best_subsampled)
 
#define TEST_DEPTH_CHROMA(input, expected)   test(input, expected, &pass, &fail, find_best_depthchroma)
 

Typedefs

typedef enum AVPixelFormat(* find_best_t) (enum AVPixelFormat pixfmt)
 

Functions

 find_best_wrapper (base, pixfmt_list)
 
int main (void)
 

Variables

static enum AVPixelFormat pixfmt_list []
 
static enum AVPixelFormat semiplanar_list []
 
static enum AVPixelFormat packed_list []
 
static enum AVPixelFormat subsampled_list []
 
static enum AVPixelFormat depthchroma_list []
 

Macro Definition Documentation

◆ find_best_wrapper

#define find_best_wrapper (   name,
  list 
)
Value:
static enum AVPixelFormat find_best_ ## name (enum AVPixelFormat pixfmt) \
{ \
int i; \
for (i = 0; i < FF_ARRAY_ELEMS(list); i++) \
best = av_find_best_pix_fmt_of_2(best, list[i], \
pixfmt, 0, NULL); \
return best; \
}

Definition at line 73 of file pixfmt_best.c.

◆ TEST

#define TEST (   input,
  expected 
)    test(input, expected, &pass, &fail, find_best_base)

◆ TEST_SEMIPLANAR

#define TEST_SEMIPLANAR (   input,
  expected 
)    test(input, expected, &pass, &fail, find_best_seminplanar)

◆ TEST_PACKED

#define TEST_PACKED (   input,
  expected 
)    test(input, expected, &pass, &fail, find_best_packed)

◆ TEST_SUBSAMPLED

#define TEST_SUBSAMPLED (   input,
  expected 
)    test(input, expected, &pass, &fail, find_best_subsampled)

◆ TEST_DEPTH_CHROMA

#define TEST_DEPTH_CHROMA (   input,
  expected 
)    test(input, expected, &pass, &fail, find_best_depthchroma)

Typedef Documentation

◆ find_best_t

typedef enum AVPixelFormat(* find_best_t) (enum AVPixelFormat pixfmt)

Definition at line 71 of file pixfmt_best.c.

Function Documentation

◆ find_best_wrapper()

find_best_wrapper ( base  ,
pixfmt_list   
)

Definition at line 84 of file pixfmt_best.c.

◆ main()

int main ( void  )

Definition at line 104 of file pixfmt_best.c.

Variable Documentation

◆ pixfmt_list

enum AVPixelFormat pixfmt_list[]
static

◆ semiplanar_list

enum AVPixelFormat semiplanar_list[]
static
Initial value:

Definition at line 42 of file pixfmt_best.c.

Referenced by main().

◆ packed_list

enum AVPixelFormat packed_list[]
static
Initial value:

Definition at line 49 of file pixfmt_best.c.

Referenced by main().

◆ subsampled_list

enum AVPixelFormat subsampled_list[]
static
Initial value:

Definition at line 58 of file pixfmt_best.c.

Referenced by main().

◆ depthchroma_list

enum AVPixelFormat depthchroma_list[]
static
Initial value:

Definition at line 65 of file pixfmt_best.c.

Referenced by main().

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
AV_PIX_FMT_MONOWHITE
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:75
AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:468
AV_PIX_FMT_XV30
#define AV_PIX_FMT_XV30
Definition: pixfmt.h:524
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:452
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:471
AV_PIX_FMT_Y210
#define AV_PIX_FMT_Y210
Definition: pixfmt.h:522
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:480
AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV444P16
Definition: pixfmt.h:481
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:479
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:449
NULL
#define NULL
Definition: coverity.c:32
AV_PIX_FMT_YUYV422
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: pixfmt.h:67
list
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 they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining list
Definition: filter_design.txt:25
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:469
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:68
AV_PIX_FMT_P012
#define AV_PIX_FMT_P012
Definition: pixfmt.h:519
AV_PIX_FMT_RGB48
#define AV_PIX_FMT_RGB48
Definition: pixfmt.h:454
AV_PIX_FMT_Y212
#define AV_PIX_FMT_Y212
Definition: pixfmt.h:523
AV_PIX_FMT_VAAPI
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
Definition: pixfmt.h:119
AV_PIX_FMT_VDPAU
@ AV_PIX_FMT_VDPAU
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
Definition: pixfmt.h:187
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
AV_PIX_FMT_P016
#define AV_PIX_FMT_P016
Definition: pixfmt.h:520
AV_PIX_FMT_RGB565
#define AV_PIX_FMT_RGB565
Definition: pixfmt.h:455
pixfmt
enum AVPixelFormat pixfmt
Definition: kmsgrab.c:365
AV_PIX_FMT_NV12
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: pixfmt.h:89
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:477
av_find_best_pix_fmt_of_2
enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
Compute what kind of losses will occur when converting from one specific pixel format to another.
Definition: pixdesc.c:3243
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:71
AV_PIX_FMT_P010
#define AV_PIX_FMT_P010
Definition: pixfmt.h:518
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:70
AV_PIX_FMT_YUV411P
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:73
AV_PIX_FMT_XV36
#define AV_PIX_FMT_XV36
Definition: pixfmt.h:525
AV_PIX_FMT_VUYX
@ AV_PIX_FMT_VUYX
packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
Definition: pixfmt.h:403
AV_PIX_FMT_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:476