Revision a6ddf8bf libavfilter/vf_hflip.c
libavfilter/vf_hflip.c | ||
---|---|---|
27 | 27 |
#include "avfilter.h" |
28 | 28 |
#include "libavutil/pixdesc.h" |
29 | 29 |
#include "libavutil/intreadwrite.h" |
30 |
#include "libavcore/imgutils.h" |
|
30 | 31 |
|
31 | 32 |
typedef struct { |
32 | 33 |
int max_step[4]; ///< max pixel step for each plane, expressed as a number of bytes |
... | ... | |
68 | 69 |
{ |
69 | 70 |
FlipContext *flip = inlink->dst->priv; |
70 | 71 |
const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; |
71 |
int i; |
|
72 |
|
|
73 |
memset(flip->max_step, 0, sizeof(flip->max_step)); |
|
74 |
for (i = 0; i < 4; i++) { |
|
75 |
const AVComponentDescriptor *comp = &(pix_desc->comp[i]); |
|
76 |
if ((comp->step_minus1+1) > flip->max_step[comp->plane]) |
|
77 |
flip->max_step[comp->plane] = comp->step_minus1+1; |
|
78 |
} |
|
79 | 72 |
|
73 |
av_fill_image_max_pixstep(flip->max_step, NULL, pix_desc); |
|
80 | 74 |
flip->hsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_w; |
81 | 75 |
flip->vsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_h; |
82 | 76 |
|
Also available in: Unified diff