79 #define OFFSET(x) offsetof(TestSourceContext, x)
80 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
82 #define SIZE_OPTIONS \
83 { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "320x240"}, 0, 0, FLAGS },\
84 { "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "320x240"}, 0, 0, FLAGS },\
86 #define COMMON_OPTIONS_NOSIZE \
87 { "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, FLAGS },\
88 { "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, FLAGS },\
89 { "duration", "set video duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = -1}, -1, INT64_MAX, FLAGS },\
90 { "d", "set video duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = -1}, -1, INT64_MAX, FLAGS },\
91 { "sar", "set video sample aspect ratio", OFFSET(sar), AV_OPT_TYPE_RATIONAL, {.dbl= 1}, 0, INT_MAX, FLAGS },
93 #define COMMON_OPTIONS SIZE_OPTIONS COMMON_OPTIONS_NOSIZE
126 outlink->
w = test->
w;
127 outlink->
h = test->
h;
176 #if CONFIG_COLOR_FILTER
178 static const AVOption color_options[] = {
192 0, 0, test->
w, test->
h);
229 char *res,
int res_len,
int flags)
234 if (!strcmp(cmd,
"color") || !strcmp(cmd,
"c")) {
241 memcpy(test->
color_rgba, color_rgba,
sizeof(color_rgba));
255 .config_props = color_config_props,
263 .priv_class = &color_class,
275 #if CONFIG_HALDCLUTSRC_FILTER
277 static const AVOption haldclutsrc_options[] = {
287 int i, j, k, x = 0,
y = 0, is16bit = 0, step;
292 const int w = frame->
width;
295 const int linesize = frame->
linesize[0];
320 scale = ((float)(1 << (8*(is16bit+1))) - 1) / (level*level - 1);
322 #define LOAD_CLUT(nbits) do { \
323 uint##nbits##_t *dst = ((uint##nbits##_t *)(data + y*linesize)) + x*step; \
324 dst[rgba_map[0]] = av_clip_uint##nbits(i * scale); \
325 dst[rgba_map[1]] = av_clip_uint##nbits(j * scale); \
326 dst[rgba_map[2]] = av_clip_uint##nbits(k * scale); \
328 dst[rgba_map[3]] = alpha; \
332 for (k = 0; k <
level; k++) {
333 for (j = 0; j <
level; j++) {
334 for (i = 0; i <
level; i++) {
375 static int haldclutsrc_config_props(
AVFilterLink *outlink)
389 .config_props = haldclutsrc_config_props,
395 .
name =
"haldclutsrc",
397 .priv_class = &haldclutsrc_class,
399 .
init = haldclutsrc_init,
403 .
outputs = haldclutsrc_outputs,
407 #if CONFIG_NULLSRC_FILTER
409 #define nullsrc_options options
435 .init = nullsrc_init,
438 .priv_class = &nullsrc_class,
445 #if CONFIG_TESTSRC_FILTER
447 static const AVOption testsrc_options[] = {
469 int x,
int y,
int w,
int h)
474 dst += segment_width * (step * x + y * dst_linesize);
475 w *= segment_width * step;
477 for (i = 0; i <
h; i++) {
483 static void draw_digit(
int digit,
uint8_t *dst,
int dst_linesize,
489 #define LEFT_TOP_VBAR 8
490 #define LEFT_BOT_VBAR 16
491 #define RIGHT_TOP_VBAR 32
492 #define RIGHT_BOT_VBAR 64
504 static const unsigned char masks[10] = {
505 TOP_HBAR |BOT_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR|RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
506 RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
507 TOP_HBAR|MID_HBAR|BOT_HBAR|LEFT_BOT_VBAR |RIGHT_TOP_VBAR,
508 TOP_HBAR|MID_HBAR|BOT_HBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
509 MID_HBAR |LEFT_TOP_VBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
510 TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR |RIGHT_BOT_VBAR,
511 TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR |RIGHT_BOT_VBAR,
512 TOP_HBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
513 TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR|RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
514 TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
516 unsigned mask = masks[digit];
523 segments[i].x, segments[i].y, segments[i].w, segments[i].h);
526 #define GRADIENT_SIZE (6 * 256)
533 int color, color_rest;
537 int dquad_x, dquad_y;
538 int grad, dgrad, rgrad, drgrad;
547 radius = (width +
height) / 4;
548 quad0 = width * width / 4 + height * height / 4 - radius * radius;
551 for (y = 0; y <
height; y++) {
557 for (x = 0; x <
width; x++) {
563 *(p++) = icolor & 1 ? 255 : 0;
564 *(p++) = icolor & 2 ? 255 : 0;
565 *(p++) = icolor & 4 ? 255 : 0;
567 if (color_rest >= width) {
578 p0 = p = data + frame->
linesize[0] * (height * 3/4);
582 dgrad = GRADIENT_SIZE /
width;
583 drgrad = GRADIENT_SIZE %
width;
584 for (x = 0; x <
width; x++) {
586 grad < 256 || grad >= 5 * 256 ? 255 :
587 grad >= 2 * 256 && grad < 4 * 256 ? 0 :
588 grad < 2 * 256 ? 2 * 256 - 1 - grad : grad - 4 * 256;
590 grad >= 4 * 256 ? 0 :
591 grad >= 1 * 256 && grad < 3 * 256 ? 255 :
592 grad < 1 * 256 ? grad : 4 * 256 - 1 - grad;
595 grad >= 3 * 256 && grad < 5 * 256 ? 255 :
596 grad < 3 * 256 ? grad - 2 * 256 : 6 * 256 - 1 - grad;
599 if (rgrad >= GRADIENT_SIZE) {
601 rgrad -= GRADIENT_SIZE;
603 if (grad >= GRADIENT_SIZE)
604 grad -= GRADIENT_SIZE;
607 for (y = height / 8; y > 0; y--) {
608 memcpy(p+frame->
linesize[0], p, 3 * width);
613 seg_size = width / 80;
614 if (seg_size >= 1 && height >= 13 * seg_size) {
615 int64_t p10decimals = 1;
625 x = width - (width - seg_size * 64) / 2;
626 y = (height - seg_size * 13) / 2;
627 p = data + (x*3 + y * frame->
linesize[0]);
628 for (i = 0; i < 8; i++) {
629 p -= 3 * 8 * seg_size;
630 draw_digit(second % 10, p, frame->
linesize[0], seg_size);
658 static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = {
672 .priv_class = &testsrc_class,
677 .
outputs = avfilter_vsrc_testsrc_outputs,
682 #if CONFIG_RGBTESTSRC_FILTER
684 #define rgbtestsrc_options options
692 static void rgbtest_put_pixel(
uint8_t *dst,
int dst_linesize,
700 case AV_PIX_FMT_BGR444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r >> 4) << 8) | ((g >> 4) << 4) | (b >> 4);
break;
701 case AV_PIX_FMT_RGB444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b >> 4) << 8) | ((g >> 4) << 4) | (r >> 4);
break;
702 case AV_PIX_FMT_BGR555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<10) | ((g>>3)<<5) | (b>>3);
break;
703 case AV_PIX_FMT_RGB555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<10) | ((g>>3)<<5) | (r>>3);
break;
704 case AV_PIX_FMT_BGR565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3);
break;
705 case AV_PIX_FMT_RGB565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<11) | ((g>>2)<<5) | (r>>3);
break;
708 v = (r << (rgba_map[
R]*8)) + (g << (rgba_map[
G]*8)) + (b << (rgba_map[
B]*8));
709 p = dst + 3*x + y*dst_linesize;
716 v = (r << (rgba_map[
R]*8)) + (g << (rgba_map[
G]*8)) + (b << (rgba_map[
B]*8)) + (255 << (rgba_map[
A]*8));
717 p = dst + 4*x + y*dst_linesize;
728 for (y = 0; y <
h; y++) {
729 for (x = 0; x < w; x++) {
731 int r = 0, g = 0, b = 0;
734 else if (3*y < 2*h) g =
c;
737 rgbtest_put_pixel(frame->
data[0], frame->
linesize[0], x, y, r, g, b,
777 static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = {
782 .config_props = rgbtest_config_props,
788 .
name =
"rgbtestsrc",
791 .priv_class = &rgbtestsrc_class,
792 .
init = rgbtest_init,
796 .
outputs = avfilter_vsrc_rgbtestsrc_outputs,
801 #if CONFIG_SMPTEBARS_FILTER || CONFIG_SMPTEHDBARS_FILTER
803 static const uint8_t rainbow[7][4] = {
804 { 180, 128, 128, 255 },
805 { 161, 44, 141, 255 },
806 { 131, 156, 44, 255 },
807 { 112, 72, 57, 255 },
808 { 83, 183, 198, 255 },
809 { 65, 99, 212, 255 },
810 { 34, 212, 114, 255 },
813 static const uint8_t rainbowhd[7][4] = {
814 { 180, 128, 128, 255 },
815 { 168, 44, 136, 255 },
816 { 145, 147, 44, 255 },
817 { 133, 63, 52, 255 },
818 { 63, 193, 204, 255 },
819 { 51, 109, 212, 255 },
820 { 28, 212, 120, 255 },
823 static const uint8_t wobnair[7][4] = {
824 { 34, 212, 114, 255 },
825 { 19, 128, 128, 255 },
826 { 83, 183, 198, 255 },
827 { 19, 128, 128, 255 },
828 { 131, 156, 44, 255 },
829 { 19, 128, 128, 255 },
830 { 180, 128, 128, 255 },
833 static const uint8_t white[4] = { 235, 128, 128, 255 };
836 static const uint8_t neg4ire[4] = { 7, 128, 128, 255 };
837 static const uint8_t pos4ire[4] = { 24, 128, 128, 255 };
840 static const uint8_t i_pixel[4] = { 57, 156, 97, 255 };
841 static const uint8_t q_pixel[4] = { 44, 171, 147, 255 };
843 static const uint8_t gray40[4] = { 104, 128, 128, 255 };
844 static const uint8_t gray15[4] = { 49, 128, 128, 255 };
845 static const uint8_t cyan[4] = { 188, 154, 16, 255 };
846 static const uint8_t yellow[4] = { 219, 16, 138, 255 };
847 static const uint8_t blue[4] = { 32, 240, 118, 255 };
848 static const uint8_t red[4] = { 63, 102, 240, 255 };
849 static const uint8_t black0[4] = { 16, 128, 128, 255 };
850 static const uint8_t black2[4] = { 20, 128, 128, 255 };
851 static const uint8_t black4[4] = { 25, 128, 128, 255 };
852 static const uint8_t neg2[4] = { 12, 128, 128, 255 };
855 int x,
int y,
int w,
int h,
862 x =
FFMIN(x, test->
w - 1);
863 y =
FFMIN(y, test->
h - 1);
864 w =
FFMIN(w, test->
w - x);
865 h =
FFMIN(h, test->
h - y);
870 for (plane = 0; frame->
data[
plane]; plane++) {
871 const int c = color[
plane];
873 int i, px, py, pw, ph;
875 if (plane == 1 || plane == 2) {
887 p0 = p = frame->
data[
plane] + py * linesize + px;
890 for (i = 1; i < ph; i++, p += linesize)
920 #if CONFIG_SMPTEBARS_FILTER
922 #define smptebars_options options
928 int r_w, r_h, w_h, p_w, p_h, i, tmp, x = 0;
937 p_h = test->
h - w_h - r_h;
939 for (i = 0; i < 7; i++) {
940 draw_bar(test, rainbow[i], x, 0, r_w, r_h, picref);
941 draw_bar(test, wobnair[i], x, r_h, r_w, w_h, picref);
945 draw_bar(test, i_pixel, x, r_h + w_h, p_w, p_h, picref);
947 draw_bar(test, white, x, r_h + w_h, p_w, p_h, picref);
949 draw_bar(test, q_pixel, x, r_h + w_h, p_w, p_h, picref);
952 draw_bar(test, black0, x, r_h + w_h, tmp, p_h, picref);
955 draw_bar(test, neg4ire, x, r_h + w_h, tmp, p_h, picref);
957 draw_bar(test, black0, x, r_h + w_h, tmp, p_h, picref);
959 draw_bar(test, pos4ire, x, r_h + w_h, tmp, p_h, picref);
961 draw_bar(test, black0, x, r_h + w_h, test->
w - x, p_h, picref);
977 .priv_class = &smptebars_class,
978 .
init = smptebars_init,
987 #if CONFIG_SMPTEHDBARS_FILTER
989 #define smptehdbars_options options
995 int d_w, r_w, r_h, l_w, i, tmp, x = 0, y = 0;
1002 draw_bar(test, gray40, x, 0, d_w, r_h, picref);
1006 for (i = 0; i < 7; i++) {
1007 draw_bar(test, rainbowhd[i], x, 0, r_w, r_h, picref);
1010 draw_bar(test, gray40, x, 0, test->
w - x, r_h, picref);
1013 draw_bar(test, cyan, 0, y, d_w, r_h, picref);
1015 draw_bar(test, i_pixel, x, y, r_w, r_h, picref);
1018 draw_bar(test, rainbowhd[0], x, y, tmp, r_h, picref);
1021 draw_bar(test, blue, x, y, test->
w - x, r_h, picref);
1023 draw_bar(test, yellow, 0, y, d_w, r_h, picref);
1025 draw_bar(test, q_pixel, x, y, r_w, r_h, picref);
1031 yramp[0] = i * 255 / tmp;
1036 draw_bar(test, yramp, x, y, 1 << pixdesc->
log2_chroma_w, r_h, picref);
1039 draw_bar(test, red, x, y, test->
w - x, r_h, picref);
1041 draw_bar(test, gray15, 0, y, d_w, test->
h - y, picref);
1044 draw_bar(test, black0, x, y, tmp, test->
h - y, picref);
1047 draw_bar(test, white, x, y, tmp, test->
h - y, picref);
1050 draw_bar(test, black0, x, y, tmp, test->
h - y, picref);
1053 draw_bar(test, neg2, x, y, tmp, test->
h - y, picref);
1055 draw_bar(test, black0, x, y, tmp, test->
h - y, picref);
1057 draw_bar(test, black2, x, y, tmp, test->
h - y, picref);
1059 draw_bar(test, black0, x, y, tmp, test->
h - y, picref);
1061 draw_bar(test, black4, x, y, tmp, test->
h - y, picref);
1064 draw_bar(test, black0, x, y, r_w, test->
h - y, picref);
1066 draw_bar(test, gray15, x, y, test->
w - x, test->
h - y, picref);
1079 .
name =
"smptehdbars",
1082 .priv_class = &smptehdbars_class,
1083 .
init = smptehdbars_init,
1093 #if CONFIG_ALLYUV_FILTER
1095 static const AVOption allyuv_options[] = {
1109 for (y = 0; y < 4096; y++) {
1110 for (x = 0; x < 2048; x++) {
1111 frame->
data[0][y * ys + x] = ((x / 8) % 256);
1112 frame->
data[0][y * ys + 4095 - x] = ((x / 8) % 256);
1115 for (x = 0; x < 2048; x+=8) {
1116 for (j = 0; j < 8; j++) {
1117 frame->
data[1][vs * y + x + j] = (y%16 + (j % 8) * 16);
1118 frame->
data[1][vs * y + 4095 - x - j] = (128 + y%16 + (j % 8) * 16);
1122 for (x = 0; x < 4096; x++)
1123 frame->
data[2][y * us + x] = 256 * y / 4096;
1131 test->
w = test->
h = 4096;
1150 static const AVFilterPad avfilter_vsrc_allyuv_outputs[] = {
1164 .priv_class = &allyuv_class,
1165 .
init = allyuv_init,
1169 .
outputs = avfilter_vsrc_allyuv_outputs,
1174 #if CONFIG_ALLRGB_FILTER
1176 static const AVOption allrgb_options[] = {
1186 const int linesize = frame->
linesize[0];
1189 for (y = 0; y < 4096; y++) {
1192 for (x = 0; x < 4096; x++) {
1195 *dst++ = (x >> 8) | ((y >> 8) << 4);
1205 test->
w = test->
h = 4096;
1231 static const AVFilterPad avfilter_vsrc_allrgb_outputs[] = {
1236 .config_props = allrgb_config_props,
1245 .priv_class = &allrgb_class,
1246 .
init = allrgb_init,
1250 .
outputs = avfilter_vsrc_allrgb_outputs,
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
AVFilterFormats * ff_draw_supported_pixel_formats(unsigned flags)
Return the list of pixel formats supported by the draw functions.
const char const char void * val
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static const AVFilterPad outputs[]
Main libavfilter public API header.
packed RGB 8:8:8, 24bpp, RGBRGB...
#define AV_PIX_FMT_RGBA64
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
int h
agreed upon image height
static void draw_rectangle(AVFormatContext *s)
static av_cold void uninit(AVFilterContext *ctx)
#define AV_PIX_FMT_BGRA64
#define COMMON_OPTIONS_NOSIZE
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
int draw_once
draw only the first frame, always put out the same picture
#define AV_PIX_FMT_RGB444
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
static av_cold int init(AVFilterContext *ctx)
int ff_draw_round_to_sub(FFDrawContext *draw, int sub_dir, int round_dir, int value)
Round a dimension according to subsampling.
const char * name
Pad name.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int draw_once_reset
draw only the first frame or in case of reset
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
static double av_q2d(AVRational a)
Convert rational to double.
static int request_frame(AVFilterLink *outlink)
#define AVERROR_EOF
End of file.
#define AV_LOG_VERBOSE
Detailed information.
int interlaced_frame
The content of the picture is interlaced.
int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, void *log_ctx)
Put the RGBA values that correspond to color_string in rgba_color.
A filter pad used for either input or output.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
A link between two filters.
static double alpha(void *priv, double x, double y)
int width
width and height of the video frame
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown; if left to 0/0, will be automatically be cop...
static const uint16_t mask[17]
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
void * priv
private data for use by the filter
int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel for the pixel format described by pixdesc, including any padding ...
void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4])
Prepare a color.
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
simple assert() macros that are a bit more flexible than ISO C assert().
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
AVRational sar
sample aspect ratio
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
enum AVPictureType pict_type
Picture type of the frame.
static void test(const char *pattern, const char *host)
int64_t duration
duration expressed in microseconds
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
#define FF_CEIL_RSHIFT(a, b)
static int config_props(AVFilterLink *outlink)
packed RGB 8:8:8, 24bpp, BGRBGR...
AVFilterContext * src
source filter
static int process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
int format
agreed upon media format
#define FF_ARRAY_ELEMS(a)
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
#define AV_PIX_FMT_BGR555
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
BYTE int const BYTE int int int height
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
rational number numerator/denominator
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
const char * name
Filter name.
int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
Init a draw context.
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
AVFilterLink ** outputs
array of pointers to output links
static enum AVPixelFormat pix_fmts[]
#define AV_PIX_FMT_BGR565
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
static int query_formats(AVFilterContext *ctx)
common internal and external API header
#define AV_PIX_FMT_BGR444
static const AVOption options[]
#define AV_PIX_FMT_RGB555
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
#define AVFILTER_DEFINE_CLASS(fname)
int key_frame
1 -> keyframe, 0-> not
void(* fill_picture_fn)(AVFilterContext *ctx, AVFrame *frame)
#define AV_PIX_FMT_RGB565
void ff_fill_rectangle(FFDrawContext *draw, FFDrawColor *color, uint8_t *dst[], int dst_linesize[], int dst_x, int dst_y, int w, int h)
Fill a rectangle with an uniform color.
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
AVFrame * picref
cached reference containing the painted picture
AVPixelFormat
Pixel format.