58 for (
i = 0;
i < 4;
i++) {
62 if ((
desc->log2_chroma_h ||
desc->log2_chroma_w) &&
63 (
i == 1 ||
i == 2) != (
s->map[
i] == 1 ||
s->map[
i] == 2))
88 for (
i = 0;
i <
s->planes;
i++) {
101 uint8_t *shuffled_data[4] = {
NULL };
102 int shuffled_linesize[4] = { 0 };
105 for (
i = 0;
i <
s->planes;
i++) {
106 shuffled_data[
i] =
frame->data[
s->map[
i]];
107 shuffled_linesize[
i] =
frame->linesize[
s->map[
i]];
109 memcpy(
frame->data, shuffled_data,
sizeof(shuffled_data));
110 memcpy(
frame->linesize, shuffled_linesize,
sizeof(shuffled_linesize));
138#define OFFSET(x) offsetof(ShufflePlanesContext, x)
139#define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
160 .p.name =
"shuffleplanes",
162 .p.priv_class = &shuffleplanes_class,
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
const FFFilter ff_vf_shuffleplanes
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
#define i(width, name, range_min, range_max)
common internal and external API header
@ AV_OPT_TYPE_INT
Underlying C type is int.
#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
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define AVFILTER_DEFINE_CLASS(fname)
#define FILTER_QUERY_FUNC2(func)
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 @257111027162314367033347246032313251342043035002 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.
This structure describes decoded (raw) audio or video data.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
static AVFormatContext * ctx
static const AVOption shuffleplanes_options[]
static int shuffleplanes_filter_frame(AVFilterLink *inlink, AVFrame *frame)
static av_cold int shuffleplanes_config_input(AVFilterLink *inlink)
static const AVFilterPad shuffleplanes_inputs[]
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
static void copy(const float *p1, float *p2, const int length)
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.