}
}
+static inline void
+u_copy_yv12_img_to_nv12_surf(ubyte *const *src,
+ ubyte *dst,
+ unsigned width,
+ unsigned height,
+ unsigned src_stride,
+ unsigned dst_stride,
+ int field)
+{
+ if (field == 0) {
+ ubyte *src_0 = src[field];
+ for (int i = 0; i < height ; i++) {
+ memcpy(dst, src_0, width);
+ dst += dst_stride;
+ src_0 += src_stride;
+ }
+ } else if (field == 1) {
+ const ubyte *src_1 = src[field];
+ const ubyte *src_2 = src[field+1];
+ bool odd = false;
+ for (unsigned i = 0; i < height ; i++) {
+ for (unsigned j = 0; j < width*2 ; j++) {
+ if (odd == false) {
+ dst[j] = src_1[j/2];
+ odd = true;
+ } else {
+ dst[j] = src_2[j/2];
+ odd = false;
+ }
+ }
+ dst += dst_stride;
+ src_1 += src_stride;
+ src_2 += src_stride;
+ }
+ }
+}
+
static inline void
u_copy_swap422_packed(void *const *destination_data,
uint32_t const *destination_pitches,