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
288 switch (
s->out.format) {
319 sum =
coeff[0] * left[0] +
coeff[3] * right[0];
320 sum +=
coeff[1] * left[1] +
coeff[4] * right[1];
321 sum +=
coeff[2] * left[2] +
coeff[5] * right[2];
327 ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize,
329 const int *ana_matrix_r,
const int *ana_matrix_g,
const int *ana_matrix_b)
333 for (y = 0; y <
height; y++) {
334 for (o = 0, x = 0; x <
width; x++, o+= 3) {
347 ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize,
349 const int *ana_matrix_r,
const int *ana_matrix_g,
const int *ana_matrix_b)
353 for (y = 0; y <
height; y++) {
354 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) {
418 s->width = inlink->
w / 2;
419 s->in.off_right =
s->width;
424 s->width = inlink->
w / 2;
425 s->in.off_left =
s->width;
431 s->height = inlink->
h / 2;
437 s->height = inlink->
h / 2;
446 s->width = inlink->
w / 2;
457 s->height = inlink->
h / 2;
464 s->out.width =
s->width;
465 s->out.height =
s->height;
471 s->out.row_right = 0;
474 switch (
s->out.format) {
492 s->ana_matrix[rgba_map[0]] = &
ana_coeff[
s->out.format][0][0];
493 s->ana_matrix[rgba_map[1]] = &
ana_coeff[
s->out.format][1][0];
494 s->ana_matrix[rgba_map[2]] = &
ana_coeff[
s->out.format][2][0];
500 s->out.width =
s->width * 2;
501 s->out.off_right =
s->width;
506 s->out.width =
s->width * 2;
507 s->out.off_left =
s->width;
512 s->out.height =
s->height * 2;
513 s->out.row_right =
s->height;
516 if (
s->height != 720 &&
s->height != 1080) {
521 s->blanks =
s->height / 24;
522 s->out.height =
s->height * 2 +
s->blanks;
523 s->out.row_right =
s->height +
s->blanks;
528 s->out.height =
s->height * 2;
529 s->out.row_left =
s->height;
534 s->out.height =
s->height * 2;
535 s->out.off_rstep = 1;
540 s->out.height =
s->height * 2;
541 s->out.off_lstep = 1;
545 s->in.off_left =
s->in.off_right;
546 s->in.row_left =
s->in.row_right;
549 FFSWAP(
int,
s->in.off_lstep,
s->in.off_rstep);
553 FFSWAP(
int,
s->in.off_lstep,
s->in.off_rstep);
564 s->out.width =
s->width * 2;
572 if ((
s->in.format & 1) != (
s->out.format & 1)) {
573 FFSWAP(
int,
s->in.row_left,
s->in.row_right);
574 FFSWAP(
int,
s->in.off_lstep,
s->in.off_rstep);
575 FFSWAP(
int,
s->in.off_left,
s->in.off_right);
576 FFSWAP(
int,
s->out.row_left,
s->out.row_right);
577 FFSWAP(
int,
s->out.off_lstep,
s->out.off_rstep);
578 FFSWAP(
int,
s->out.off_left,
s->out.off_right);
582 outlink->
w =
s->out.width;
583 outlink->
h =
s->out.height;
593 s->pheight[0] =
s->pheight[3] =
s->height;
594 s->hsub =
desc->log2_chroma_w;
595 s->vsub =
desc->log2_chroma_h;
617 int start = (
height * jobnr ) / nb_jobs;
618 int end = (
height * (jobnr+1)) / nb_jobs;
619 const int **ana_matrix =
s->ana_matrix;
621 s->dsp.anaglyph(
out->data[0] +
out->linesize[0] * start,
622 ileft ->
data[0] +
s->in_off_left [0] + ileft->
linesize[0] * start *
s->in.row_step,
623 iright->
data[0] +
s->in_off_right[0] + iright->
linesize[0] * start *
s->in.row_step,
627 s->out.width, end - start,
628 ana_matrix[0], ana_matrix[1], ana_matrix[2]);
637 for (y = 0; y <
s->pheight[p]; y++) {
639 uint8_t *dst =
out->data[p] + out_off[p] + y *
out->linesize[p] *
s->out.row_step;
641 switch (
s->pixstep[p]) {
643 for (x = 0; x <
s->linesize[p]; x++)
647 for (x = 0; x <
s->linesize[p]; x+=2)
651 for (x = 0; x <
s->linesize[p]; x+=3)
655 for (x = 0; x <
s->linesize[p]; x+=4)
659 for (x = 0; x <
s->linesize[p]; x+=6)
663 for (x = 0; x <
s->linesize[p]; x+=8)
676 int out_off_left[4], out_off_right[4];
679 if (
s->in.format ==
s->out.format)
682 switch (
s->out.format) {
692 switch (
s->in.format) {
705 ileft = iright = inpicref;
722 if (!oright || !oleft) {
729 }
else if ((
s->out.format ==
MONO_L ||
788 for (
i = 0;
i < 4;
i++) {
789 int hsub =
i == 1 ||
i == 2 ?
s->hsub : 0;
790 int vsub =
i == 1 ||
i == 2 ?
s->vsub : 0;
797 switch (
s->out.format) {
800 switch (
s->in.format) {
803 for (
i = 0;
i <
s->nb_planes;
i++) {
804 oleft->linesize[
i] *= 2;
805 oright->linesize[
i] *= 2;
815 oleft->width = outlink->
w;
816 oright->width = outlink->
w;
817 oleft->height = outlink->
h;
818 oright->height = outlink->
h;
820 for (
i = 0;
i <
s->nb_planes;
i++) {
821 oleft->data[
i] +=
s->in_off_left[
i];
822 oright->data[
i] +=
s->in_off_right[
i];
831 for (
i = 0;
i <
s->nb_planes;
i++) {
832 int j,
h =
s->height >> ((
i == 1 ||
i == 2) ?
s->vsub : 0);
833 int b = (
s->blanks) >> ((
i == 1 ||
i == 2) ?
s->vsub : 0);
835 for (j =
h; j <
h +
b; j++)
836 memset(oleft->data[
i] + j *
s->linesize[
i], 0,
s->linesize[
i]);
851 for (
i = 0;
i <
s->nb_planes;
i++) {
852 int d = (
s->in.format & 1) != (
s->out.format & 1);
858 for (
i = 0;
i <
s->nb_planes;
i++) {
860 oleft->linesize[
i] *
s->out.row_step,
861 ileft->data[
i] +
s->in_off_left[
i],
862 ileft->linesize[
i] *
s->in.row_step,
863 s->linesize[
i],
s->pheight[
i]);
865 oright->linesize[
i] *
s->out.row_step,
866 iright->data[
i] +
s->in_off_right[
i],
867 iright->linesize[
i] *
s->in.row_step,
868 s->linesize[
i],
s->pheight[
i]);
875 switch (
s->in.format) {
878 for (
i = 0;
i <
s->nb_planes;
i++) {
879 out->linesize[
i] *= 2;
889 out->width = outlink->
w;
890 out->height = outlink->
h;
892 for (
i = 0;
i <
s->nb_planes;
i++) {
893 out->data[
i] +=
s->in_off_left[
i];
898 for (
i = 0;
i <
s->nb_planes;
i++) {
899 const int d = (
s->in.format & 1) != (
s->out.format & 1);
905 for (
i = 0;
i <
s->nb_planes;
i++) {
907 iright->data[
i] +
s->in_off_left[
i],
908 iright->linesize[
i] *
s->in.row_step,
909 s->linesize[
i],
s->pheight[
i]);
930 const int d = (
s->in.format & 1);
933 ileft ->data[0] +
s->in_off_left [0] + d * 3,
934 iright->data[0] +
s->in_off_right[0] + (!d) * 3,
936 ileft->linesize[0] *
s->in.row_step,
937 iright->linesize[0] *
s->in.row_step,
938 s->out.width,
s->out.height,
939 s->ana_matrix[0],
s->ana_matrix[1],
s->ana_matrix[2]);
943 td.ileft = ileft;
td.iright = iright;
td.out =
out;
951 for (
i = 0;
i <
s->nb_planes;
i++) {
954 for (y = 0; y <
s->pheight[
i]; y++) {
959 uint8_t *left = ileft->data[
i] + ileft->linesize[
i] * y +
s->in_off_left[
i] + d1 *
s->pixstep[
i];
960 uint8_t *right = iright->data[
i] + iright->linesize[
i] * y +
s->in_off_right[
i] + d2 *
s->pixstep[
i];
965 switch (
s->pixstep[
i]) {
967 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=2, p++,
b+=2) {
968 dst[x ] = (
b&1) == (y&1) ? left[p*m] : right[p*m];
969 dst[x+1] = (
b&1) != (y&1) ? left[p*m] : right[p*m];
973 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=4, p+=2,
b+=2) {
979 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=6, p+=3,
b+=2) {
985 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=8, p+=4,
b+=2) {
991 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=12, p+=6,
b+=2) {
997 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=16, p+=8,
b+=2) {
1008 for (
i = 0;
i <
s->nb_planes;
i++) {
1010 const int m = 1 + d;
1013 for (y = 0; y <
s->pheight[
i]; y++) {
1015 uint8_t *left = ileft->data[
i] + ileft->linesize[
i] * y *
s->in.row_step +
s->in_off_left[
i] + d *
s->pixstep[
i];
1016 uint8_t *right = iright->data[
i] + iright->linesize[
i] * y *
s->in.row_step +
s->in_off_right[
i];
1022 switch (
s->pixstep[
i]) {
1024 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=2, p++,
b+=2) {
1025 dst[x ] =
b&1 ? left[p*m] : right[p*m];
1026 dst[x+1] = !(
b&1) ? left[p*m] : right[p*m];
1030 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=4, p+=2,
b+=2) {
1036 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=6, p+=3,
b+=2) {
1042 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=8, p+=4,
b+=2) {
1048 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=12, p+=6,
b+=2) {
1054 for (x = 0,
b = 0, p = 0; x <
s->linesize[
i] * 2; x+=16, p+=8,
b+=2) {
1067 if (oright != oleft) {
1070 oright->pts =
s->prev->pts * 2;
1073 oleft->pts =
s->prev->pts + inpicref->
pts;
1078 out->pts =
s->prev->pts / 2;
1086 out->sample_aspect_ratio =
s->aspect;
1123 .priv_class = &stereo3d_class,
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
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_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Main libavfilter public API header.
#define flags(name, subs,...)
#define FFSWAP(type, a, b)
#define AV_CEIL_RSHIFT(a, b)
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
#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.
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
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.
#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.
void ff_stereo3d_init_x86(Stereo3DDSPContext *dsp)
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static enum AVPixelFormat pix_fmts[]
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
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown or variable; if left to 0/0,...
AVFilterContext * dst
dest filter
int format
agreed upon media format
A filter pad used for either input or output.
const char * name
Pad name.
const char * name
Filter name.
AVFormatInternal * internal
An opaque field for libavformat internal usage.
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, 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...
Rational number (pair of numerator and denominator).
const int * ana_matrix[3]
Used for passing data between threads.
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 query_formats(AVFilterContext *ctx)
static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
static const AVFilterPad stereo3d_inputs[]
AVFILTER_DEFINE_CLASS(stereo3d)
static const AVOption stereo3d_options[]
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.