53 int *
histy, *histu, *histv, *histsat;
69 #define OFFSET(x) offsetof(SignalstatsContext, x)
70 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
99 s->
yuv_color[0] = (( 66*r + 129*g + 25*b + (1<<7)) >> 8) + 16;
100 s->
yuv_color[1] = ((-38*r + -74*g + 112*b + (1<<7)) >> 8) + 128;
101 s->
yuv_color[2] = ((112*r + -94*g + -18*b + (1<<7)) >> 8) + 128;
179 outlink->
w = inlink->
w;
180 outlink->
h = inlink->
h;
185 s->
fs = inlink->
w * inlink->
h;
203 const int chromax = x >> s->
hsub;
204 const int chromay = y >> s->
vsub;
212 const int chromax = x >> s->
hsub;
213 const int chromay = y >> s->
vsub;
226 const int w = in->
width;
228 const int slice_start = (h * jobnr ) / nb_jobs;
229 const int slice_end = (h * (jobnr+1)) / nb_jobs;
232 for (y = slice_start; y <
slice_end; y++) {
233 const int yc = y >> s->
vsub;
238 for (x = 0; x < w; x++) {
239 const int xc = x >> s->
hsub;
240 const int luma = pluma[x];
241 const int chromau = pchromau[xc];
242 const int chromav = pchromav[xc];
243 const int filt = luma < 16 || luma > 235 ||
244 chromau < 16 || chromau > 240 ||
245 chromav < 16 || chromav > 240;
261 const int w = in->
width;
263 const int slice_start = (h * jobnr ) / nb_jobs;
264 const int slice_end = (h * (jobnr+1)) / nb_jobs;
267 for (y = slice_start; y <
slice_end; y++) {
268 const int yc = y >> s->
vsub;
269 const uint16_t *pluma = (uint16_t *)&in->
data[0][y * in->
linesize[0]];
270 const uint16_t *pchromau = (uint16_t *)&in->
data[1][yc * in->
linesize[1]];
271 const uint16_t *pchromav = (uint16_t *)&in->
data[2][yc * in->
linesize[2]];
273 for (x = 0; x < w; x++) {
274 const int xc = x >> s->
hsub;
275 const int luma = pluma[x];
276 const int chromau = pchromau[xc];
277 const int chromav = pchromav[xc];
278 const int filt = luma < 16 * mult || luma > 235 * mult ||
279 chromau < 16 * mult || chromau > 240 * mult ||
280 chromav < 16 * mult || chromav > 240 *
mult;
291 return ((abs(x - y) + abs (z - y)) / 2) - abs(z - x) > 4;
300 const int w = in->
width;
302 const int slice_start = (h * jobnr ) / nb_jobs;
303 const int slice_end = (h * (jobnr+1)) / nb_jobs;
306 int x, y, score = 0,
filt;
308 for (y = slice_start; y <
slice_end; y++) {
310 if (y - 1 < 0 || y + 1 >= h)
316 #define FILTER(i, j) \
317 filter_tout_outlier(p[(y-j) * lw + x + i], \
318 p[ y * lw + x + i], \
319 p[(y+j) * lw + x + i])
321 #define FILTER3(j) (FILTER(-1, j) && FILTER(0, j) && FILTER(1, j))
323 if (y - 2 >= 0 && y + 2 < h) {
324 for (x = 1; x < w - 1; x++) {
331 for (x = 1; x < w - 1; x++) {
348 const int w = in->
width;
350 const int slice_start = (h * jobnr ) / nb_jobs;
351 const int slice_end = (h * (jobnr+1)) / nb_jobs;
352 const uint16_t *p = (uint16_t *)in->
data[0];
354 int x, y, score = 0,
filt;
358 if (y - 1 < 0 || y + 1 >= h)
364 if (y - 2 >= 0 && y + 2 < h) {
365 for (x = 1; x < w - 1; x++) {
372 for (x = 1; x < w - 1; x++) {
391 const int w = in->
width;
393 const int slice_start = (h * jobnr ) / nb_jobs;
394 const int slice_end = (h * (jobnr+1)) / nb_jobs;
399 for (y = slice_start; y <
slice_end; y++) {
401 const int ylw = y * lw;
402 int filt, totdiff = 0;
407 for (x = 0; x < w; x++)
408 totdiff += abs(p[y2lw + x] - p[ylw + x]);
413 for (x = 0; x < w; x++)
425 const int w = in->
width;
427 const int slice_start = (h * jobnr ) / nb_jobs;
428 const int slice_end = (h * (jobnr+1)) / nb_jobs;
429 const uint16_t *p = (uint16_t *)in->
data[0];
435 const int ylw = y * lw;
442 for (x = 0; x < w; x++)
443 totdiff += abs(p[y2lw + x] - p[ylw + x]);
448 for (x = 0; x < w; x++)
454 static const struct {
476 const int slice_start = (s->
chromah * jobnr ) / nb_jobs;
481 const uint8_t *p_u = src->
data[1] + slice_start * lsz_u;
482 const uint8_t *p_v = src->
data[2] + slice_start * lsz_v;
484 const int lsz_sat = dst_sat->
linesize[0];
485 const int lsz_hue = dst_hue->
linesize[0];
486 uint8_t *p_sat = dst_sat->
data[0] + slice_start * lsz_sat;
487 uint8_t *p_hue = dst_hue->
data[0] + slice_start * lsz_hue;
489 for (j = slice_start; j <
slice_end; j++) {
490 for (i = 0; i < s->
chromaw; i++) {
491 const int yuvu = p_u[i];
492 const int yuvv = p_v[i];
493 p_sat[i] =
hypot(yuvu - 128, yuvv - 128);
494 ((int16_t*)p_hue)[i] = floor((180 /
M_PI) *
atan2f(yuvu-128, yuvv-128) + 180);
513 const int mid = 1 << (s->
depth - 1);
515 const int slice_start = (s->
chromah * jobnr ) / nb_jobs;
518 const int lsz_u = src->
linesize[1] / 2;
519 const int lsz_v = src->
linesize[2] / 2;
520 const uint16_t *p_u = (uint16_t*)src->
data[1] + slice_start * lsz_u;
521 const uint16_t *p_v = (uint16_t*)src->
data[2] + slice_start * lsz_v;
523 const int lsz_sat = dst_sat->
linesize[0] / 2;
524 const int lsz_hue = dst_hue->
linesize[0] / 2;
525 uint16_t *p_sat = (uint16_t*)dst_sat->
data[0] + slice_start * lsz_sat;
526 uint16_t *p_hue = (uint16_t*)dst_hue->
data[0] + slice_start * lsz_hue;
528 for (j = slice_start; j <
slice_end; j++) {
529 for (i = 0; i < s->
chromaw; i++) {
530 const int yuvu = p_u[i];
531 const int yuvv = p_v[i];
532 p_sat[i] =
hypot(yuvu - mid, yuvv - mid);
533 ((int16_t*)p_hue)[i] = floor((180 /
M_PI) *
atan2f(yuvu-mid, yuvv-mid) + 180);
546 return av_popcount(mask);
560 unsigned int histy[
DEPTH] = {0},
564 histsat[
DEPTH] = {0};
565 int miny = -1, minu = -1, minv = -1;
566 int maxy = -1, maxu = -1, maxv = -1;
567 int lowy = -1, lowu = -1, lowv = -1;
568 int highy = -1, highu = -1, highv = -1;
569 int minsat = -1, maxsat = -1, lowsat = -1, highsat = -1;
570 int lowp, highp, clowp, chighp;
571 int accy, accu, accv;
572 int accsat, acchue = 0;
574 int toty = 0, totu = 0, totv = 0, totsat=0;
576 int dify = 0, difu = 0, difv = 0;
577 uint16_t masky = 0, masku = 0, maskv = 0;
586 const int lsz_sat = sat->
linesize[0];
587 const int lsz_hue = hue->
linesize[0];
608 for (j = 0; j < link->
h; j++) {
609 for (i = 0; i < link->
w; i++) {
610 const int yuv = in->
data[0][w + i];
614 dify += abs(yuv - prev->
data[0][pw + i]);
621 for (j = 0; j < s->
chromah; j++) {
622 for (i = 0; i < s->
chromaw; i++) {
623 const int yuvu = in->
data[1][cw+i];
624 const int yuvv = in->
data[2][cw+i];
629 difu += abs(yuvu - prev->
data[1][cpw+i]);
631 difv += abs(yuvv - prev->
data[2][cpw+i]);
634 histhue[((int16_t*)p_hue)[i]]++;
651 for (i = 0; i < s->
nb_jobs; i++)
659 lowp =
lrint(s->
fs * 10 / 100.);
660 highp =
lrint(s->
fs * 90 / 100.);
664 accy = accu = accv = accsat = 0;
665 for (fil = 0; fil <
DEPTH; fil++) {
666 if (miny < 0 && histy[fil]) miny = fil;
667 if (minu < 0 && histu[fil]) minu = fil;
668 if (minv < 0 && histv[fil]) minv = fil;
669 if (minsat < 0 && histsat[fil]) minsat = fil;
671 if (histy[fil]) maxy = fil;
672 if (histu[fil]) maxu = fil;
673 if (histv[fil]) maxv = fil;
674 if (histsat[fil]) maxsat = fil;
676 toty += histy[fil] * fil;
677 totu += histu[fil] * fil;
678 totv += histv[fil] * fil;
679 totsat += histsat[fil] * fil;
684 accsat += histsat[fil];
686 if (lowy == -1 && accy >= lowp) lowy = fil;
687 if (lowu == -1 && accu >= clowp) lowu = fil;
688 if (lowv == -1 && accv >= clowp) lowv = fil;
689 if (lowsat == -1 && accsat >= clowp) lowsat = fil;
691 if (highy == -1 && accy >= highp) highy = fil;
692 if (highu == -1 && accu >= chighp) highu = fil;
693 if (highv == -1 && accv >= chighp) highv = fil;
694 if (highsat == -1 && accsat >= chighp) highsat = fil;
699 for (fil = 0; fil < 360; fil++) {
700 tothue += histhue[fil] * fil;
701 acchue += histhue[fil];
703 if (medhue == -1 && acchue > s->
cfs / 2)
705 if (histhue[fil] > maxhue) {
706 maxhue = histhue[fil];
713 #define SET_META(key, fmt, val) do { \
714 snprintf(metabuf, sizeof(metabuf), fmt, val); \
715 av_dict_set(&out->metadata, "lavfi.signalstats." key, metabuf, 0); \
756 snprintf(metabuf,
sizeof(metabuf),
"%g", 1.0 * filtot[fil] / s->
fs);
778 unsigned int *histy = s->
histy,
783 int miny = -1, minu = -1, minv = -1;
784 int maxy = -1, maxu = -1, maxv = -1;
785 int lowy = -1, lowu = -1, lowv = -1;
786 int highy = -1, highu = -1, highv = -1;
787 int minsat = -1, maxsat = -1, lowsat = -1, highsat = -1;
788 int lowp, highp, clowp, chighp;
789 int accy, accu, accv;
790 int accsat, acchue = 0;
792 int64_t toty = 0, totu = 0, totv = 0, totsat=0;
794 int64_t dify = 0, difu = 0, difv = 0;
795 uint16_t masky = 0, masku = 0, maskv = 0;
802 const uint16_t *p_sat = (uint16_t *)sat->
data[0];
803 const uint16_t *p_hue = (uint16_t *)hue->
data[0];
804 const int lsz_sat = sat->
linesize[0] / 2;
805 const int lsz_hue = hue->
linesize[0] / 2;
827 for (j = 0; j < link->
h; j++) {
828 for (i = 0; i < link->
w; i++) {
833 dify += abs(yuv -
AV_RN16(prev->
data[0] + pw + i * 2));
843 for (j = 0; j < s->
chromah; j++) {
844 for (i = 0; i < s->
chromaw; i++) {
845 const int yuvu =
AV_RN16(in->
data[1] + cw + i * 2);
846 const int yuvv =
AV_RN16(in->
data[2] + cw + i * 2);
851 difu += abs(yuvu -
AV_RN16(prev->
data[1] + cpw + i * 2));
853 difv += abs(yuvv -
AV_RN16(prev->
data[2] + cpw + i * 2));
856 histhue[((int16_t*)p_hue)[i]]++;
873 for (i = 0; i < s->
nb_jobs; i++)
881 lowp =
lrint(s->
fs * 10 / 100.);
882 highp =
lrint(s->
fs * 90 / 100.);
886 accy = accu = accv = accsat = 0;
887 for (fil = 0; fil < 1 << s->
depth; fil++) {
888 if (miny < 0 && histy[fil]) miny = fil;
889 if (minu < 0 && histu[fil]) minu = fil;
890 if (minv < 0 && histv[fil]) minv = fil;
891 if (minsat < 0 && histsat[fil]) minsat = fil;
893 if (histy[fil]) maxy = fil;
894 if (histu[fil]) maxu = fil;
895 if (histv[fil]) maxv = fil;
896 if (histsat[fil]) maxsat = fil;
898 toty += histy[fil] * fil;
899 totu += histu[fil] * fil;
900 totv += histv[fil] * fil;
901 totsat += histsat[fil] * fil;
906 accsat += histsat[fil];
908 if (lowy == -1 && accy >= lowp) lowy = fil;
909 if (lowu == -1 && accu >= clowp) lowu = fil;
910 if (lowv == -1 && accv >= clowp) lowv = fil;
911 if (lowsat == -1 && accsat >= clowp) lowsat = fil;
913 if (highy == -1 && accy >= highp) highy = fil;
914 if (highu == -1 && accu >= chighp) highu = fil;
915 if (highv == -1 && accv >= chighp) highv = fil;
916 if (highsat == -1 && accsat >= chighp) highsat = fil;
921 for (fil = 0; fil < 360; fil++) {
922 tothue += histhue[fil] * fil;
923 acchue += histhue[fil];
925 if (medhue == -1 && acchue > s->
cfs / 2)
927 if (histhue[fil] > maxhue) {
928 maxhue = histhue[fil];
973 snprintf(metabuf,
sizeof(metabuf),
"%g", 1.0 * filtot[fil] / s->
fs);
1014 .
name =
"signalstats",
1015 .description =
"Generate statistics from video analysis.",
1020 .
inputs = signalstats_inputs,
1021 .
outputs = signalstats_outputs,
1022 .priv_class = &signalstats_class,
#define AV_PIX_FMT_YUV440P10
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
static av_cold void uninit(AVFilterContext *ctx)
#define AV_PIX_FMT_YUV444P14
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
int h
agreed upon image height
static int compute_sat_hue_metrics16(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
#define AV_PIX_FMT_YUV420P12
static int filter16_tout(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
static int compute_sat_hue_metrics8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static const AVFilterPad signalstats_outputs[]
const char * name
Pad name.
static int filter_frame(AVFilterLink *link, AVFrame *in)
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
static void burn_frame8(const SignalstatsContext *s, AVFrame *f, int x, int y)
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
AVDictionary * metadata
metadata.
#define AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV422P12
A filter pad used for either input or output.
A link between two filters.
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.
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 * priv
private data for use by the filter
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
AVFilter ff_vf_signalstats
#define AV_PIX_FMT_YUV444P10
static int filter16_brng(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
#define AV_PIX_FMT_YUV422P9
static av_const double hypot(double x, double y)
static int filter16_vrep(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
#define AV_PIX_FMT_GRAY16
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
static int filter_frame16(AVFilterLink *link, AVFrame *in)
#define SET_META(key, fmt, val)
AVFilterContext * src
source filter
static const AVFilterPad outputs[]
static const struct @189 filters_def[]
#define AV_PIX_FMT_YUV444P9
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 AV_PIX_FMT_YUV420P16
int(* process16)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
static int filter8_vrep(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static const AVFilterPad inputs[]
#define AV_PIX_FMT_YUV420P14
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...
static void burn_frame16(const SignalstatsContext *s, AVFrame *f, int x, int y)
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;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);returnNULL;}returnac;}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;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->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);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in
static const AVFilterPad signalstats_inputs[]
static int16_t mult(Float11 *f1, Float11 *f2)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AV_PIX_FMT_YUV420P10
Describe the class of an AVClass context structure.
const char * name
Filter name.
#define AV_PIX_FMT_YUV440P12
#define AV_PIX_FMT_YUV420P9
static AVFrame * alloc_frame(enum AVPixelFormat pixfmt, int w, int h)
AVFilterLink ** outputs
array of pointers to output links
static enum AVPixelFormat pix_fmts[]
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
#define AV_PIX_FMT_YUV422P14
static int filter_tout_outlier(uint8_t x, uint8_t y, uint8_t z)
static const int8_t filt[NUMTAPS]
int av_frame_make_writable(AVFrame *frame)
Ensure that the frame data is writable, avoiding data copy if possible.
AVFilterInternal * internal
An opaque struct for libavfilter internal use.
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV444P12
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int(* process8)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int config_props(AVFilterLink *outlink)
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
static unsigned compute_bit_depth(uint16_t mask)
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
avfilter_execute_func * execute
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
static int filter8_tout(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int filter8_brng(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
AVFilterContext * dst
dest filter
static const struct PPFilter filters[]
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
static int filter_frame8(AVFilterLink *link, AVFrame *in)
static int query_formats(AVFilterContext *ctx)
AVFILTER_DEFINE_CLASS(signalstats)
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
#define av_malloc_array(a, b)
static av_cold int init(AVFilterContext *ctx)
static const AVOption signalstats_options[]
int depth
Number of bits in the component.
AVPixelFormat
Pixel format.
#define AV_PIX_FMT_YUV422P16
#define AV_CEIL_RSHIFT(a, b)