83 {{19595, 38470, 7471, 0, 0, 0},
85 { 0, 0, 0, 19595, 38470, 7471}},
87 {{19595, 38470, 7471, 0, 0, 0},
88 { 0, 0, 0, 19595, 38470, 7471},
91 {{19595, 38470, 7471, 0, 0, 0},
92 { 0, 0, 0, 19595, 38470, 7471},
93 { 0, 0, 0, 19595, 38470, 7471}},
95 {{19595, 38470, 7471, 0, 0, 0},
96 { 0, 0, 0, 0, 65536, 0},
97 { 0, 0, 0, 0, 0, 65536}},
99 {{65536, 0, 0, 0, 0, 0},
100 { 0, 0, 0, 0, 65536, 0},
101 { 0, 0, 0, 0, 0, 65536}},
103 {{29884, 32768, 11534, -2818, -5767, -131},
104 {-2621, -2490, -1049, 24773, 48103, -1180},
105 { -983, -1376, -328, -4719, -7406, 80347}},
107 {{ 0, 0, 0, 19595, 38470, 7471},
108 {19595, 38470, 7471, 0, 0, 0},
109 { 0, 0, 0, 19595, 38470, 7471}},
111 {{ 0, 0, 0, 65536, 0, 0},
112 {19595, 38470, 7471, 0, 0, 0},
113 { 0, 0, 0, 0, 0, 65536}},
115 {{ 0, 0, 0, 65536, 0, 0},
116 { 0, 65536, 0, 0, 0, 0},
117 { 0, 0, 0, 0, 0, 65536}},
119 {{-4063,-10354, -2556, 34669, 46203, 1573},
120 {18612, 43778, 9372, -1049, -983, -4260},
121 { -983, -1769, 1376, 590, 4915, 61407}},
123 {{ 0, 0, 0, 19595, 38470, 7471},
124 { 0, 0, 0, 19595, 38470, 7471},
125 {19595, 38470, 7471, 0, 0, 0}},
127 {{ 0, 0, 0, 65536, 0, 0},
128 { 0, 0, 0, 0, 65536, 0},
129 {19595, 38470, 7471, 0, 0, 0}},
131 {{ 0, 0, 0, 65536, 0, 0},
132 { 0, 0, 0, 0, 65536, 0},
133 { 0, 0, 65536, 0, 0, 0}},
135 {{69599,-13435,19595, -1048, -8061, -1114},
136 {-1704, 59507, 4456, 393, 4063, -1114},
137 {-2490,-11338, 1442, 6160, 12124, 59703}},
157#define OFFSET(x) offsetof(Stereo3DContext, x)
158#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
289 switch (
s->out.format) {
325 ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize,
327 const int *ana_matrix_r,
const int *ana_matrix_g,
const int *ana_matrix_b)
331 for (y = 0; y <
height; y++) {
332 for (o = 0, x = 0; x <
width; x++, o+= 3) {
334 dst[o + 1] =
ana_convert(ana_matrix_g, lsrc + o * 2, rsrc + o * 2);
335 dst[o + 2] =
ana_convert(ana_matrix_b, lsrc + o * 2, rsrc + o * 2);
345 ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize,
347 const int *ana_matrix_r,
const int *ana_matrix_g,
const int *ana_matrix_b)
351 for (y = 0; y <
height; y++) {
352 for (o = 0, x = 0; x <
width; x++, o+= 3) {
377 switch (
s->in.format) {
403 s->width = inlink->
w;
405 s->height = inlink->
h;
414 switch (
s->in.format) {
419 s->width = inlink->
w / 2;
420 s->in.off_right =
s->width;
426 s->width = inlink->
w / 2;
427 s->in.off_left =
s->width;
434 s->height = inlink->
h / 2;
441 s->height = inlink->
h / 2;
450 s->width = inlink->
w / 2;
461 s->height = inlink->
h / 2;
468 s->out.width =
s->width;
469 s->out.height =
s->height;
475 s->out.row_right = 0;
478 switch (
s->out.format) {
496 s->ana_matrix[rgba_map[0]] = &
ana_coeff[
s->out.format][0][0];
497 s->ana_matrix[rgba_map[1]] = &
ana_coeff[
s->out.format][1][0];
498 s->ana_matrix[rgba_map[2]] = &
ana_coeff[
s->out.format][2][0];
505 s->out.width =
s->width * 2;
506 s->out.off_right =
s->width;
512 s->out.width =
s->width * 2;
513 s->out.off_left =
s->width;
519 s->out.height =
s->height * 2;
520 s->out.row_right =
s->height;
523 if (
s->height != 720 &&
s->height != 1080) {
528 s->blanks =
s->height / 24;
529 s->out.height =
s->height * 2 +
s->blanks;
530 s->out.row_right =
s->height +
s->blanks;
536 s->out.height =
s->height * 2;
537 s->out.row_left =
s->height;
542 s->out.height =
s->height * 2;
543 s->out.off_rstep = 1;
548 s->out.height =
s->height * 2;
549 s->out.off_lstep = 1;
553 s->in.off_left =
s->in.off_right;
554 s->in.row_left =
s->in.row_right;
557 FFSWAP(
int,
s->in.off_lstep,
s->in.off_rstep);
561 FFSWAP(
int,
s->in.off_lstep,
s->in.off_rstep);
572 s->out.width =
s->width * 2;
580 if ((
s->in.format & 1) != (
s->out.format & 1)) {
581 FFSWAP(
int,
s->in.row_left,
s->in.row_right);
582 FFSWAP(
int,
s->in.off_lstep,
s->in.off_rstep);
583 FFSWAP(
int,
s->in.off_left,
s->in.off_right);
584 FFSWAP(
int,
s->out.row_left,
s->out.row_right);
585 FFSWAP(
int,
s->out.off_lstep,
s->out.off_rstep);
586 FFSWAP(
int,
s->out.off_left,
s->out.off_right);
590 outlink->
w =
s->out.width;
591 outlink->
h =
s->out.height;
601 s->pheight[0] =
s->pheight[3] =
s->height;
602 s->hsub =
desc->log2_chroma_w;
603 s->vsub =
desc->log2_chroma_h;
606#if ARCH_X86 && HAVE_X86ASM
628 const int **ana_matrix =
s->ana_matrix;
630 s->dsp.anaglyph(
out->data[0] +
out->linesize[0] * start,
631 ileft ->
data[0] +
s->in_off_left [0] + ileft->
linesize[0] * start *
s->in.row_step,
632 iright->
data[0] +
s->in_off_right[0] + iright->
linesize[0] * start *
s->in.row_step,
636 s->out.width, end - start,
637 ana_matrix[0], ana_matrix[1], ana_matrix[2]);
646 for (y = 0; y <
s->pheight[p]; y++) {
647 const uint8_t *
src = (
const uint8_t*)in->
data[p] + y * in->
linesize[p] + d *
s->pixstep[p];
648 uint8_t *
dst =
out->data[p] + out_off[p] + y *
out->linesize[p] *
s->out.row_step;
650 switch (
s->pixstep[p]) {
652 for (x = 0; x <
s->linesize[p]; x++)
656 for (x = 0; x <
s->linesize[p]; x+=2)
660 for (x = 0; x <
s->linesize[p]; x+=3)
664 for (x = 0; x <
s->linesize[p]; x+=4)
668 for (x = 0; x <
s->linesize[p]; x+=6)
672 for (x = 0; x <
s->linesize[p]; x+=8)
685 int out_off_left[4], out_off_right[4];
688 if (
s->in.format ==
s->out.format)
691 switch (
s->out.format) {
701 switch (
s->in.format) {
714 ileft = iright = inpicref;
731 if (!oright || !oleft) {
738 }
else if ((
s->out.format ==
MONO_L ||
797 for (
i = 0;
i < 4;
i++) {
798 int hsub =
i == 1 ||
i == 2 ?
s->hsub : 0;
799 int vsub =
i == 1 ||
i == 2 ?
s->vsub : 0;
806 switch (
s->out.format) {
809 switch (
s->in.format) {
812 for (
i = 0;
i <
s->nb_planes;
i++) {
813 oleft->linesize[
i] *= 2;
814 oright->linesize[
i] *= 2;
825 oleft->width = outlink->
w;
826 oright->width = outlink->
w;
827 oleft->height = outlink->
h;
828 oright->height = outlink->
h;
830 for (
i = 0;
i <
s->nb_planes;
i++) {
831 oleft->data[
i] +=
s->in_off_left[
i];
832 oright->data[
i] +=
s->in_off_right[
i];
841 for (
i = 0;
i <
s->nb_planes;
i++) {
842 int j,
h =
s->height >> ((
i == 1 ||
i == 2) ?
s->vsub : 0);
843 int b = (
s->blanks) >> ((
i == 1 ||
i == 2) ?
s->vsub : 0);
845 for (j =
h; j <
h +
b; j++)
846 memset(oleft->data[
i] + j *
s->linesize[
i], 0,
s->linesize[
i]);
862 for (
i = 0;
i <
s->nb_planes;
i++) {
863 int d = (
s->in.format & 1) != (
s->out.format & 1);
869 for (
i = 0;
i <
s->nb_planes;
i++) {
871 oleft->linesize[
i] *
s->out.row_step,
872 ileft->data[
i] +
s->in_off_left[
i],
873 ileft->linesize[
i] *
s->in.row_step,
874 s->linesize[
i],
s->pheight[
i]);
876 oright->linesize[
i] *
s->out.row_step,
877 iright->data[
i] +
s->in_off_right[
i],
878 iright->linesize[
i] *
s->in.row_step,
879 s->linesize[
i],
s->pheight[
i]);
887 switch (
s->in.format) {
890 for (
i = 0;
i <
s->nb_planes;
i++) {
891 out->linesize[
i] *= 2;
902 out->width = outlink->
w;
903 out->height = outlink->
h;
905 for (
i = 0;
i <
s->nb_planes;
i++) {
906 out->data[
i] +=
s->in_off_left[
i];
911 for (
i = 0;
i <
s->nb_planes;
i++) {
912 const int d = (
s->in.format & 1) != (
s->out.format & 1);
918 for (
i = 0;
i <
s->nb_planes;
i++) {
920 iright->data[
i] +
s->in_off_left[
i],
921 iright->linesize[
i] *
s->in.row_step,
922 s->linesize[
i],
s->pheight[
i]);
943 const int d = (
s->in.format & 1);
946 ileft ->data[0] +
s->in_off_left [0] + d * 3,
947 iright->data[0] +
s->in_off_right[0] + (!d) * 3,
949 ileft->linesize[0] *
s->in.row_step,
950 iright->linesize[0] *
s->in.row_step,
951 s->out.width,
s->out.height,
952 s->ana_matrix[0],
s->ana_matrix[1],
s->ana_matrix[2]);
964 for (
i = 0;
i <
s->nb_planes;
i++) {
967 for (y = 0; y <
s->pheight[
i]; y++) {
968 uint8_t *
dst =
out->data[
i] +
out->linesize[
i] * y;
972 uint8_t *
left = ileft->data[
i] + ileft->linesize[
i] * y +
s->in_off_left[
i] + d1 *
s->pixstep[
i];
973 uint8_t *right = iright->data[
i] + iright->linesize[
i] * y +
s->in_off_right[
i] + d2 *
s->pixstep[
i];
978 switch (
s->pixstep[
i]) {
980 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=2, p++,
b+=2) {
981 dst[x ] = (
b&1) == (y&1) ?
left[p*m] : right[p*m];
982 dst[x+1] = (
b&1) != (y&1) ?
left[p*m] : right[p*m];
986 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=4, p+=2,
b+=2) {
992 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=6, p+=3,
b+=2) {
998 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=8, p+=4,
b+=2) {
1004 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=12, p+=6,
b+=2) {
1010 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=16, p+=8,
b+=2) {
1021 for (
i = 0;
i <
s->nb_planes;
i++) {
1023 const int m = 1 + d;
1026 for (y = 0; y <
s->pheight[
i]; y++) {
1027 uint8_t *
dst =
out->data[
i] +
out->linesize[
i] * y;
1028 uint8_t *
left = ileft->data[
i] + ileft->linesize[
i] * y *
s->in.row_step +
s->in_off_left[
i] + d *
s->pixstep[
i];
1029 uint8_t *right = iright->data[
i] + iright->linesize[
i] * y *
s->in.row_step +
s->in_off_right[
i];
1035 switch (
s->pixstep[
i]) {
1037 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=2, p++,
b+=2) {
1038 dst[x ] =
b&1 ?
left[p*m] : right[p*m];
1039 dst[x+1] = !(
b&1) ?
left[p*m] : right[p*m];
1043 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=4, p+=2,
b+=2) {
1049 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=6, p+=3,
b+=2) {
1055 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=8, p+=4,
b+=2) {
1061 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=12, p+=6,
b+=2) {
1067 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=16, p+=8,
b+=2) {
1080 if (oright != oleft) {
1083 oright->pts =
s->prev->pts * 2;
1086 oleft->pts =
s->prev->pts + inpicref->
pts;
1091 out->pts =
s->prev->pts / 2;
1099 out->sample_aspect_ratio =
s->aspect;
1127 .p.name =
"stereo3d",
1129 .p.priv_class = &stereo3d_class,
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
const FFFilter ff_vf_stereo3d
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Main libavfilter public API header.
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
#define i(width, name, range_min, range_max)
#define AV_CEIL_RSHIFT(a, b)
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
Copy image plane from src to dst.
int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width)
Fill plane linesizes for an image with pixel format pix_fmt and width width.
void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], const AVPixFmtDescriptor *pixdesc)
Compute the max pixel step for each plane of an image with a format described by pixdesc.
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int config_output(AVBitStreamFilterLink *outlink)
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
static int ff_slice_pos(int total, int jobnr, int nb_jobs)
Compute the boundary index for a slice when work of size total is split into nb_jobs slices.
static FilterLink * ff_filter_link(AVFilterLink *link)
#define AVFILTER_DEFINE_CLASS(fname)
#define FILTER_QUERY_FUNC2(func)
void ff_stereo3d_init_x86(Stereo3DDSPContext *dsp)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static enum AVPixelFormat pix_fmts[]
#define FFSWAP(type, a, b)
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_YUV444P16BE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUV420P16BE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
@ AV_PIX_FMT_YUVA420P9BE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
@ AV_PIX_FMT_YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
@ AV_PIX_FMT_YUV444P14BE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUVA420P10BE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
@ AV_PIX_FMT_YUVA422P9LE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
@ AV_PIX_FMT_BGR48BE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_RGB48BE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
@ AV_PIX_FMT_YUV422P10BE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
@ AV_PIX_FMT_RGBA64BE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_RGBA64LE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
@ AV_PIX_FMT_YUV422P16LE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV420P14BE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA444P9BE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV444P10BE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUVA422P10BE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
@ AV_PIX_FMT_YUVA422P16BE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
@ AV_PIX_FMT_BGRA64BE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
@ AV_PIX_FMT_YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_RGB48LE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
@ AV_PIX_FMT_YUVA420P16BE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
@ AV_PIX_FMT_YUV444P9BE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUV422P9LE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV422P9BE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_BGR48LE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
@ AV_PIX_FMT_YUV420P12BE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_BGRA64LE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_YUV422P16BE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV420P10BE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
@ AV_PIX_FMT_YUVA444P10BE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
@ AV_PIX_FMT_YUV422P14BE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
@ AV_PIX_FMT_YUV444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUVA444P16BE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
@ AV_PIX_FMT_YUVA422P16LE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
@ AV_PIX_FMT_YUVA422P9BE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
@ AV_PIX_FMT_YUV422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Describe the class of an AVClass context structure.
A link between two filters.
int w
agreed upon image width
int h
agreed upon image height
AVFilterContext * src
source filter
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link.
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
AVFilterContext * dst
dest filter
int format
agreed upon media format
A filter pad used for either input or output.
This structure describes decoded (raw) audio or video data.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Rational number (pair of numerator and denominator).
Link properties exposed to filter code, but not external callers.
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown or variable.
const int * ana_matrix[3]
Used for passing data between threads.
static AVFormatContext * ctx
static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static const double coeff[2][5]
static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static enum AVPixelFormat anaglyph_pix_fmts[]
static uint8_t ana_convert(const int *coeff, const uint8_t *left, const uint8_t *right)
static void interleave_cols_to_any(Stereo3DContext *s, int *out_off, int p, AVFrame *in, AVFrame *out, int d)
static void anaglyph_ic(uint8_t *dst, uint8_t *lsrc, uint8_t *rsrc, ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize, int width, int height, const int *ana_matrix_r, const int *ana_matrix_g, const int *ana_matrix_b)
static void anaglyph(uint8_t *dst, uint8_t *lsrc, uint8_t *rsrc, ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize, int width, int height, const int *ana_matrix_r, const int *ana_matrix_g, const int *ana_matrix_b)
static const int ana_coeff[][3][6]
static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
static const AVFilterPad stereo3d_inputs[]
static const AVOption stereo3d_options[]
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
static av_cold void uninit(AVFilterContext *ctx)
static int config_output(AVFilterLink *outlink)
static const AVFilterPad stereo3d_outputs[]
static enum AVPixelFormat other_pix_fmts[]
static void copy(const float *p1, float *p2, const int length)
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.