38 #include "libavutil/avassert.h"
39 #include "libavutil/common.h"
40 #include "libavutil/opt.h"
41 #include "libavutil/imgutils.h"
42 #include "libavutil/intreadwrite.h"
43 #include "libavutil/parseutils.h"
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);
235 if (!strcmp(cmd,
"color") || !strcmp(cmd,
"c")) {
242 memcpy(test->
color_rgba, color_rgba,
sizeof(color_rgba));
256 .config_props = color_config_props,
264 .priv_class = &color_class,
276 #if CONFIG_HALDCLUTSRC_FILTER
278 static const AVOption haldclutsrc_options[] = {
288 int i, j, k, x = 0,
y = 0, is16bit = 0, step;
293 const int w = frame->
width;
294 const int h = frame->
height;
296 const int linesize = frame->
linesize[0];
321 scale = ((float)(1 << (8*(is16bit+1))) - 1) / (level*level - 1);
323 #define LOAD_CLUT(nbits) do { \
324 uint##nbits##_t *dst = ((uint##nbits##_t *)(data + y*linesize)) + x*step; \
325 dst[rgba_map[0]] = av_clip_uint##nbits(i * scale); \
326 dst[rgba_map[1]] = av_clip_uint##nbits(j * scale); \
327 dst[rgba_map[2]] = av_clip_uint##nbits(k * scale); \
329 dst[rgba_map[3]] = alpha; \
333 for (k = 0; k <
level; k++) {
334 for (j = 0; j <
level; j++) {
335 for (i = 0; i <
level; i++) {
373 static int haldclutsrc_config_props(
AVFilterLink *outlink)
387 .config_props = haldclutsrc_config_props,
392 AVFilter avfilter_vsrc_haldclutsrc = {
393 .
name =
"haldclutsrc",
395 .priv_class = &haldclutsrc_class,
397 .
init = haldclutsrc_init,
401 .
outputs = haldclutsrc_outputs,
405 #if CONFIG_NULLSRC_FILTER
407 #define nullsrc_options options
433 .init = nullsrc_init,
436 .priv_class = &nullsrc_class,
443 #if CONFIG_TESTSRC_FILTER
445 static const AVOption testsrc_options[] = {
466 static void draw_rectangle(
unsigned val,
uint8_t *dst,
int dst_linesize,
int segment_width,
467 int x,
int y,
int w,
int h)
472 dst += segment_width * (step * x + y * dst_linesize);
473 w *= segment_width * step;
475 for (i = 0; i < h; i++) {
481 static void draw_digit(
int digit,
uint8_t *dst,
int dst_linesize,
487 #define LEFT_TOP_VBAR 8
488 #define LEFT_BOT_VBAR 16
489 #define RIGHT_TOP_VBAR 32
490 #define RIGHT_BOT_VBAR 64
502 static const unsigned char masks[10] = {
503 TOP_HBAR |BOT_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR|RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
504 RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
505 TOP_HBAR|MID_HBAR|BOT_HBAR|LEFT_BOT_VBAR |RIGHT_TOP_VBAR,
506 TOP_HBAR|MID_HBAR|BOT_HBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
507 MID_HBAR |LEFT_TOP_VBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
508 TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR |RIGHT_BOT_VBAR,
509 TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR |RIGHT_BOT_VBAR,
510 TOP_HBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
511 TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR|RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
512 TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR,
514 unsigned mask = masks[digit];
517 draw_rectangle(0, dst, dst_linesize, segment_width, 0, 0, 8, 13);
520 draw_rectangle(255, dst, dst_linesize, segment_width,
521 segments[i].x, segments[i].y, segments[i].w, segments[i].h);
524 #define GRADIENT_SIZE (6 * 256)
531 int color, color_rest;
535 int dquad_x, dquad_y;
536 int grad, dgrad, rgrad, drgrad;
545 radius = (width +
height) / 4;
546 quad0 = width * width / 4 + height * height / 4 - radius * radius;
549 for (y = 0; y <
height; y++) {
555 for (x = 0; x <
width; x++) {
561 *(p++) = icolor & 1 ? 255 : 0;
562 *(p++) = icolor & 2 ? 255 : 0;
563 *(p++) = icolor & 4 ? 255 : 0;
565 if (color_rest >= width) {
576 p0 = p = data + frame->
linesize[0] * (height * 3/4);
580 dgrad = GRADIENT_SIZE /
width;
581 drgrad = GRADIENT_SIZE %
width;
582 for (x = 0; x <
width; x++) {
584 grad < 256 || grad >= 5 * 256 ? 255 :
585 grad >= 2 * 256 && grad < 4 * 256 ? 0 :
586 grad < 2 * 256 ? 2 * 256 - 1 - grad : grad - 4 * 256;
588 grad >= 4 * 256 ? 0 :
589 grad >= 1 * 256 && grad < 3 * 256 ? 255 :
590 grad < 1 * 256 ? grad : 4 * 256 - 1 - grad;
593 grad >= 3 * 256 && grad < 5 * 256 ? 255 :
594 grad < 3 * 256 ? grad - 2 * 256 : 6 * 256 - 1 - grad;
597 if (rgrad >= GRADIENT_SIZE) {
599 rgrad -= GRADIENT_SIZE;
601 if (grad >= GRADIENT_SIZE)
602 grad -= GRADIENT_SIZE;
605 for (y = height / 8; y > 0; y--) {
606 memcpy(p+frame->
linesize[0], p, 3 * width);
611 seg_size = width / 80;
612 if (seg_size >= 1 && height >= 13 * seg_size) {
613 int64_t p10decimals = 1;
623 x = width - (width - seg_size * 64) / 2;
624 y = (height - seg_size * 13) / 2;
625 p = data + (x*3 + y * frame->
linesize[0]);
626 for (i = 0; i < 8; i++) {
627 p -= 3 * 8 * seg_size;
628 draw_digit(second % 10, p, frame->
linesize[0], seg_size);
653 static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = {
667 .priv_class = &testsrc_class,
672 .
outputs = avfilter_vsrc_testsrc_outputs,
677 #if CONFIG_RGBTESTSRC_FILTER
679 #define rgbtestsrc_options options
687 static void rgbtest_put_pixel(
uint8_t *dst,
int dst_linesize,
695 case AV_PIX_FMT_BGR444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r >> 4) << 8) | ((g >> 4) << 4) | (b >> 4);
break;
696 case AV_PIX_FMT_RGB444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b >> 4) << 8) | ((g >> 4) << 4) | (r >> 4);
break;
697 case AV_PIX_FMT_BGR555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<10) | ((g>>3)<<5) | (b>>3);
break;
698 case AV_PIX_FMT_RGB555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<10) | ((g>>3)<<5) | (r>>3);
break;
699 case AV_PIX_FMT_BGR565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3);
break;
700 case AV_PIX_FMT_RGB565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<11) | ((g>>2)<<5) | (r>>3);
break;
703 v = (r << (rgba_map[
R]*8)) + (g << (rgba_map[
G]*8)) + (b << (rgba_map[
B]*8));
704 p = dst + 3*x + y*dst_linesize;
711 v = (r << (rgba_map[
R]*8)) + (g << (rgba_map[
G]*8)) + (b << (rgba_map[
B]*8)) + (255 << (rgba_map[
A]*8));
712 p = dst + 4*x + y*dst_linesize;
723 for (y = 0; y < h; y++) {
724 for (x = 0; x < w; x++) {
726 int r = 0, g = 0, b = 0;
729 else if (3*y < 2*h) g =
c;
732 rgbtest_put_pixel(frame->
data[0], frame->
linesize[0], x, y, r, g, b,
769 static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = {
774 .config_props = rgbtest_config_props,
779 AVFilter avfilter_vsrc_rgbtestsrc = {
780 .
name =
"rgbtestsrc",
783 .priv_class = &rgbtestsrc_class,
784 .
init = rgbtest_init,
788 .
outputs = avfilter_vsrc_rgbtestsrc_outputs,
793 #if CONFIG_SMPTEBARS_FILTER || CONFIG_SMPTEHDBARS_FILTER
795 static const uint8_t rainbow[7][4] = {
796 { 180, 128, 128, 255 },
797 { 168, 44, 136, 255 },
798 { 145, 147, 44, 255 },
799 { 133, 63, 52, 255 },
800 { 63, 193, 204, 255 },
801 { 51, 109, 212, 255 },
802 { 28, 212, 120, 255 },
805 static const uint8_t wobnair[7][4] = {
806 { 32, 240, 118, 255 },
807 { 19, 128, 128, 255 },
808 { 54, 184, 198, 255 },
809 { 19, 128, 128, 255 },
810 { 188, 154, 16, 255 },
811 { 19, 128, 128, 255 },
812 { 191, 128, 128, 255 },
815 static const uint8_t white[4] = { 235, 128, 128, 255 };
816 static const uint8_t black[4] = { 19, 128, 128, 255 };
819 static const uint8_t neg4ire[4] = { 9, 128, 128, 255 };
820 static const uint8_t pos4ire[4] = { 29, 128, 128, 255 };
823 static const uint8_t i_pixel[4] = { 61, 153, 99, 255 };
824 static const uint8_t q_pixel[4] = { 35, 174, 152, 255 };
826 static const uint8_t gray40[4] = { 104, 128, 128, 255 };
827 static const uint8_t gray15[4] = { 49, 128, 128, 255 };
828 static const uint8_t cyan[4] = { 188, 154, 16, 255 };
829 static const uint8_t yellow[4] = { 219, 16, 138, 255 };
830 static const uint8_t blue[4] = { 32, 240, 118, 255 };
831 static const uint8_t red[4] = { 63, 102, 240, 255 };
832 static const uint8_t black0[4] = { 16, 128, 128, 255 };
833 static const uint8_t black2[4] = { 20, 128, 128, 255 };
834 static const uint8_t black4[4] = { 25, 128, 128, 255 };
835 static const uint8_t neg2[4] = { 12, 128, 128, 255 };
838 unsigned x,
unsigned y,
unsigned w,
unsigned h,
845 x =
FFMIN(x, test->
w - 1);
846 y =
FFMIN(y, test->
h - 1);
847 w =
FFMIN(w, test->
w - x);
848 h =
FFMIN(h, test->
h - y);
853 for (plane = 0; frame->
data[plane]; plane++) {
854 const int c = color[plane];
855 const int linesize = frame->
linesize[plane];
856 int i, px, py, pw, ph;
858 if (plane == 1 || plane == 2) {
870 p0 = p = frame->
data[plane] + py * linesize + px;
873 for (i = 1; i < ph; i++, p += linesize)
900 #if CONFIG_SMPTEBARS_FILTER
902 #define smptebars_options options
908 int r_w, r_h, w_h, p_w, p_h, i, tmp, x = 0;
917 p_h = test->
h - w_h - r_h;
919 for (i = 0; i < 7; i++) {
920 draw_bar(test, rainbow[i], x, 0, r_w, r_h, picref);
921 draw_bar(test, wobnair[i], x, r_h, r_w, w_h, picref);
925 draw_bar(test, i_pixel, x, r_h + w_h, p_w, p_h, picref);
927 draw_bar(test, white, x, r_h + w_h, p_w, p_h, picref);
929 draw_bar(test, q_pixel, x, r_h + w_h, p_w, p_h, picref);
932 draw_bar(test, black, x, r_h + w_h, tmp, p_h, picref);
935 draw_bar(test, neg4ire, x, r_h + w_h, tmp, p_h, picref);
937 draw_bar(test, black, x, r_h + w_h, tmp, p_h, picref);
939 draw_bar(test, pos4ire, x, r_h + w_h, tmp, p_h, picref);
941 draw_bar(test, black, x, r_h + w_h, test->
w - x, p_h, picref);
953 AVFilter avfilter_vsrc_smptebars = {
957 .priv_class = &smptebars_class,
958 .
init = smptebars_init,
967 #if CONFIG_SMPTEHDBARS_FILTER
969 #define smptehdbars_options options
975 int d_w, r_w, r_h, l_w, i, tmp, x = 0, y = 0;
982 draw_bar(test, gray40, x, 0, d_w, r_h, picref);
986 for (i = 0; i < 7; i++) {
987 draw_bar(test, rainbow[i], x, 0, r_w, r_h, picref);
990 draw_bar(test, gray40, x, 0, test->
w - x, r_h, picref);
993 draw_bar(test, cyan, 0, y, d_w, r_h, picref);
995 draw_bar(test, i_pixel, x, y, r_w, r_h, picref);
998 draw_bar(test, rainbow[0], x, y, tmp, r_h, picref);
1001 draw_bar(test, blue, x, y, test->
w - x, r_h, picref);
1003 draw_bar(test, yellow, 0, y, d_w, r_h, picref);
1005 draw_bar(test, q_pixel, x, y, r_w, r_h, picref);
1011 yramp[0] = i * 255 / tmp;
1016 draw_bar(test, yramp, x, y, 1 << pixdesc->
log2_chroma_w, r_h, picref);
1019 draw_bar(test, red, x, y, test->
w - x, r_h, picref);
1021 draw_bar(test, gray15, 0, y, d_w, test->
h - y, picref);
1024 draw_bar(test, black0, x, y, tmp, test->
h - y, picref);
1027 draw_bar(test, white, x, y, tmp, test->
h - y, picref);
1030 draw_bar(test, black0, x, y, tmp, test->
h - y, picref);
1033 draw_bar(test, neg2, x, y, tmp, test->
h - y, picref);
1035 draw_bar(test, black0, x, y, tmp, test->
h - y, picref);
1037 draw_bar(test, black2, x, y, tmp, test->
h - y, picref);
1039 draw_bar(test, black0, x, y, tmp, test->
h - y, picref);
1041 draw_bar(test, black4, x, y, tmp, test->
h - y, picref);
1044 draw_bar(test, black0, x, y, r_w, test->
h - y, picref);
1046 draw_bar(test, gray15, x, y, test->
w - x, test->
h - y, picref);
1058 AVFilter avfilter_vsrc_smptehdbars = {
1059 .
name =
"smptehdbars",
1062 .priv_class = &smptehdbars_class,
1063 .
init = smptehdbars_init,
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
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const
Rescale a 64-bit integer with specified rounding.
#define AV_PIX_FMT_BGR555
void * priv
private data for use by the filter
static const AVFilterPad outputs[]
int h
agreed upon image height
packed RGB 8:8:8, 24bpp, RGBRGB...
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
static av_cold void uninit(AVFilterContext *ctx)
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
#define COMMON_OPTIONS_NOSIZE
static int query_formats(AVFilterContext *ctx)
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
packed RGB 8:8:8, 32bpp, RGB0RGB0...
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
packed BGR 8:8:8, 32bpp, 0BGR0BGR...
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
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.
packed RGB 8:8:8, 24bpp, BGRBGR...
const char * name
Pad name.
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.
#define AV_PIX_FMT_RGB555
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 AV_LOG_VERBOSE
Detailed information.
int interlaced_frame
The content of the picture is interlaced.
#define AV_PIX_FMT_RGBA64
const OptionDef options[]
A filter pad used for either input or output.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const
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]
packed BGR 8:8:8, 32bpp, BGR0BGR0...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4])
Prepare a color.
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
AVFilterContext * src
source filter
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVPixelFormat
Pixel format.
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val)
int w
agreed upon image width
#define FF_ARRAY_ELEMS(a)
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
static int config_props(AVFilterLink *outlink)
static int process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
int format
agreed upon media format
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
Main libavfilter public API header.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
AVFilterLink ** outputs
array of pointers to output links
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
typedef void(RENAME(mix_any_func_type))
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define AV_PIX_FMT_RGB565
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
BYTE int const BYTE int int int height
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
rational number numerator/denominator
#define AV_PIX_FMT_BGRA64
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
Init a draw context.
#define AV_PIX_FMT_RGB444
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
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.
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
static const uint16_t scale[4]
AVFrame * av_frame_clone(AVFrame *src)
Create a new frame that references the same data as src.
#define AV_PIX_FMT_BGR444
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
#define AVFILTER_DEFINE_CLASS(fname)
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
int key_frame
1 -> keyframe, 0-> not
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
void(* fill_picture_fn)(AVFilterContext *ctx, AVFrame *frame)
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_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.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define AV_PIX_FMT_BGR565
packed RGB 8:8:8, 32bpp, 0RGB0RGB...
AVFrame * picref
cached reference containing the painted picture
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)