Module: wine Branch: master Commit: 9aa3c74503b924e5b251901add6e34e2035cbdce URL: http://source.winehq.org/git/wine.git/?a=commit;h=9aa3c74503b924e5b251901add...
Author: Aric Stewart aric@codeweavers.com Date: Mon Jan 16 14:14:07 2012 -0600
wineqtdecoder: Do not invert height.
---
dlls/wineqtdecoder/qtsplitter.c | 5 +++-- dlls/wineqtdecoder/qtutils.c | 5 +++-- dlls/wineqtdecoder/qtvdecoder.c | 2 -- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index 17f173c..362f535 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -767,12 +767,13 @@ static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk) pvi = (VIDEOINFOHEADER *)amt.pbFormat; pvi->bmiHeader.biSize = sizeof (BITMAPINFOHEADER); pvi->bmiHeader.biWidth = outputWidth; - pvi->bmiHeader.biHeight = -outputHeight; + pvi->bmiHeader.biHeight = outputHeight; pvi->bmiHeader.biPlanes = 1; pvi->bmiHeader.biBitCount = 24; pvi->bmiHeader.biCompression = BI_RGB; + pvi->bmiHeader.biSizeImage = outputWidth * outputHeight * outputDepth;
- filter->outputSize = outputWidth * outputHeight * outputDepth; + filter->outputSize = pvi->bmiHeader.biSizeImage; amt.lSampleSize = 0;
pixelBufferOptions = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); diff --git a/dlls/wineqtdecoder/qtutils.c b/dlls/wineqtdecoder/qtutils.c index a1e8f05..19ba90c 100644 --- a/dlls/wineqtdecoder/qtutils.c +++ b/dlls/wineqtdecoder/qtutils.c @@ -126,7 +126,6 @@ typedef struct { HRESULT AccessPixelBufferPixels( CVPixelBufferRef pixelBuffer, LPBYTE pbDstStream) { LPBYTE pPixels = NULL; - LPBYTE out = NULL; size_t bytesPerRow = 0, height = 0, width = 0; OSType actualType; int i; @@ -143,9 +142,11 @@ HRESULT AccessPixelBufferPixels( CVPixelBufferRef pixelBuffer, LPBYTE pbDstStrea height = CVPixelBufferGetHeight(pixelBuffer); width = CVPixelBufferGetWidth(pixelBuffer);
- for (out = pbDstStream, i = 0; i < height; i++) + for (i = 1; i <= height; i++) { int j; + LPBYTE out = pbDstStream + ((height - i) * width * 3); + for (j = 0; j < width; j++) { *((DWORD*)out) = (((ARGBPixelPtr)pPixels)[j].r) << 16 diff --git a/dlls/wineqtdecoder/qtvdecoder.c b/dlls/wineqtdecoder/qtvdecoder.c index 3690087..ceab21e 100644 --- a/dlls/wineqtdecoder/qtvdecoder.c +++ b/dlls/wineqtdecoder/qtvdecoder.c @@ -442,8 +442,6 @@ static HRESULT WINAPI QTVDecoder_SetMediaType(TransformFilter *tf, PIN_DIRECTION bmi->biCompression = BI_RGB; bmi->biBitCount = 24; outpmt->subtype = MEDIASUBTYPE_RGB24; - if (bmi->biHeight > 0) - bmi->biHeight = -bmi->biHeight;
return S_OK; }