wineqtdecoder: Do not invert height.

oldstable
Aric Stewart 2012-01-16 14:14:07 -06:00 committed by Alexandre Julliard
parent a6b6c0ebe5
commit 9aa3c74503
3 changed files with 6 additions and 6 deletions

View File

@ -767,12 +767,13 @@ static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk)
pvi = (VIDEOINFOHEADER *)amt.pbFormat; pvi = (VIDEOINFOHEADER *)amt.pbFormat;
pvi->bmiHeader.biSize = sizeof (BITMAPINFOHEADER); pvi->bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
pvi->bmiHeader.biWidth = outputWidth; pvi->bmiHeader.biWidth = outputWidth;
pvi->bmiHeader.biHeight = -outputHeight; pvi->bmiHeader.biHeight = outputHeight;
pvi->bmiHeader.biPlanes = 1; pvi->bmiHeader.biPlanes = 1;
pvi->bmiHeader.biBitCount = 24; pvi->bmiHeader.biBitCount = 24;
pvi->bmiHeader.biCompression = BI_RGB; pvi->bmiHeader.biCompression = BI_RGB;
pvi->bmiHeader.biSizeImage = outputWidth * outputHeight * outputDepth;
filter->outputSize = outputWidth * outputHeight * outputDepth; filter->outputSize = pvi->bmiHeader.biSizeImage;
amt.lSampleSize = 0; amt.lSampleSize = 0;
pixelBufferOptions = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); pixelBufferOptions = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);

View File

@ -126,7 +126,6 @@ typedef struct {
HRESULT AccessPixelBufferPixels( CVPixelBufferRef pixelBuffer, LPBYTE pbDstStream) HRESULT AccessPixelBufferPixels( CVPixelBufferRef pixelBuffer, LPBYTE pbDstStream)
{ {
LPBYTE pPixels = NULL; LPBYTE pPixels = NULL;
LPBYTE out = NULL;
size_t bytesPerRow = 0, height = 0, width = 0; size_t bytesPerRow = 0, height = 0, width = 0;
OSType actualType; OSType actualType;
int i; int i;
@ -143,9 +142,11 @@ HRESULT AccessPixelBufferPixels( CVPixelBufferRef pixelBuffer, LPBYTE pbDstStrea
height = CVPixelBufferGetHeight(pixelBuffer); height = CVPixelBufferGetHeight(pixelBuffer);
width = CVPixelBufferGetWidth(pixelBuffer); width = CVPixelBufferGetWidth(pixelBuffer);
for (out = pbDstStream, i = 0; i < height; i++) for (i = 1; i <= height; i++)
{ {
int j; int j;
LPBYTE out = pbDstStream + ((height - i) * width * 3);
for (j = 0; j < width; j++) for (j = 0; j < width; j++)
{ {
*((DWORD*)out) = (((ARGBPixelPtr)pPixels)[j].r) << 16 *((DWORD*)out) = (((ARGBPixelPtr)pPixels)[j].r) << 16

View File

@ -442,8 +442,6 @@ static HRESULT WINAPI QTVDecoder_SetMediaType(TransformFilter *tf, PIN_DIRECTION
bmi->biCompression = BI_RGB; bmi->biCompression = BI_RGB;
bmi->biBitCount = 24; bmi->biBitCount = 24;
outpmt->subtype = MEDIASUBTYPE_RGB24; outpmt->subtype = MEDIASUBTYPE_RGB24;
if (bmi->biHeight > 0)
bmi->biHeight = -bmi->biHeight;
return S_OK; return S_OK;
} }