83 void reset(
int width);
84 void resetUSWCDetection(
void);
85 void setUSWC(
bool uswc);
88 void allocateCache(
int width);
99 unsigned char *_buf,
int _width,
int _height,
int _size,
100 const int *p =
nullptr,
101 const int *o =
nullptr,
102 float _aspect = -1.0f,
double _rate = -1.0f,
110 unsigned char *_buf,
int _width,
int _height,
111 int _size,
const int *p,
const int *o,
112 float _aspect,
double _rate,
int _aligned)
137 memset(vf->
priv, 0, 4 *
sizeof(
unsigned char *));
142 width_aligned = _width;
146 width_aligned = (_width + _aligned - 1) & ~(_aligned - 1);
151 memcpy(vf->
pitches, p, 3 *
sizeof(
int));
157 vf->
pitches[0] = width_aligned;
162 vf->
pitches[0] = width_aligned;
163 vf->
pitches[1] = width_aligned;
168 vf->
pitches[0] = (width_aligned * vf->
bpp) >> 3;
175 memcpy(vf->
offsets, o, 3 *
sizeof(
int));
182 vf->
offsets[1] = width_aligned * _height;
184 vf->
offsets[1] + ((width_aligned+1) >> 1) * ((_height+1) >> 1);
189 vf->
offsets[1] = width_aligned * _height;
191 vf->
offsets[1] + ((width_aligned+1) >> 1) * _height;
196 vf->
offsets[1] = width_aligned * _height;
211 int uv_height = (vf->
height+1) >> 1;
227 if (a &&
b && a->
codec ==
b->codec &&
230 return (a->
codec ==
b->codec) &&
233 (a->
size ==
b->size);
240 (a->
size ==
b->size) &&
295 uint bpp = type_bpp / 4;
311 adj_w = (width + _aligned - 1) & ~(_aligned - 1);
314 uint remainder = (adj_w * height * bpp) % bpb;
315 return (adj_w * height * bpp) / bpb + (remainder ? 1 : 0);
324 int chroma_pitch = pitch >> 1;
325 int chroma_height = dst->
height >> 1;
329 pitch * dst->
height + chroma_pitch * chroma_height };
330 int pitches[3] = { pitch, chroma_pitch, chroma_pitch };
339 int offsets[3] = { 0, pitch * dst->
height, 0 };
340 int pitches[3] = { pitch, pitch, 0 };
359 int chroma_pitch = pitch >> 1;
360 int chroma_height = src->
height >> 1;
364 pitch * src->
height + chroma_pitch * chroma_height };
365 int pitches[3] = { pitch, chroma_pitch, chroma_pitch };
369 copy(&frameout, src);
374 int offsets[3] = { 0, pitch * src->
height, 0 };
375 int pitches[3] = { pitch, pitch, 0 };
379 copy(&frameout, src);
int pitches[3]
Y, U, & V pitches.
static void copybuffer(VideoFrame *dst, uint8_t *buffer, int pitch, VideoFrameType type=FMT_YV12)
static int bitsperpixel(VideoFrameType type)
static bool compatible(const VideoFrame *a, const VideoFrame *b)
int forcekey
hardware encoded .nuv
enum FrameType_ VideoFrameType
unsigned char * priv[4]
random empty storage
unsigned char * qscale_table
static void init(VideoFrame *vf, VideoFrameType _codec, unsigned char *_buf, int _width, int _height, int _size, const int *p=nullptr, const int *o=nullptr, float _aspect=-1.0f, double _rate=-1.0f, int _aligned=64)
int offsets[3]
Y, U, & V offsets.
void MTV_PUBLIC framecopy(VideoFrame *dst, const VideoFrame *src, bool useSSE=true)
int top_field_first
1 if top field is first.
static void clear(VideoFrame *vf)
int directrendering
1 if managed by FFmpeg
struct VideoFrame_ VideoFrame
static uint buffersize(VideoFrameType type, int width, int height, int _aligned=64)
int interlaced_frame
1 if interlaced.
endian dependent format, ARGB or BGRA
static void copy(VideoFrame *dst, const VideoFrame *src)
copy: copy one frame into another copy only works with the following assumptions: frames are of the s...