55 for (
i = 0;
i < 4;
i++) {
59 if ((
desc->log2_chroma_h ||
desc->log2_chroma_w) &&
60 (
i == 1 ||
i == 2) != (
s->map[
i] == 1 ||
s->map[
i] == 2))
85 for (
i = 0;
i <
s->planes;
i++) {
99 int shuffled_linesize[4] = { 0 };
102 for (
i = 0;
i <
s->planes;
i++) {
106 memcpy(
frame->
data, shuffled_data,
sizeof(shuffled_data));
107 memcpy(
frame->
linesize, shuffled_linesize,
sizeof(shuffled_linesize));
135 #define OFFSET(x) offsetof(ShufflePlanesContext, x)
136 #define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
166 .
name =
"shuffleplanes",
169 .priv_class = &shuffleplanes_class,
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
#define flags(name, subs,...)
common internal and external API header
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
const VDPAUPixFmtMap * map
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const struct @322 planes[]
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
Describe the class of an AVClass context structure.
A link between two filters.
AVFilterContext * dst
dest filter
int format
agreed upon media format
A filter pad used for either input or output.
const char * name
Pad name.
const char * name
Filter name.
This structure describes decoded (raw) audio or video data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
static const AVOption shuffleplanes_options[]
AVFILTER_DEFINE_CLASS(shuffleplanes)
static int query_formats(AVFilterContext *ctx)
static int shuffleplanes_filter_frame(AVFilterLink *inlink, AVFrame *frame)
static av_cold int shuffleplanes_config_input(AVFilterLink *inlink)
static const AVFilterPad shuffleplanes_inputs[]
AVFilter ff_vf_shuffleplanes
static const AVFilterPad shuffleplanes_outputs[]
static void copy(const float *p1, float *p2, const int length)
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.