[xiph-commits] r15447 - trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder

cristianadam at svn.xiph.org cristianadam at svn.xiph.org
Thu Oct 23 15:09:26 PDT 2008


Author: cristianadam
Date: 2008-10-23 15:09:25 -0700 (Thu, 23 Oct 2008)
New Revision: 15447

Modified:
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
Log:
Fixed #1430: Color bleeding on some (newer) ogg theora files

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp	2008-10-23 03:29:26 UTC (rev 15446)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp	2008-10-23 22:09:25 UTC (rev 15447)
@@ -91,26 +91,26 @@
 	mCurrentOutputSubType = MEDIASUBTYPE_None;
 	sOutputVideoParams locVideoParams;
 
-	//YV12 media type
 	CMediaType* locAcceptMediaType = NULL;
+
+	//YUY2 Media Type
 	locAcceptMediaType = new CMediaType(&MEDIATYPE_Video);		//Deleted in pin destructor
-	locAcceptMediaType->subtype = MEDIASUBTYPE_YV12;
+	locAcceptMediaType->subtype = MEDIASUBTYPE_YUY2;
 	locAcceptMediaType->formattype = FORMAT_VideoInfo2;
 	mOutputMediaTypes.push_back(locAcceptMediaType);
 
-	locVideoParams.bitsPerPixel = 12;
-	locVideoParams.fourCC = MAKEFOURCC('Y','V','1','2');
+	locVideoParams.bitsPerPixel = 16;
+	locVideoParams.fourCC = MAKEFOURCC('Y','U','Y','2');
 	mOutputVideoParams.push_back(locVideoParams);
 
-
-	//YUY2 Media Type
+	//YV12 media type
 	locAcceptMediaType = new CMediaType(&MEDIATYPE_Video);		//Deleted in pin destructor
-	locAcceptMediaType->subtype = MEDIASUBTYPE_YUY2;
+	locAcceptMediaType->subtype = MEDIASUBTYPE_YV12;
 	locAcceptMediaType->formattype = FORMAT_VideoInfo2;
 	mOutputMediaTypes.push_back(locAcceptMediaType);
 
-	locVideoParams.bitsPerPixel = 16;
-	locVideoParams.fourCC = MAKEFOURCC('Y','U','Y','2');
+	locVideoParams.bitsPerPixel = 12;
+	locVideoParams.fourCC = MAKEFOURCC('Y','V','1','2');
 	mOutputVideoParams.push_back(locVideoParams);
 
     /*
@@ -827,7 +827,7 @@
 	locSourceUptoPtr = inYUVBuffer->v;
 
 	//Skip the top padding
-	locSourceUptoPtr += ((mYOffset/2) * locYStride);
+	locSourceUptoPtr += ((mYOffset/2) * locUVStride);
 
 	for (unsigned long line = 0; line < mPictureHeight / 2; line++) {
 		//Ignore the x offset and copy mPictureWidth/2 bytes to the destination
@@ -853,7 +853,7 @@
 	locSourceUptoPtr = inYUVBuffer->u;
 
 	//Skip the top padding
-	locSourceUptoPtr += ((mYOffset/2) * locYStride);
+	locSourceUptoPtr += ((mYOffset/2) * locUVStride);
 
 	for (unsigned long line = 0; line < mPictureHeight / 2; line++) {
 		memcpy((void*)(locDestUptoPtr), (const void*)(locSourceUptoPtr + (mXOffset / 2)), mPictureWidth / 2);



More information about the commits mailing list