69 unsigned char *
_buf,
int _width,
int _height,
int _size,
72 float _aspect = -1.0f,
double _rate = -1.0f) MUNUSED;
79 unsigned char *_buf,
int _width,
int _height,
80 int _size, const
int *
p, const
int *o,
81 float _aspect,
double _rate)
89 vf->frame_rate = _rate;
98 vf->interlaced_frame = 1;
99 vf->top_field_first = 1;
105 memset(vf->priv, 0, 4 *
sizeof(
unsigned char *));
109 memcpy(vf->pitches, p, 3 *
sizeof(
int));
115 vf->pitches[0] = _width;
116 vf->pitches[1] = vf->pitches[2] = _width >> 1;
120 vf->pitches[0] = (_width * vf->bpp) >> 3;
121 vf->pitches[1] = vf->pitches[2] = 0;
127 memcpy(vf->offsets, o, 3 *
sizeof(
int));
134 vf->offsets[1] = _width * _height;
135 vf->offsets[2] = vf->offsets[1] + (vf->offsets[1] >> 2);
140 vf->offsets[1] = _width * _height;
141 vf->offsets[2] = vf->offsets[1] + (vf->offsets[1] >> 1);
145 vf->offsets[0] = vf->offsets[1] = vf->offsets[2] = 0;
157 int uv_height = vf->
height >> 1;
192 int height1 = height0 >> 1;
193 int height2 = height0 >> 1;
202 src->
buf + src->
offsets[0], pitch0 * height0);
204 src->
buf + src->
offsets[1], pitch1 * height1);
206 src->
buf + src->
offsets[2], pitch2 * height2);
241 uint bpp = type_bpp / 4;
247 uint adj_w = (width + 15) & ~0xF;
248 uint adj_h = (height + 15) & ~0xF;
249 return (adj_w * adj_h * bpp + 4) / bpb;