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;
116 "dir values greater than 3 are deprecated, use the passthrough option instead\n");
124 "w:%d h:%d -> w:%d h:%d (passthrough mode)\n",
125 inlink->
w, inlink->
h, inlink->
w, inlink->
h);
136 outlink->
w = inlink->
h;
137 outlink->
h = inlink->
w;
145 inlink->
w, inlink->
h, trans->
dir, outlink->
w, outlink->
h,
146 trans->
dir == 1 || trans->
dir == 3 ?
"clockwise" :
"counterclockwise",
147 trans->
dir == 0 || trans->
dir == 3);
185 for (plane = 0; out->
data[plane]; plane++) {
186 int hsub = plane == 1 || plane == 2 ? trans->
hsub : 0;
187 int vsub = plane == 1 || plane == 2 ? trans->
vsub : 0;
188 int pixstep = trans->
pixsteps[plane];
189 int inh = in->
video->
h>>vsub;
190 int outw = out->
video->
w>>hsub;
191 int outh = out->
video->
h>>vsub;
193 int dstlinesize, srclinesize;
196 dst = out->
data[plane];
198 src = in->
data[plane];
202 src += in->
linesize[plane] * (inh-1);
207 dst += out->
linesize[plane] * (outh-1);
211 for (y = 0; y < outh; y++) {
214 for (x = 0; x < outw; x++)
215 dst[x] = src[x*srclinesize + y];
218 for (x = 0; x < outw; x++)
219 *((uint16_t *)(dst + 2*x)) = *((uint16_t *)(src + x*srclinesize + y*2));
222 for (x = 0; x < outw; x++) {
228 for (x = 0; x < outw; x++)
229 *((uint32_t *)(dst + 4*x)) = *((uint32_t *)(src + x*srclinesize + y*4));
232 for (x = 0; x < outw; x++) {
233 int64_t
v =
AV_RB48(src + x*srclinesize + y*6);
238 for (x = 0; x < outw; x++)
239 *((uint64_t *)(dst + 8*x)) = *((uint64_t *)(src + x*srclinesize + y*8));
279 .
inputs = avfilter_vf_transpose_inputs,
280 .
outputs = avfilter_vf_transpose_outputs,
281 .priv_class = &transpose_class,