93 "Left and right sizes differ (%dx%d vs %dx%d).\n",
99 "Left and right time bases differ (%d/%d vs %d/%d).\n",
100 time_base.
num, time_base.
den,
106 "Left and right framerates differ (%d/%d vs %d/%d).\n",
107 frame_rate.
num, frame_rate.
den,
159 if (plane == 1 || plane == 2) {
165 for (i = 0; i < lines; i++) {
169 for (j = 0; j <
length; j++) {
170 dstp[k++] = leftp[j];
171 dstp[k++] = rightp[j];
195 int lines = dst->
height / 2;
198 if (plane == 1 || plane == 2) {
206 dst->
linesize[plane] << interleaved,
211 dst->
linesize[plane] << interleaved,
258 for (i = 0; i < 2; i++) {
270 for (i = 0; i < 2; i++) {
301 for (i = 0; i < 2; i++)
316 #define OFFSET(x) offsetof(FramepackContext, x)
317 #define V AV_OPT_FLAG_VIDEO_PARAM
371 .priv_class = &framepack_class,
373 .
inputs = framepack_inputs,
static int filter_frame_right(AVFilterLink *inlink, AVFrame *frame)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Views are packed per line, as if interlaced.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
Views are alternated temporally.
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static const AVFilterPad outputs[]
#define LIBAVUTIL_VERSION_INT
Main libavfilter public API header.
int h
agreed upon image height
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
static enum AVPixelFormat formats_supported[]
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
const char * name
Pad name.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
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.
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
static av_cold int uninit(AVCodecContext *avctx)
Stereo 3D type: this structure describes how two videos are packed within a single video surface...
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
static int query_formats(AVFilterContext *ctx)
static const AVClass framepack_class
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
static const AVOption options[]
A filter pad used for either input or output.
A link between two filters.
int width
width and height of the video frame
#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; if left to 0/0, will be automatically be cop...
static av_always_inline void spatial_frame_pack(FramepackContext *s, AVFrame *dst)
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...
int64_t double_pts
new pts for frameseq mode
static const uint8_t offset[127][2]
static int filter_frame_left(AVFilterLink *inlink, AVFrame *frame)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
static void vertical_frame_pack(FramepackContext *s, AVFrame *dst, int interleaved)
uint8_t nb_components
The number of components each pixel has, (1-4)
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
AVFrame * input_views[2]
input frames
#define FF_CEIL_RSHIFT(a, b)
AVFilterContext * src
source filter
int format
agreed upon media format
enum AVStereo3DType type
How views are packed within the video.
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...
enum AVStereo3DType format
frame pack type output
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
BYTE int const BYTE int int int height
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
rational number numerator/denominator
static int request_frame(AVFilterLink *outlink)
static const AVFilterPad framepack_inputs[]
const char * name
Filter name.
AVStereo3DType
List of possible 3D Types.
const AVPixFmtDescriptor * pix_desc
agreed pixel format
Views are on top of each other.
static int config_output(AVFilterLink *outlink)
AVStereo3D * av_stereo3d_create_side_data(AVFrame *frame)
Allocate a complete AVFrameSideData and add it to the frame.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static av_cold void framepack_uninit(AVFilterContext *ctx)
Views are next to each other.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
AVFilterContext * dst
dest filter
Views are packed per column.
static const AVFilterPad framepack_outputs[]
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
Copy image plane from src to dst.
AVPixelFormat
Pixel format.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
#define AV_NOPTS_VALUE
Undefined timestamp value.
static void horizontal_frame_pack(FramepackContext *s, AVFrame *dst, int interleaved)