59 #define OFFSET(x) offsetof(TransContext, x)
60 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
65 {
"passthrough",
"do not apply transposition if the input matches the specified geometry",
79 const char *shorthand[] = {
"dir",
"passthrough",
NULL };
81 trans->
class = &transpose_class;
124 "dir values greater than 3 are deprecated, use the passthrough option instead\n");
132 "w:%d h:%d -> w:%d h:%d (passthrough mode)\n",
133 inlink->
w, inlink->
h, inlink->
w, inlink->
h);
144 outlink->
w = inlink->
h;
145 outlink->
h = inlink->
w;
153 inlink->
w, inlink->
h, trans->
dir, outlink->
w, outlink->
h,
154 trans->
dir == 1 || trans->
dir == 3 ?
"clockwise" :
"counterclockwise",
155 trans->
dir == 0 || trans->
dir == 3);
193 for (plane = 0; out->
data[plane]; plane++) {
194 int hsub = plane == 1 || plane == 2 ? trans->
hsub : 0;
195 int vsub = plane == 1 || plane == 2 ? trans->
vsub : 0;
196 int pixstep = trans->
pixsteps[plane];
197 int inh = in->
video->
h>>vsub;
198 int outw = out->
video->
w>>hsub;
199 int outh = out->
video->
h>>vsub;
201 int dstlinesize, srclinesize;
204 dst = out->
data[plane];
206 src = in->
data[plane];
210 src += in->
linesize[plane] * (inh-1);
215 dst += out->
linesize[plane] * (outh-1);
219 for (y = 0; y < outh; y++) {
222 for (x = 0; x < outw; x++)
223 dst[x] = src[x*srclinesize + y];
226 for (x = 0; x < outw; x++)
227 *((uint16_t *)(dst + 2*x)) = *((uint16_t *)(src + x*srclinesize + y*2));
230 for (x = 0; x < outw; x++) {
236 for (x = 0; x < outw; x++)
237 *((uint32_t *)(dst + 4*x)) = *((uint32_t *)(src + x*srclinesize + y*4));
277 .
inputs = avfilter_vf_transpose_inputs,
278 .
outputs = avfilter_vf_transpose_outputs,
279 .priv_class = &transpose_class,