58 #define OFFSET(x) offsetof(DatascopeContext, x)
59 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
60 #define FLAGSR AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
88 int x0,
int y0,
const uint8_t *text,
int vertical)
92 for (; *text; text++) {
114 color->rgba[3] = 255;
117 for (
i = 0;
i < 4;
i++) {
122 value[p] =
in->data[p][(y >> draw->
vsub[p]) *
in->linesize[p] + (x >> draw->
hsub[p])];
132 color->rgba[3] = 255;
135 for (
i = 0;
i < 4;
i++) {
152 reverse->comp[p].u8[0] =
color->comp[p].u8[0] > 127 ? 0 : 255;
153 reverse->comp[p].u8[1] =
color->comp[p].u8[1] > 127 ? 0 : 255;
154 reverse->comp[p].u8[2] =
color->comp[p].u8[2] > 127 ? 0 : 255;
165 const unsigned mid = (
max + 1) / 2;
186 const int PP =
td->PP;
187 const int xoff =
td->xoff;
188 const int yoff =
td->yoff;
189 const int P =
FFMAX(
s->nb_planes,
s->nb_comps);
190 const int C =
s->chars;
191 const int D = ((
s->chars -
s->dformat) >> 2) +
s->dformat * 2;
192 const int W = (outlink->
w - xoff) / (
C * 10);
193 const int H = (outlink->
h - yoff) / (PP * 12);
194 const char *
format[4] = {
"%02X\n",
"%04X\n",
"%03d\n",
"%05d\n"};
199 for (y = 0; y <
H && (y +
s->y < inlink->
h); y++) {
200 for (x = slice_start; x <
slice_end && (x +
s->x < inlink->
w); x++) {
203 int value[4] = { 0 }, pp = 0;
208 xoff + x *
C * 10, yoff + y * PP * 12,
C * 10, PP * 12);
210 for (p = 0; p <
P; p++) {
213 if (!(
s->components & (1 << p)))
216 draw_text(&
s->draw,
out, &
reverse, xoff + x *
C * 10 + 2, yoff + y * PP * 12 + pp * 10 + 2, text, 0);
233 const int PP =
td->PP;
234 const int xoff =
td->xoff;
235 const int yoff =
td->yoff;
236 const int P =
FFMAX(
s->nb_planes,
s->nb_comps);
237 const int C =
s->chars;
238 const int D = ((
s->chars -
s->dformat) >> 2) +
s->dformat * 2;
239 const int W = (outlink->
w - xoff) / (
C * 10);
240 const int H = (outlink->
h - yoff) / (PP * 12);
241 const char *
format[4] = {
"%02X\n",
"%04X\n",
"%03d\n",
"%05d\n"};
246 for (y = 0; y <
H && (y +
s->y < inlink->
h); y++) {
247 for (x = slice_start; x <
slice_end && (x +
s->x < inlink->
w); x++) {
249 int value[4] = { 0 }, pp = 0;
253 for (p = 0; p <
P; p++) {
256 if (!(
s->components & (1 << p)))
259 draw_text(&
s->draw,
out, &
color, xoff + x *
C * 10 + 2, yoff + y * PP * 12 + pp * 10 + 2, text, 0);
276 const int PP =
td->PP;
277 const int xoff =
td->xoff;
278 const int yoff =
td->yoff;
279 const int P =
FFMAX(
s->nb_planes,
s->nb_comps);
280 const int C =
s->chars;
281 const int D = ((
s->chars -
s->dformat) >> 2) +
s->dformat * 2;
282 const int W = (outlink->
w - xoff) / (
C * 10);
283 const int H = (outlink->
h - yoff) / (PP * 12);
284 const char *
format[4] = {
"%02X\n",
"%04X\n",
"%03d\n",
"%05d\n"};
289 for (y = 0; y <
H && (y +
s->y < inlink->
h); y++) {
290 for (x = slice_start; x <
slice_end && (x +
s->x < inlink->
w); x++) {
292 int value[4] = { 0 }, pp = 0;
295 for (p = 0; p <
P; p++) {
298 if (!(
s->components & (1 << p)))
301 draw_text(&
s->draw,
out, &
s->white, xoff + x *
C * 10 + 2, yoff + y * PP * 12 + pp * 10 + 2, text, 0);
315 const int P =
FFMAX(
s->nb_planes,
s->nb_comps);
330 0, 0, outlink->
w, outlink->
h);
332 for (
int p = 0; p <
P; p++) {
333 if (
s->components & (1 << p))
339 const int C =
s->chars;
340 int Y = outlink->
h / (PP * 12);
341 int X = outlink->
w / (
C * 10);
342 char text[256] = { 0 };
346 ymaxlen = strlen(text);
349 xmaxlen = strlen(text);
352 Y = (outlink->
h - xmaxlen) / (PP * 12);
353 X = (outlink->
w - ymaxlen) / (
C * 10);
355 for (y = 0; y <
Y; y++) {
356 snprintf(text,
sizeof(text),
"%d",
s->y + y);
359 0, xmaxlen + y * PP * 12 + (PP + 1) * PP - 2, ymaxlen, 10);
361 draw_text(&
s->draw,
out, &
s->yellow, 2, xmaxlen + y * PP * 12 + (PP + 1) * PP, text, 0);
364 for (x = 0; x <
X; x++) {
365 snprintf(text,
sizeof(text),
"%d",
s->x + x);
368 ymaxlen + x *
C * 10 + 2 *
C - 2, 0, 10, xmaxlen);
370 draw_text(&
s->draw,
out, &
s->yellow, ymaxlen + x *
C * 10 + 2 *
C, 2, text, 1);
374 td.in =
in;
td.out =
out,
td.yoff = xmaxlen,
td.xoff = ymaxlen,
td.PP = PP;
399 s->chars = (
s->draw.desc->comp[0].depth + 7) / 8 * 2 +
s->dformat;
400 s->nb_comps =
s->draw.desc->nb_components;
408 if (
s->draw.desc->comp[0].depth <= 8) {
431 char *res,
int res_len,
int flags)
465 .priv_class = &datascope_class,
502 #define POFFSET(x) offsetof(PixscopeContext, x)
535 s->nb_comps =
s->draw.desc->nb_components;
539 s->colors[0] = &
s->red;
540 s->colors[1] = &
s->green;
541 s->colors[2] = &
s->blue;
542 s->colors[3] = &
s->white;
545 s->colors[0] = &
s->white;
546 s->colors[1] = &
s->blue;
547 s->colors[2] = &
s->red;
548 s->colors[3] = &
s->white;
555 if (
s->draw.desc->comp[0].depth <= 8) {
561 if (inlink->
w < 640 || inlink->
h < 480) {
568 s->x =
s->xpos * (inlink->
w - 1);
569 s->y =
s->ypos * (inlink->
h - 1);
570 if (
s->x +
s->w >= inlink->
w ||
s->y +
s->h >= inlink->
h) {
579 #define SQR(x) ((x)*(x))
587 int max[4] = { 0 },
min[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
588 float average[4] = { 0 };
589 double std[4] = { 0 }, rms[4] = { 0 };
590 const char rgba[4] = {
'R',
'G',
'B',
'A' };
591 const char yuva[4] = {
'Y',
'U',
'V',
'A' };
592 int x, y,
X,
Y,
i,
w,
h;
606 X = (
in->width -
s->ww) *
s->wx;
608 X = (
in->width -
s->ww) * -
s->wx;
611 Y = (
in->height -
s->wh) *
s->wy;
613 Y = (
in->height -
s->wh) * -
s->wy;
617 if (
s->x +
s->w >=
X && (
s->x +
s->w <=
X +
s->ww) &&
618 s->y +
s->h >=
Y && (
s->y +
s->h <=
Y +
s->wh)) {
619 X = (
in->width -
s->ww) * (1 +
s->wx);
624 if (
s->x +
s->w >=
X && (
s->x +
s->w <=
X +
s->ww) &&
625 s->y +
s->h >=
Y && (
s->y +
s->h <=
Y +
s->wh)) {
626 Y = (
in->height -
s->wh) * (1 +
s->wy);
637 for (y = 0; y <
s->h; y++) {
638 for (x = 0; x <
s->w; x++) {
640 int value[4] = { 0 };
644 x *
w + (
s->ww - 4 - (
s->w *
w)) / 2 +
X, y *
h + 2 +
Y,
w,
h);
645 for (
i = 0;
i < 4;
i++) {
657 s->x - 2,
s->y - 2,
s->w + 4, 1);
661 s->x - 1,
s->y - 1,
s->w + 2, 1);
665 s->x - 1,
s->y - 1, 1,
s->h + 2);
669 s->x - 2,
s->y - 2, 1,
s->h + 4);
673 s->x - 1,
s->y + 1 +
s->h,
s->w + 3, 1);
677 s->x - 2,
s->y + 2 +
s->h,
s->w + 4, 1);
681 s->x + 1 +
s->w,
s->y - 1, 1,
s->h + 2);
685 s->x + 2 +
s->w,
s->y - 2, 1,
s->h + 5);
687 for (
i = 0;
i < 4;
i++) {
688 rms[
i] /=
s->w *
s->h;
689 rms[
i] = sqrt(rms[
i]);
690 average[
i] /=
s->w *
s->h;
693 for (y = 0; y <
s->h; y++) {
694 for (x = 0; x <
s->w; x++) {
695 for (
i = 0;
i < 4;
i++)
696 std[
i] +=
SQR(
s->values[
i][x][y] - average[
i]);
700 for (
i = 0;
i < 4;
i++) {
701 std[
i] /=
s->w *
s->h;
702 std[
i] = sqrt(std[
i]);
705 snprintf(text,
sizeof(text),
"CH AVG MIN MAX RMS\n");
707 for (
i = 0;
i <
s->nb_comps;
i++) {
708 int c =
s->rgba_map[
i];
710 snprintf(text,
sizeof(text),
"%c %07.1f %05d %05d %07.1f\n",
s->is_rgb ? rgba[
i] : yuva[
i], average[
c],
min[
c],
max[
c], rms[
c]);
713 snprintf(text,
sizeof(text),
"CH STD\n");
715 for (
i = 0;
i <
s->nb_comps;
i++) {
716 int c =
s->rgba_map[
i];
718 snprintf(text,
sizeof(text),
"%c %07.2f\n",
s->is_rgb ? rgba[
i] : yuva[
i], std[
c]);
727 char *res,
int res_len,
int flags)
760 .priv_class = &pixscope_class,
814 #define OOFFSET(x) offsetof(OscilloscopeContext, x)
845 int dx =
FFABS(
x1 - x0), sx = x0 <
x1 ? 1 : -1;
846 int dy =
FFABS(
y1 - y0), sy = y0 <
y1 ? 1 : -1;
847 int err = (dx > dy ? dx : -dy) / 2, e2;
851 if (x0 >= 0 && y0 >= 0 && x0 < out->
width && y0 < out->
height) {
873 if (x0 ==
x1 && y0 ==
y1)
894 for (
i = 1;
i <
s->nb_values;
i++) {
895 for (
c = 0;
c <
s->nb_comps;
c++) {
896 if ((1 <<
c) &
s->components) {
897 int x =
i *
s->width /
s->nb_values;
898 int px = (
i - 1) *
s->width /
s->nb_values;
899 int py =
s->height -
s->values[
i-1].p[
s->rgba_map[
c]] *
s->height / 256;
900 int y =
s->height -
s->values[
i].p[
s->rgba_map[
c]] *
s->height / 256;
913 for (
i = 1;
i <
s->nb_values;
i++) {
914 for (
c = 0;
c <
s->nb_comps;
c++) {
915 if ((1 <<
c) &
s->components) {
916 int x =
i *
s->width /
s->nb_values;
917 int px = (
i - 1) *
s->width /
s->nb_values;
918 int py =
s->height -
s->values[
i-1].p[
s->rgba_map[
c]] *
s->height /
s->max;
919 int y =
s->height -
s->values[
i].p[
s->rgba_map[
c]] *
s->height /
s->max;
935 s->height =
s->theight * inlink->
h;
936 s->width =
s->twidth * inlink->
w;
940 cx =
s->xpos * (inlink->
w - 1);
941 cy =
s->ypos * (inlink->
h - 1);
946 s->ox = (inlink->
w -
s->width) *
s->tx;
947 s->oy = (inlink->
h -
s->height) *
s->ty;
971 s->nb_comps =
s->draw.desc->nb_components;
975 s->colors[0] = &
s->red;
976 s->colors[1] = &
s->green;
977 s->colors[2] = &
s->blue;
978 s->colors[3] = &
s->white;
981 s->colors[0] = &
s->white;
982 s->colors[1] = &
s->cyan;
983 s->colors[2] = &
s->magenta;
984 s->colors[3] = &
s->white;
991 if (
s->draw.desc->comp[0].depth <= 8) {
999 s->max = (1 <<
s->draw.desc->comp[0].depth);
1014 int dx =
FFABS(
x1 - x0), sx = x0 <
x1 ? 1 : -1;
1015 int dy =
FFABS(
y1 - y0), sy = y0 <
y1 ? 1 : -1;
1016 int err = (dx > dy ? dx : -dy) / 2, e2;
1019 if (x0 >= 0 && y0 >= 0 && x0 < out->
width && y0 < out->
height) {
1021 int value[4] = { 0 };
1024 s->values[
s->nb_values].p[0] =
value[0];
1025 s->values[
s->nb_values].p[1] =
value[1];
1026 s->values[
s->nb_values].p[2] =
value[2];
1027 s->values[
s->nb_values].p[3] =
value[3];
1031 if (
s->draw.desc->comp[0].depth == 8) {
1032 if (
s->draw.nb_planes == 1) {
1035 for (
i = 0;
i <
s->nb_comps;
i++)
1036 out->data[0][
out->linesize[0] * y0 + x0 *
s->draw.pixelstep[0] +
i] = 255 * ((
s->nb_values +
state) & 1);
1038 out->data[0][
out->linesize[0] * y0 + x0] = 255 * ((
s->nb_values +
state) & 1);
1041 if (
s->draw.nb_planes == 1) {
1044 for (
i = 0;
i <
s->nb_comps;
i++)
1045 AV_WN16(
out->data[0] +
out->linesize[0] * y0 + x0 *
s->draw.pixelstep[0] +
i, (
s->max - 1) * ((
s->nb_values +
state) & 1));
1047 AV_WN16(
out->data[0] +
out->linesize[0] * y0 + 2 * x0, (
s->max - 1) * ((
s->nb_values +
state) & 1));
1053 if (x0 ==
x1 && y0 ==
y1)
1075 float average[4] = { 0 };
1077 int min[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
1084 s->ox,
s->oy,
s->width,
s->height + 20 *
s->statistics);
1086 if (
s->grid && outlink->
h >= 10) {
1088 s->ox,
s->oy,
s->width - 1, 1);
1090 for (
i = 1;
i < 5;
i++) {
1092 s->ox,
s->oy +
i * (
s->height - 1) / 4,
s->width, 1);
1095 for (
i = 0;
i < 10;
i++) {
1097 s->ox +
i * (
s->width - 1) / 10,
s->oy, 1,
s->height);
1101 s->ox +
s->width - 1,
s->oy, 1,
s->height);
1106 for (
i = 0;
i <
s->nb_values;
i++) {
1107 for (
c = 0;
c <
s->nb_comps;
c++) {
1108 if ((1 <<
c) &
s->components) {
1111 average[
c] +=
s->values[
i].p[
s->rgba_map[
c]];
1115 for (
c = 0;
c <
s->nb_comps;
c++) {
1116 average[
c] /=
s->nb_values;
1119 if (
s->statistics &&
s->height > 10 &&
s->width > 280 *
av_popcount(
s->components)) {
1120 for (
c = 0,
i = 0;
c <
s->nb_comps;
c++) {
1121 if ((1 <<
c) &
s->components) {
1122 const char rgba[4] = {
'R',
'G',
'B',
'A' };
1123 const char yuva[4] = {
'Y',
'U',
'V',
'A' };
1126 snprintf(text,
sizeof(text),
"%c avg:%.1f min:%d max:%d\n",
s->is_rgb ? rgba[
c] : yuva[
c], average[
c],
min[
c],
max[
c]);
1136 char *res,
int res_len,
int flags)
1155 .needs_writable = 1,
1169 .
name =
"oscilloscope",
1172 .priv_class = &oscilloscope_class,
static const char *const format[]
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().
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
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 FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
static av_cold int uninit(AVCodecContext *avctx)
void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color, uint8_t *dst[], int dst_linesize[], int dst_w, int dst_h, int x0, int y0, int w, int h)
Blend a rectangle with an uniform color.
int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
Init a draw context.
void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4])
Prepare a color.
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
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.
void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color, uint8_t *dst[], int dst_linesize[], int dst_w, int dst_h, const uint8_t *mask, int mask_linesize, int mask_w, int mask_h, int l2depth, unsigned endianness, int x0, int y0)
Blend an alpha mask with an uniform color.
AVFilterFormats * ff_draw_supported_pixel_formats(unsigned flags)
Return the list of pixel formats supported by the draw functions.
mode
Use these values in ebur128_init (or'ed).
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.
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
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.
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * av_calloc(size_t nmemb, size_t size)
Non-inlined equivalent of av_mallocz_array().
static const int16_t alpha[]
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static av_const double hypot(double x, double y)
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
typedef void(RENAME(mix_any_func_type))
static uint32_t reverse(uint32_t num, int bits)
Describe the class of an AVClass context structure.
int depth
Number of bits in the component.
void * priv
private data for use by the filter
A link between two filters.
int w
agreed upon image width
int h
agreed upon image height
AVFilterContext * src
source filter
int64_t frame_count_in
Number of past frames sent through the 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.
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.
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.
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
uint8_t nb_components
The number of components each pixel has, (1-4)
Rational number (pair of numerator and denominator).
void(* pick_color)(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
void(* reverse_color)(FFDrawContext *draw, FFDrawColor *color, FFDrawColor *reverse)
int(* filter)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
const struct AVPixFmtDescriptor * desc
int pixelstep[MAX_PLANES]
void(* pick_color)(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
void(* draw_trace)(struct OscilloscopeContext *s, AVFrame *frame)
uint16_t values[4][80][80]
void(* pick_color)(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
Used for passing data between threads.
static int filter_mono(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static const AVOption datascope_options[]
static const AVFilterPad oscilloscope_outputs[]
static int filter_color(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static void draw_trace8(OscilloscopeContext *s, AVFrame *frame)
static void draw_trace16(OscilloscopeContext *s, AVFrame *frame)
static void draw_text(FFDrawContext *draw, AVFrame *frame, FFDrawColor *color, int x0, int y0, const uint8_t *text, int vertical)
static const AVOption oscilloscope_options[]
static int pixscope_filter_frame(AVFilterLink *inlink, AVFrame *in)
static void oscilloscope_uninit(AVFilterContext *ctx)
AVFILTER_DEFINE_CLASS(datascope)
static int query_formats(AVFilterContext *ctx)
static int config_input(AVFilterLink *inlink)
static const AVFilterPad inputs[]
static const AVOption pixscope_options[]
static void draw_scope(OscilloscopeContext *s, int x0, int y0, int x1, int y1, AVFrame *out, PixelValues *p, int state)
static const AVFilterPad outputs[]
static int oscilloscope_process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static void pick_color16(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static int pixscope_process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static int oscilloscope_filter_frame(AVFilterLink *inlink, AVFrame *frame)
static void reverse_color8(FFDrawContext *draw, FFDrawColor *color, FFDrawColor *reverse)
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static int filter_color2(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static const AVFilterPad oscilloscope_inputs[]
static void reverse_color16(FFDrawContext *draw, FFDrawColor *color, FFDrawColor *reverse)
static int pixscope_config_input(AVFilterLink *inlink)
static const AVFilterPad pixscope_outputs[]
static int config_output(AVFilterLink *outlink)
static void draw_line(FFDrawContext *draw, int x0, int y0, int x1, int y1, AVFrame *out, FFDrawColor *color)
AVFilter ff_vf_oscilloscope
static void update_oscilloscope(AVFilterContext *ctx)
static const AVFilterPad pixscope_inputs[]
static int oscilloscope_config_input(AVFilterLink *inlink)
static void pick_color8(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
const uint8_t avpriv_cga_font[2048]
CGA/EGA/VGA ROM font data.