Go to the documentation of this file.
124 #define OFFSET(x) offsetof(NormalizeContext, x)
125 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
126 #define FLAGSR AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
141 for (
int c = 0;
c < 3;
c++)
145 for (
int x = 0; x < in->
width; x++) {
146 for (
int c = 0;
c < 3;
c++) {
157 for (
int y = 0; y < in->
height; y++) {
159 uint8_t *outp =
out->data[0] + y *
out->linesize[0];
160 for (
int x = 0; x < in->
width; x++) {
161 for (
int c = 0;
c < 3;
c++)
162 outp[
s->co[
c]] =
s->lut[
c][inp[
s->co[
c]]];
163 if (
s->num_components == 4)
165 outp[
s->co[3]] = inp[
s->co[3]];
177 for (
int y = 0; y < in->
height; y++) {
181 for (
int x = 0; x < in->
width; x++) {
194 for (
int y = 0; y < in->
height; y++) {
199 uint8_t *outrp =
out->data[2] + y *
out->linesize[2];
200 uint8_t *outgp =
out->data[0] + y *
out->linesize[0];
201 uint8_t *outbp =
out->data[1] + y *
out->linesize[1];
202 uint8_t *outap =
out->data[3] + y *
out->linesize[3];
203 for (
int x = 0; x < in->
width; x++) {
204 outrp[x] =
s->lut[0][inrp[x]];
205 outgp[x] =
s->lut[1][ingp[x]];
206 outbp[x] =
s->lut[2][inbp[x]];
207 if (
s->num_components == 4)
215 for (
int c = 0;
c < 3;
c++)
217 for (
int y = 0; y < in->
height; y++) {
218 uint16_t *inp = (uint16_t *)(in->
data[0] + y * in->
linesize[0]);
219 for (
int x = 0; x < in->
width; x++) {
220 for (
int c = 0;
c < 3;
c++) {
231 for (
int y = 0; y < in->
height; y++) {
232 uint16_t *inp = (uint16_t *)(in->
data[0] + y * in->
linesize[0]);
233 uint16_t *outp = (uint16_t *)(
out->data[0] + y *
out->linesize[0]);
234 for (
int x = 0; x < in->
width; x++) {
235 for (
int c = 0;
c < 3;
c++)
236 outp[
s->co[
c]] =
s->lut[
c][inp[
s->co[
c]]];
237 if (
s->num_components == 4)
239 outp[
s->co[3]] = inp[
s->co[3]];
251 for (
int y = 0; y < in->
height; y++) {
252 uint16_t *inrp = (uint16_t *)(in->
data[2] + y * in->
linesize[2]);
253 uint16_t *ingp = (uint16_t *)(in->
data[0] + y * in->
linesize[0]);
254 uint16_t *inbp = (uint16_t *)(in->
data[1] + y * in->
linesize[1]);
255 for (
int x = 0; x < in->
width; x++) {
268 for (
int y = 0; y < in->
height; y++) {
269 uint16_t *inrp = (uint16_t *)(in->
data[2] + y * in->
linesize[2]);
270 uint16_t *ingp = (uint16_t *)(in->
data[0] + y * in->
linesize[0]);
271 uint16_t *inbp = (uint16_t *)(in->
data[1] + y * in->
linesize[1]);
272 uint16_t *inap = (uint16_t *)(in->
data[3] + y * in->
linesize[3]);
273 uint16_t *outrp = (uint16_t *)(
out->data[2] + y *
out->linesize[2]);
274 uint16_t *outgp = (uint16_t *)(
out->data[0] + y *
out->linesize[0]);
275 uint16_t *outbp = (uint16_t *)(
out->data[1] + y *
out->linesize[1]);
276 uint16_t *outap = (uint16_t *)(
out->data[3] + y *
out->linesize[3]);
277 for (
int x = 0; x < in->
width; x++) {
278 outrp[x] =
s->lut[0][inrp[x]];
279 outgp[x] =
s->lut[1][ingp[x]];
280 outbp[x] =
s->lut[2][inbp[x]];
281 if (
s->num_components == 4)
295 float rgb_min_smoothed;
296 float rgb_max_smoothed;
306 int history_idx =
s->frame_num %
s->history_len;
309 int num_history_vals =
s->frame_num + 1;
310 if (
s->frame_num >=
s->history_len) {
312 for (
c = 0;
c < 3;
c++) {
313 s->min[
c].history_sum -=
s->min[
c].history[history_idx];
314 s->max[
c].history_sum -=
s->max[
c].history[history_idx];
316 num_history_vals =
s->history_len;
320 for (
c = 0;
c < 3;
c++) {
321 s->min[
c].history_sum += (
s->min[
c].history[history_idx] =
min[
c].in);
322 min[
c].smoothed =
s->min[
c].history_sum / (
float)num_history_vals;
323 s->max[
c].history_sum += (
s->max[
c].history[history_idx] =
max[
c].in);
324 max[
c].smoothed =
s->max[
c].history_sum / (
float)num_history_vals;
331 rgb_min_smoothed =
FFMIN3(
min[0].smoothed,
min[1].smoothed,
min[2].smoothed);
332 rgb_max_smoothed =
FFMAX3(
max[0].smoothed,
max[1].smoothed,
max[2].smoothed);
336 for (
c = 0;
c < 3;
c++) {
341 min[
c].smoothed = (
min[
c].smoothed *
s->independence)
342 + (rgb_min_smoothed * (1.0
f -
s->independence));
343 max[
c].smoothed = (
max[
c].smoothed *
s->independence)
344 + (rgb_max_smoothed * (1.0
f -
s->independence));
349 min[
c].out = (
s->sblackpt[
c] *
s->strength)
350 + (
min[
c].in * (1.0
f -
s->strength));
351 max[
c].out = (
s->swhitept[
c] *
s->strength)
352 + (
max[
c].in * (1.0
f -
s->strength));
359 if (
min[
c].smoothed ==
max[
c].smoothed) {
361 for (in_val =
min[
c].in; in_val <=
max[
c].in; in_val++)
362 s->lut[
c][in_val] =
min[
c].out;
369 for (in_val =
min[
c].in; in_val <=
max[
c].in; in_val++) {
372 s->lut[
c][in_val] = out_val;
378 s->process(
s, in,
out);
420 s->depth =
desc->comp[0].depth;
421 scale = 1 << (
s->depth - 8);
422 s->num_components =
desc->nb_components;
429 s->history_len =
s->smoothing + 1;
433 s->history_mem =
av_malloc(
s->history_len * 6 *
sizeof(*
s->history_mem));
434 if (
s->history_mem ==
NULL)
437 for (
c = 0;
c < 3;
c++) {
438 s->min[
c].history =
s->history_mem + (
c*2) *
s->history_len;
439 s->max[
c].history =
s->history_mem + (
c*2+1) *
s->history_len;
440 s->sblackpt[
c] =
scale *
s->blackpt[
c] + (
s->blackpt[
c] & (1 << (
s->depth - 8)));
441 s->swhitept[
c] =
scale *
s->whitept[
c] + (
s->whitept[
c] & (1 << (
s->depth - 8)));
493 if (
ctx->is_disabled) {
514 .
p.
name =
"normalize",
516 .p.priv_class = &normalize_class,
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
#define AV_PIX_FMT_GBRAP16
static void process(NormalizeContext *s, AVFrame *in, AVFrame *out)
AVPixelFormat
Pixel format.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define FILTER_PIXFMTS_ARRAY(array)
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define FILTER_INPUTS(array)
This structure describes decoded (raw) audio or video data.
static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
Clip a signed integer to an unsigned power of two range.
static void find_min_max_planar_16(NormalizeContext *s, AVFrame *in, NormalizeLocal min[3], NormalizeLocal max[3])
void(* process)(struct NormalizeContext *s, AVFrame *in, AVFrame *out)
static const AVOption normalize_options[]
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
const char * name
Filter name.
static void find_min_max_planar(NormalizeContext *s, AVFrame *in, NormalizeLocal min[3], NormalizeLocal max[3])
A link between two filters.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static void process_planar(NormalizeContext *s, AVFrame *in, AVFrame *out)
#define AV_PIX_FMT_GBRP14
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_GBRP10
uint8_t pi<< 24) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_U8,(uint64_t)((*(const uint8_t *) pi - 0x80U))<< 56) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16,(*(const int16_t *) pi >>8)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1<< 16)) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S16,(uint64_t)(*(const int16_t *) pi)<< 48) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32,(*(const int32_t *) pi >>24)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S32,(uint64_t)(*(const int32_t *) pi)<< 32) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S64,(*(const int64_t *) pi >>56)+0x80) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0f/(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0/(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_FLT, llrintf(*(const float *) pi *(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_DBL, llrint(*(const double *) pi *(UINT64_C(1)<< 63))) #define FMT_PAIR_FUNC(out, in) static conv_func_type *const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB *AV_SAMPLE_FMT_NB]={ FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64), };static void cpy1(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, len);} static void cpy2(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 2 *len);} static void cpy4(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 4 *len);} static void cpy8(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 8 *len);} AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, const int *ch_map, int flags) { AudioConvert *ctx;conv_func_type *f=fmt_pair_to_conv_functions[av_get_packed_sample_fmt(out_fmt)+AV_SAMPLE_FMT_NB *av_get_packed_sample_fmt(in_fmt)];if(!f) return NULL;ctx=av_mallocz(sizeof(*ctx));if(!ctx) return NULL;if(channels==1){ in_fmt=av_get_planar_sample_fmt(in_fmt);out_fmt=av_get_planar_sample_fmt(out_fmt);} ctx->channels=channels;ctx->conv_f=f;ctx->ch_map=ch_map;if(in_fmt==AV_SAMPLE_FMT_U8||in_fmt==AV_SAMPLE_FMT_U8P) memset(ctx->silence, 0x80, sizeof(ctx->silence));if(out_fmt==in_fmt &&!ch_map) { switch(av_get_bytes_per_sample(in_fmt)){ case 1:ctx->simd_f=cpy1;break;case 2:ctx->simd_f=cpy2;break;case 4:ctx->simd_f=cpy4;break;case 8:ctx->simd_f=cpy8;break;} } return ctx;} void swri_audio_convert_free(AudioConvert **ctx) { av_freep(ctx);} int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len) { int ch;int off=0;const int os=(out->planar ? 1 :out->ch_count) *out->bps;unsigned misaligned=0;av_assert0(ctx->channels==out->ch_count);if(ctx->in_simd_align_mask) { int planes=in->planar ? in->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) in->ch[ch];misaligned|=m &ctx->in_simd_align_mask;} if(ctx->out_simd_align_mask) { int planes=out->planar ? out->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) out->ch[ch];misaligned|=m &ctx->out_simd_align_mask;} if(ctx->simd_f &&!ctx->ch_map &&!misaligned){ off=len &~15;av_assert1(off >=0);av_assert1(off<=len);av_assert2(ctx->channels==SWR_CH_MAX||!in->ch[ctx->channels]);if(off >0){ if(out->planar==in->planar){ int planes=out->planar ? out->ch_count :1;for(ch=0;ch< planes;ch++){ ctx->simd_f(out->ch+ch,(const uint8_t **) in->ch+ch, off *(out-> planar
A filter pad used for either input or output.
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP12
static enum AVPixelFormat pixel_fmts[]
#define FILTER_OUTPUTS(array)
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
static void find_min_max(NormalizeContext *s, AVFrame *in, NormalizeLocal min[3], NormalizeLocal max[3])
#define AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_RGBA64
Describe the class of an AVClass context structure.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
@ AV_OPT_TYPE_COLOR
Underlying C type is uint8_t[4].
static const AVFilterPad inputs[]
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static void process_planar_16(NormalizeContext *s, AVFrame *in, AVFrame *out)
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel for the pixel format described by pixdesc, including any padding ...
static void process_16(NormalizeContext *s, AVFrame *in, AVFrame *out)
static av_cold void uninit(AVFilterContext *ctx)
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
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.
void(* find_min_max)(struct NormalizeContext *s, AVFrame *in, NormalizeLocal min[3], NormalizeLocal max[3])
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
#define AV_PIX_FMT_BGRA64
int w
agreed upon image width
static int config_input(AVFilterLink *inlink)
#define AV_PIX_FMT_GBRP12
const char * name
Pad name.
static void find_min_max_16(NormalizeContext *s, AVFrame *in, NormalizeLocal min[3], NormalizeLocal max[3])
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
static void normalize(NormalizeContext *s, AVFrame *in, AVFrame *out)
void * av_malloc(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
int h
agreed upon image height
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
const FFFilter ff_vf_normalize
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
AVFilter p
The public AVFilter.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
static void scale(int *out, const int *in, const int w, const int h, const int shift)
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
AVFILTER_DEFINE_CLASS(normalize)