diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-02-11 11:05:02 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-02-11 11:05:02 -0500 |
commit | d6c50b221cbab6e726948e2310c1def9fc38da64 (patch) | |
tree | 0d8d8e242f30511b1147fcf2f28a52444b9b205c /src | |
parent | 8e437e996cc3f2c424c342701f4aa6bcf72ad08e (diff) |
R6xx/R7xx Xv: add support for packed uploads
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_textured_video.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index eeaf9909..e70a012f 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -195,22 +195,18 @@ R600CopyPlanar(ScrnInfoPtr pScrn, } static void -CopyPackedtoNV12(unsigned char *src, unsigned char *dst, - int srcPitch, int dstPitch, - int w, int h, int id) +R600CopyPacked(ScrnInfoPtr pScrn, + unsigned char *src, uint32_t dst_mc_addr, + int srcPitch, int dstPitch, + int w, int h) { - int i; - if (srcPitch == dstPitch) { - memcpy(dst, src, srcPitch * h); - dst += (dstPitch * h); - } else { - for (i = 0; i < h; i++) { - memcpy(dst, src, srcPitch); - src += srcPitch; - dst += dstPitch; - } - } + /* YUV */ + R600CopyToVRAM(pScrn, + (char *)src, srcPitch, + dstPitch >> 2, dst_mc_addr, h, 32, + 0, 0, w >> 1, h); + } static int @@ -410,9 +406,9 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn, case FOURCC_YUY2: default: if (info->ChipFamily >= CHIP_FAMILY_R600) { - CopyPackedtoNV12(buf, pPriv->src_addr, - 2 * width, pPriv->src_pitch, - width, height, id); + R600CopyPacked(pScrn, buf, pPriv->src_offset, + 2 * width, pPriv->src_pitch, + width, height); } else { nlines = ((y2 + 0xffff) >> 16) - top; RADEONCopyData(pScrn, buf, pPriv->src_addr, srcPitch, dstPitch, nlines, npixels, 2); |