Go to the documentation of this file.
81 const uint8_t *
src,
int src_linesize,
int src_linestep,
82 int x,
int y,
int max_x,
int max_y);
95 #define OFFSET(x) offsetof(RotContext, x)
96 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
97 #define TFLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
171 float sinx = sin(angle);
172 float cosx = cos(angle);
174 return FFMAX(0, inh * sinx) +
FFMAX(0, -inw * cosx) +
183 float sinx = sin(angle);
184 float cosx = cos(angle);
186 return FFMAX(0, -inh * cosx) +
FFMAX(0, -inw * sinx) +
190 static double (*
const func1[])(
void *, double) = {
203 #define FIXP2 (1<<20)
204 #define INT_PI 3294199 //(M_PI * FIXP2)
222 for (
i = 2;
i < 11;
i += 2) {
234 const uint8_t *
src,
int src_linesize,
int src_linestep,
235 int x,
int y,
int max_x,
int max_y)
237 int int_x = av_clip(
x>>16, 0, max_x);
238 int int_y = av_clip(y>>16, 0, max_y);
239 int frac_x =
x&0xFFFF;
240 int frac_y = y&0xFFFF;
242 int int_x1 =
FFMIN(int_x+1, max_x);
243 int int_y1 =
FFMIN(int_y+1, max_y);
245 for (
i = 0;
i < src_linestep;
i++) {
246 int s00 =
src[src_linestep * int_x +
i + src_linesize * int_y ];
247 int s01 =
src[src_linestep * int_x1 +
i + src_linesize * int_y ];
248 int s10 =
src[src_linestep * int_x +
i + src_linesize * int_y1];
249 int s11 =
src[src_linestep * int_x1 +
i + src_linesize * int_y1];
250 int s0 = (((1<<16) - frac_x)*s00 + frac_x*s01);
251 int s1 = (((1<<16) - frac_x)*s10 + frac_x*s11);
253 dst_color[
i] = ((int64_t)((1<<16) - frac_y)*
s0 + (int64_t)frac_y*
s1) >> 32;
264 const uint8_t *
src,
int src_linesize,
int src_linestep,
265 int x,
int y,
int max_x,
int max_y)
267 int int_x = av_clip(
x>>16, 0, max_x);
268 int int_y = av_clip(y>>16, 0, max_y);
269 int frac_x =
x&0xFFFF;
270 int frac_y = y&0xFFFF;
272 int int_x1 =
FFMIN(int_x+1, max_x);
273 int int_y1 =
FFMIN(int_y+1, max_y);
275 for (
i = 0;
i < src_linestep;
i+=2) {
276 int s00 =
AV_RL16(&
src[src_linestep * int_x +
i + src_linesize * int_y ]);
277 int s01 =
AV_RL16(&
src[src_linestep * int_x1 +
i + src_linesize * int_y ]);
278 int s10 =
AV_RL16(&
src[src_linestep * int_x +
i + src_linesize * int_y1]);
279 int s11 =
AV_RL16(&
src[src_linestep * int_x1 +
i + src_linesize * int_y1]);
280 int s0 = (((1<<16) - frac_x)*s00 + frac_x*s01);
281 int s1 = (((1<<16) - frac_x)*s10 + frac_x*s11);
283 AV_WL16(&dst_color[
i], ((int64_t)((1<<16) - frac_y)*
s0 + (int64_t)frac_y*
s1) >> 32);
324 "Error occurred parsing angle expression '%s'\n", rot->
angle_expr_str);
328 #define SET_SIZE_EXPR(name, opt_name) do { \
329 ret = av_expr_parse_and_eval(&res, expr = rot->name##_expr_str, \
330 var_names, rot->var_values, \
331 func1_names, func1, NULL, NULL, rot, 0, ctx); \
332 if (ret < 0 || isnan(res) || isinf(res) || res <= 0) { \
333 av_log(ctx, AV_LOG_ERROR, \
334 "Error parsing or evaluating expression for option %s: " \
335 "invalid expression '%s' or non-positive or indefinite value %f\n", \
336 opt_name, expr, res); \
345 rot->
outw = res + 0.5;
348 rot->
outh = res + 0.5;
353 rot->
outw = res + 0.5;
357 outlink->
w = rot->
outw;
358 outlink->
h = rot->
outh;
370 *((uint16_t *)pout) = *((uint16_t *)pin);
377 *((uint32_t *)pout) = *((uint32_t *)pin);
380 memcpy(pout, pin, elem_size);
390 memcpy(dst,
src, elem_size *
len);
418 #define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb))
426 const int outw =
td->outw, outh =
td->outh;
427 const int inw =
td->inw, inh =
td->inh;
428 const int plane =
td->plane;
429 const int xi =
td->xi, yi =
td->yi;
430 const int c =
td->c,
s =
td->s;
431 const int start = (outh * job ) / nb_jobs;
432 const int end = (outh * (job+1)) / nb_jobs;
433 int xprime =
td->xprime + start *
s;
434 int yprime =
td->yprime + start *
c;
437 for (j = start; j <
end; j++) {
438 x = xprime +
xi +
FIXP*(inw-1)/2;
439 y = yprime + yi +
FIXP*(inh-1)/2;
441 if (fabs(rot->
angle - 0) < FLT_EPSILON && outw == inw && outh == inh) {
443 in->data[plane] + j *
in->linesize[plane],
445 }
else if (fabs(rot->
angle -
M_PI/2) < FLT_EPSILON && outw == inh && outh == inw) {
449 }
else if (fabs(rot->
angle -
M_PI) < FLT_EPSILON && outw == inw && outh == inh) {
451 in->data[plane] + (outh-j-1) *
in->linesize[plane],
453 }
else if (fabs(rot->
angle - 3*
M_PI/2) < FLT_EPSILON && outw == inh && outh == inw) {
459 for (
i = 0;
i < outw;
i++) {
467 if (x1 >= -1 && x1 <= inw && y1 >= -1 && y1 <= inh) {
475 int x2 = av_clip(x1, 0, inw-1);
476 int y2 = av_clip(y1, 0, inh-1);
477 pin =
in->data[plane] + y2 *
in->linesize[plane] + x2 * rot->
draw.
pixelstep[plane];
492 *((uint32_t *)pout) = *((uint32_t *)pin);
516 int angle_int,
s,
c, plane;
533 angle_int = res *
FIXP * 16;
540 0, 0, outlink->
w, outlink->
h);
542 for (plane = 0; plane < rot->
nb_planes; plane++) {
543 int hsub = plane == 1 || plane == 2 ? rot->
hsub : 0;
544 int vsub = plane == 1 || plane == 2 ? rot->
vsub : 0;
550 .outh = outh, .outw = outw,
551 .xi = -(outw-1) *
c / 2, .yi = (outw-1) *
s / 2,
552 .xprime = -(outh-1) *
s / 2,
553 .yprime = -(outh-1) *
c / 2,
554 .plane = plane, .c =
c, .s =
s };
565 char *res,
int res_len,
int flags)
570 if (!strcmp(cmd,
"angle") || !strcmp(cmd,
"a")) {
576 "Error when parsing the expression '%s' for angle command\n", args);
615 .priv_class = &rotate_class,
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
static int64_t int_sin(int64_t a)
Compute the sin of a using integer values.
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
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
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)
int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, void *log_ctx)
Put the RGBA values that correspond to color_string in rgba_color.
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.
static av_cold int end(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
int depth
Number of bits in the component.
@ AV_PIX_FMT_YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
static int filter_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs)
uint8_t fillcolor[4]
color expressed either in YUVA or RGBA colorspace for the padding area
@ 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 uint8_t * interpolate_bilinear16(uint8_t *dst_color, const uint8_t *src, int src_linesize, int src_linestep, int x, int y, int max_x, int max_y)
Interpolate the color in src at position x and y using bilinear interpolation.
AVFormatInternal * internal
An opaque field for libavformat internal usage.
A link between two filters.
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
int pixelstep[MAX_PLANES]
static double get_rotated_h(void *opaque, double angle)
@ AV_PIX_FMT_YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
int av_expr_parse(AVExpr **expr, const char *s, const char *const *const_names, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), int log_offset, void *log_ctx)
Parse an expression.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
AVFILTER_DEFINE_CLASS(rotate)
static av_always_inline void simple_rotate_internal(uint8_t *dst, const uint8_t *src, int src_linesize, int angle, int elem_size, int len)
AVExpr * angle_expr
parsed expression for the angle
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
static const char *const func1_names[]
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
A filter pad used for either input or output.
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (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
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void rotate(const float rot_mat[3][3], float *vec)
Rotate vector with given rotation matrix.
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
#define AV_CEIL_RSHIFT(a, b)
uint8_t *(* interpolate_bilinear)(uint8_t *dst_color, const uint8_t *src, int src_linesize, int src_linestep, int x, int y, int max_x, int max_y)
static const AVFilterPad outputs[]
static enum AVPixelFormat pix_fmts[]
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define xi(width, name, var, range_min, range_max, subs,...)
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
Init a draw context.
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
@ 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_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
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.
static av_cold int init(AVFilterContext *ctx)
@ 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_YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-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_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
@ 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_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
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
static av_always_inline void simple_rotate(uint8_t *dst, const uint8_t *src, int src_linesize, int angle, int elem_size, int len)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int av_expr_parse_and_eval(double *d, const char *s, const char *const *const_names, const double *const_values, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), void *opaque, int log_offset, void *log_ctx)
Parse and evaluate an expression.
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.
AVFilterContext * src
source filter
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
static const AVFilterPad rotate_inputs[]
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
static const AVFilterPad rotate_outputs[]
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
#define SET_SIZE_EXPR(name, opt_name)
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
static const AVOption rotate_options[]
static av_cold void uninit(AVFilterContext *ctx)
static double(*const func1[])(void *, double)
static double get_rotated_w(void *opaque, double angle)
#define i(width, name, range_min, range_max)
int w
agreed upon image width
static int query_formats(AVFilterContext *ctx)
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Used for passing data between threads.
const char * name
Pad name.
void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4])
Prepare a color.
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
static int config_props(AVFilterLink *outlink)
int h
agreed upon image height
double var_values[VAR_VARS_NB]
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
char * angle_expr_str
expression for the angle
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
static const char *const var_names[]
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define flags(name, subs,...)
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
static uint8_t * interpolate_bilinear8(uint8_t *dst_color, const uint8_t *src, int src_linesize, int src_linestep, int x, int y, int max_x, int max_y)
Interpolate the color in src at position x and y using bilinear interpolation.
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
static av_always_inline void copy_elem(uint8_t *pout, const uint8_t *pin, int elem_size)
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.