summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_video.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2017-02-22 13:07:47 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2017-02-24 16:44:34 +0100
commit7b82efe4ee6b9a3453f87e301e93d3e403c8f5de (patch)
tree122bcead183c674fc90e56af50aeae3b56d5b419 /src/gallium/auxiliary/util/u_video.h
parent3a418322ec6d540b1334f42688839aefb5d88d6d (diff)
st/va: Fix up YV12 to NV12 putImage conversion
Use the utility u_copy_nv12_from_yv12 to implement this similarly to how it's been done in the VPAU state tracker. The old code mixed up planes and fields and didn't correctly handle video surfaces in interlaced format. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/util/u_video.h')
-rw-r--r--src/gallium/auxiliary/util/u_video.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/gallium/auxiliary/util/u_video.h b/src/gallium/auxiliary/util/u_video.h
index 7cd6268d1fc..251e144c792 100644
--- a/src/gallium/auxiliary/util/u_video.h
+++ b/src/gallium/auxiliary/util/u_video.h
@@ -173,43 +173,6 @@ u_copy_yv12_to_nv12(void *const *destination_data,
}
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 = true;
- 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,
int src_plane, int src_field,