39 #define OFFSET(x) offsetof(UntileContext, x) 40 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM 44 {.str =
"6x5"}, 0, 0,
FLAGS },
54 if (s->
w > UINT_MAX / s->
h) {
88 "Input resolution %ux%u not multiple of layout %ux%u.\n",
89 inlink->
w, inlink->
h, s->
w, s->
h);
92 outlink->
w = inlink->
w / s->
w;
93 outlink->
h = inlink->
h / s->
h;
140 for (i = 1; i < 3; i ++) {
197 .priv_class = &untile_class,
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
Take a frame from the link's FIFO and update the link's stats.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
static av_cold int init(AVFilterContext *ctx)
Main libavfilter public API header.
int h
agreed upon image height
FF_FILTER_FORWARD_STATUS(inlink, outlink)
static const AVOption untile_options[]
static int activate(AVFilterContext *ctx)
AVFILTER_DEFINE_CLASS(untile)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], const AVPixFmtDescriptor *pixdesc)
Compute the max pixel step for each plane of an image with a format described by pixdesc.
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
#define AV_LOG_VERBOSE
Detailed information.
static const AVFilterPad untile_inputs[]
#define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink)
Forward the status on an output link to an input link.
A filter pad used for either input or output.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
A link between two filters.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown or variable; if left to 0/0, will be automatically copied from the first input of the source filter if it exists.
static const AVFilterPad untile_outputs[]
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
int w
agreed upon image width
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
const AVPixFmtDescriptor * desc
#define AV_TIME_BASE
Internal time base represented as integer.
AVFilterContext * src
source filter
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
static const AVFilterPad outputs[]
int format
agreed upon media format
static int config_output(AVFilterLink *outlink)
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
static AVRational av_make_q(int num, int den)
Create an AVRational.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
const char * name
Filter name.
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
AVRational av_gcd_q(AVRational a, AVRational b, int max_den, AVRational def)
Return the best rational so that a and b are multiple of it.
offset must point to two consecutive integers
static int query_formats(AVFilterContext *ctx)
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
AVFilterLink ** outputs
array of pointers to output links
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
FF_FILTER_FORWARD_WANTED(outlink, inlink)
static av_cold void uninit(AVFilterContext *ctx)
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions