FFmpeg
vf_lenscorrection.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007 Richard Spindler (author of frei0r plugin from which this was derived)
3  * Copyright (C) 2014 Daniel Oberhoff
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file
24  * Lenscorrection filter, algorithm from the frei0r plugin with the same name
25 */
26 #include <stdlib.h>
27 #include <math.h>
28 
29 #include "libavutil/opt.h"
30 #include "libavutil/intreadwrite.h"
31 #include "libavutil/pixdesc.h"
32 
33 #include "avfilter.h"
34 #include "internal.h"
35 #include "video.h"
36 
37 typedef struct LenscorrectionCtx {
38  const AVClass *av_class;
39  int width;
40  int height;
41  int hsub, vsub;
42  int nb_planes;
43  double cx, cy, k1, k2;
46 
47 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
48 static const AVOption lenscorrection_options[] = {
49  { "cx", "set relative center x", offsetof(LenscorrectionCtx, cx), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 1, .flags=FLAGS },
50  { "cy", "set relative center y", offsetof(LenscorrectionCtx, cy), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 1, .flags=FLAGS },
51  { "k1", "set quadratic distortion factor", offsetof(LenscorrectionCtx, k1), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -1, 1, .flags=FLAGS },
52  { "k2", "set double quadratic distortion factor", offsetof(LenscorrectionCtx, k2), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -1, 1, .flags=FLAGS },
53  { NULL }
54 };
55 
56 AVFILTER_DEFINE_CLASS(lenscorrection);
57 
58 typedef struct ThreadData {
59  AVFrame *in, *out;
60  int w, h;
61  int plane;
64 } ThreadData;
65 
66 static int filter_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs)
67 {
69  AVFrame *in = td->in;
70  AVFrame *out = td->out;
71 
72  const int w = td->w, h = td->h;
73  const int xcenter = td->xcenter;
74  const int ycenter = td->ycenter;
75  const int start = (h * job ) / nb_jobs;
76  const int end = (h * (job+1)) / nb_jobs;
77  const int plane = td->plane;
78  const int inlinesize = in->linesize[plane];
79  const int outlinesize = out->linesize[plane];
80  const uint8_t *indata = in->data[plane];
81  uint8_t *outrow = out->data[plane] + start * outlinesize;
82  int i;
83  for (i = start; i < end; i++, outrow += outlinesize) {
84  const int off_y = i - ycenter;
85  uint8_t *out = outrow;
86  int j;
87  for (j = 0; j < w; j++) {
88  const int off_x = j - xcenter;
89  const int64_t radius_mult = td->correction[j + i*w];
90  const int x = xcenter + ((radius_mult * off_x + (1<<23))>>24);
91  const int y = ycenter + ((radius_mult * off_y + (1<<23))>>24);
92  const char isvalid = x > 0 && x < w - 1 && y > 0 && y < h - 1;
93  *out++ = isvalid ? indata[y * inlinesize + x] : 0;
94  }
95  }
96  return 0;
97 }
98 
100 {
101  static const enum AVPixelFormat pix_fmts[] = {
109  };
111  if (!fmts_list)
112  return AVERROR(ENOMEM);
113  return ff_set_common_formats(ctx, fmts_list);
114 }
115 
117 {
118  LenscorrectionCtx *rect = ctx->priv;
119  int i;
120 
121  for (i = 0; i < FF_ARRAY_ELEMS(rect->correction); i++) {
122  av_freep(&rect->correction[i]);
123  }
124 }
125 
126 static int config_props(AVFilterLink *outlink)
127 {
128  AVFilterContext *ctx = outlink->src;
129  LenscorrectionCtx *rect = ctx->priv;
130  AVFilterLink *inlink = ctx->inputs[0];
131  const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(inlink->format);
132  rect->hsub = pixdesc->log2_chroma_w;
133  rect->vsub = pixdesc->log2_chroma_h;
134  outlink->w = rect->width = inlink->w;
135  outlink->h = rect->height = inlink->h;
136  rect->nb_planes = av_pix_fmt_count_planes(inlink->format);
137  return 0;
138 }
139 
141 {
142  AVFilterContext *ctx = inlink->dst;
143  AVFilterLink *outlink = ctx->outputs[0];
145  AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
146  int plane;
147 
148  if (!out) {
149  av_frame_free(&in);
150  return AVERROR(ENOMEM);
151  }
152 
154 
155  for (plane = 0; plane < rect->nb_planes; ++plane) {
156  int hsub = plane == 1 || plane == 2 ? rect->hsub : 0;
157  int vsub = plane == 1 || plane == 2 ? rect->vsub : 0;
158  int w = AV_CEIL_RSHIFT(rect->width, hsub);
159  int h = AV_CEIL_RSHIFT(rect->height, vsub);
160  int xcenter = rect->cx * w;
161  int ycenter = rect->cy * h;
162  int k1 = rect->k1 * (1<<24);
163  int k2 = rect->k2 * (1<<24);
164  ThreadData td = {
165  .in = in,
166  .out = out,
167  .w = w,
168  .h = h,
169  .xcenter = xcenter,
170  .ycenter = ycenter,
171  .plane = plane};
172 
173  if (!rect->correction[plane]) {
174  int i,j;
175  const int64_t r2inv = (4LL<<60) / (w * w + h * h);
176 
177  rect->correction[plane] = av_malloc_array(w, h * sizeof(**rect->correction));
178  if (!rect->correction[plane])
179  return AVERROR(ENOMEM);
180  for (j = 0; j < h; j++) {
181  const int off_y = j - ycenter;
182  const int off_y2 = off_y * off_y;
183  for (i = 0; i < w; i++) {
184  const int off_x = i - xcenter;
185  const int64_t r2 = ((off_x * off_x + off_y2) * r2inv + (1LL<<31)) >> 32;
186  const int64_t r4 = (r2 * r2 + (1<<27)) >> 28;
187  const int radius_mult = (r2 * k1 + r4 * k2 + (1LL<<27) + (1LL<<52))>>28;
188  rect->correction[plane][j * w + i] = radius_mult;
189  }
190  }
191  }
192 
193  td.correction = rect->correction[plane];
195  }
196 
197  av_frame_free(&in);
198  return ff_filter_frame(outlink, out);
199 }
200 
202  {
203  .name = "default",
204  .type = AVMEDIA_TYPE_VIDEO,
205  .filter_frame = filter_frame,
206  },
207  { NULL }
208 };
209 
211  {
212  .name = "default",
213  .type = AVMEDIA_TYPE_VIDEO,
214  .config_props = config_props,
215  },
216  { NULL }
217 };
218 
220  .name = "lenscorrection",
221  .description = NULL_IF_CONFIG_SMALL("Rectify the image by correcting for lens distortion."),
222  .priv_size = sizeof(LenscorrectionCtx),
226  .priv_class = &lenscorrection_class,
227  .uninit = uninit,
229 };
ff_get_video_buffer
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition: video.c:99
td
#define td
Definition: regdef.h:70
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_lenscorrection.c:116
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
AVERROR
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
opt.h
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_lenscorrection.c:99
ff_make_format_list
AVFilterFormats * ff_make_format_list(const int *fmts)
Create a list of supported formats.
Definition: formats.c:283
out
FILE * out
Definition: movenc.c:54
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1080
LenscorrectionCtx::cy
double cy
Definition: vf_lenscorrection.c:43
ThreadData::xcenter
int xcenter
Definition: vf_lenscorrection.c:62
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2522
rect
Definition: f_ebur128.c:91
inlink
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
Definition: filter_design.txt:212
ThreadData::correction
int32_t * correction
Definition: vf_lenscorrection.c:63
ff_vf_lenscorrection
AVFilter ff_vf_lenscorrection
Definition: vf_lenscorrection.c:219
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:202
end
static av_cold int end(AVCodecContext *avctx)
Definition: avrndec.c:90
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:295
pixdesc.h
w
uint8_t w
Definition: llviddspenc.c:38
AVOption
AVOption.
Definition: opt.h:246
ThreadData::w
int w
Definition: vf_blend.c:58
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:148
ThreadData::out
AVFrame * out
Definition: af_adeclick.c:488
video.h
AVFormatContext::internal
AVFormatInternal * internal
An opaque field for libavformat internal usage.
Definition: avformat.h:1795
AVFilterFormats
A list of supported formats for one end of a filter link.
Definition: formats.h:64
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(lenscorrection)
config_props
static int config_props(AVFilterLink *outlink)
Definition: vf_lenscorrection.c:126
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2562
LenscorrectionCtx::correction
int32_t * correction[4]
Definition: vf_lenscorrection.c:44
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:215
start
void INT64 start
Definition: avisynth_c.h:767
plane
int plane
Definition: avisynth_c.h:384
LenscorrectionCtx::nb_planes
int nb_planes
Definition: vf_lenscorrection.c:42
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:54
av_cold
#define av_cold
Definition: attributes.h:84
ff_set_common_formats
int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
A helper for query_formats() which sets all links to the same list of formats.
Definition: formats.c:568
ThreadData::plane
int plane
Definition: vf_blend.c:57
intreadwrite.h
AV_PIX_FMT_YUVA420P
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:101
AV_CEIL_RSHIFT
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:58
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:225
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:275
ctx
AVFormatContext * ctx
Definition: movenc.c:48
AVPixFmtDescriptor::log2_chroma_w
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
Definition: pixdesc.h:92
lenscorrection_options
static const AVOption lenscorrection_options[]
Definition: vf_lenscorrection.c:48
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
LenscorrectionCtx::cx
double cx
Definition: vf_lenscorrection.c:43
ThreadData::h
int h
Definition: vf_blend.c:58
AV_PIX_FMT_YUVJ444P
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:80
int32_t
int32_t
Definition: audio_convert.c:194
arg
const char * arg
Definition: jacosubdec.c:66
LenscorrectionCtx::vsub
int vsub
Definition: vf_lenscorrection.c:41
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:67
NULL
#define NULL
Definition: coverity.c:32
av_frame_copy_props
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:654
AV_PIX_FMT_YUVJ420P
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:78
LenscorrectionCtx::k1
double k1
Definition: vf_lenscorrection.c:43
inputs
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
Definition: filter_design.txt:243
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_lenscorrection.c:140
LenscorrectionCtx::k2
double k2
Definition: vf_lenscorrection.c:43
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
FFMIN
#define FFMIN(a, b)
Definition: common.h:96
AV_PIX_FMT_YUVA444P
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:177
internal.h
in
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
Definition: audio_convert.c:326
lenscorrection_outputs
static const AVFilterPad lenscorrection_outputs[]
Definition: vf_lenscorrection.c:210
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:259
lenscorrection_inputs
static const AVFilterPad lenscorrection_inputs[]
Definition: vf_lenscorrection.c:201
FLAGS
#define FLAGS
Definition: vf_lenscorrection.c:47
av_malloc_array
#define av_malloc_array(a, b)
Definition: tableprint_vlc.h:32
ff_filter_get_nb_threads
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:802
ThreadData
Used for passing data between threads.
Definition: af_adeclick.c:487
uint8_t
uint8_t
Definition: audio_convert.c:194
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:60
AVFilter
Filter definition.
Definition: avfilter.h:144
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen_template.c:38
LenscorrectionCtx::hsub
int hsub
Definition: vf_lenscorrection.c:41
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
avfilter.h
LenscorrectionCtx::av_class
const AVClass * av_class
Definition: vf_lenscorrection.c:38
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:71
AVFilterContext
An instance of a filter.
Definition: avfilter.h:338
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:168
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:70
ThreadData::in
AVFrame * in
Definition: af_afftdn.c:1082
ThreadData::ycenter
int ycenter
Definition: vf_lenscorrection.c:62
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:81
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:35
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
AV_PIX_FMT_YUV410P
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:72
LenscorrectionCtx::height
int height
Definition: vf_lenscorrection.c:40
LenscorrectionCtx::width
int width
Definition: vf_lenscorrection.c:39
h
h
Definition: vp9dsp_template.c:2038
LenscorrectionCtx
Definition: vf_lenscorrection.c:37
AVPixFmtDescriptor::log2_chroma_h
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
Definition: pixdesc.h:101
filter_slice
static int filter_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs)
Definition: vf_lenscorrection.c:66