diff options
-rw-r--r-- | src/i830_video.c | 20 | ||||
-rw-r--r-- | src/i965_hwmc.c | 11 | ||||
-rw-r--r-- | src/i965_video.c | 4 |
3 files changed, 28 insertions, 7 deletions
diff --git a/src/i830_video.c b/src/i830_video.c index 7b81b04d..a52fac41 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2290,6 +2290,11 @@ I830PutImage(ScrnInfoPtr pScrn, srcPitch = (width + 0x3ff) & ~0x3ff; srcPitch2 = ((width >> 1) + 0x3ff) & ~0x3ff; } + break; + case FOURCC_XVMC: + srcPitch = (width + 0x3) & ~0x3; + srcPitch2 = ((width >> 1) + 0x3) & ~0x3; + break; #endif break; case FOURCC_UYVY: @@ -2428,6 +2433,13 @@ I830PutImage(ScrnInfoPtr pScrn, break; #ifdef INTEL_XVMC case FOURCC_XVMC: + if (pPriv->rotation != RR_Rotate_0) { + top &= ~1; + nlines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top; + I830CopyPlanarData(pScrn, pPriv, buf, srcPitch, srcPitch2, dstPitch, + height, top, left, nlines, npixels, id); + } + break; #endif default: @@ -2468,6 +2480,14 @@ I830PutImage(ScrnInfoPtr pScrn, i830_fill_colorkey (pScreen, pPriv->colorKey, clipBoxes); } } else if (IS_I965G(pI830)) { + +#ifdef INTEL_XVMC + if (id == FOURCC_XVMC && pPriv->rotation == RR_Rotate_0) { + pPriv->YBuf0offset = buf - pI830->FbBase; + pPriv->UBuf0offset = pPriv->YBuf0offset + height*width; + pPriv->VBuf0offset = pPriv->UBuf0offset + height*width/4; + } +#endif I965DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height, dstPitch, x1, y1, x2, y2, src_w, src_h, drw_w, drw_h, pPixmap); diff --git a/src/i965_hwmc.c b/src/i965_hwmc.c index 8446c522..140fa9a8 100644 --- a/src/i965_hwmc.c +++ b/src/i965_hwmc.c @@ -230,13 +230,10 @@ static int put_image(ScrnInfoPtr pScrn, struct intel_xvmc_command *cmd = (struct intel_xvmc_command *)buf; if (id == FOURCC_XVMC) { buf = pI830->FbBase + cmd->surf_offset; - XvPutImage(pScrn, src_x, src_y, drw_x, drw_y, src_w, src_h, - drw_w, drw_h, FOURCC_I420, buf, width, height, sync, clipBoxes, - data, pDraw); - }else - XvPutImage(pScrn, src_x, src_y, drw_x, drw_y, src_w, src_h, - drw_w, drw_h, id, buf, width, height, sync, clipBoxes, - data, pDraw); + } + XvPutImage(pScrn, src_x, src_y, drw_x, drw_y, src_w, src_h, + drw_w, drw_h, id, buf, width, height, sync, clipBoxes, + data, pDraw); return Success; } diff --git a/src/i965_video.c b/src/i965_video.c index 4572e137..eaf6c01f 100644 --- a/src/i965_video.c +++ b/src/i965_video.c @@ -37,6 +37,7 @@ #include "i830.h" #include "i830_video.h" +#include "i830_hwmc.h" #include "brw_defines.h" #include "brw_structs.h" #include <string.h> @@ -248,6 +249,9 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, src_pitch[0] = video_pitch; n_src_surf = 1; break; +#ifdef INTEL_XVMC + case FOURCC_XVMC: +#endif case FOURCC_I420: case FOURCC_YV12: src_surf_format = BRW_SURFACEFORMAT_R8_UNORM; |