[xiph-commits] r10301 - branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder

illiminable at svn.xiph.org illiminable at svn.xiph.org
Tue Oct 25 03:29:04 PDT 2005


Author: illiminable
Date: 2005-10-25 03:28:59 -0700 (Tue, 25 Oct 2005)
New Revision: 10301

Modified:
   branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
   branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h
Log:
* Get rid of some dead code in theora decoder

Modified: branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp	2005-10-24 22:44:25 UTC (rev 10300)
+++ branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp	2005-10-25 10:28:59 UTC (rev 10301)
@@ -340,9 +340,7 @@
 }
 HRESULT TheoraDecodeFilter::Transform(IMediaSample* inInputSample, IMediaSample* outOutputSample) {
 
-	//CAutoLock locLock(mStreamLock);
-	//debugLog<<endl<<"Transform "<<endl;
-	//debugLog<<"outOutputSample Size = "<<outOutputSample->
+
 	HRESULT locHR;
 	BYTE* locBuff = NULL;
 	//Get a source poitner into the input buffer
@@ -420,11 +418,7 @@
 
 int TheoraDecodeFilter::TheoraDecoded (yuv_buffer* inYUVBuffer, IMediaSample* outSample, bool inIsKeyFrame) 
 {
-	//debugLog<<"TheoraDecoded... #################### "<<endl;
-	
-		
 	if (!mBegun) {
-		//debugLog<<"First time..."<<endl;
 		mBegun = true;
 		
 		//How many UNITS does one frame take.
@@ -432,31 +426,10 @@
 
 		mFrameSize = (mHeight * mWidth * 3) / 2;
 		mFrameCount = 0;
-		//debugLog<<"Frame Durn = "<<mFrameDuration<<endl;
-		//debugLog<<"FrameSize = "<<mFrameSize<<endl;
-		
-		
 	}
 
 
-	////TO DO::: Fix this up... needs to move around order and some only needs to be done once, move it into the block aboce and use member data
 
-
-	//-----------------------
-	//OLD CODE... FIXXX:::
-	//Timestamp hacks start here...
-			//unsigned long locMod = (unsigned long)pow(2, mTheoraFormatInfo->maxKeyframeInterval);
-			//unsigned long locInterFrameNo = (mLastSeenStartGranPos) % locMod;
-			//LONGLONG locAbsFramePos = ((mLastSeenStartGranPos >> mTheoraFormatInfo->maxKeyframeInterval)) + locInterFrameNo;
-			//REFERENCE_TIME locTimeBase = (locAbsFramePos * mFrameDuration) - mSeekTimeBase;
-			//REFERENCE_TIME locFrameStart = locTimeBase + (mFrameCount * mFrameDuration);
-			////Increment the frame counter
-			//mFrameCount++;
-			////Make the end frame counter
-			//REFERENCE_TIME locFrameEnd = locTimeBase + (mFrameCount * mFrameDuration);
-	//------------------------
-
-
 	REFERENCE_TIME locFrameStart = (mFrameCount * mFrameDuration);
 	mFrameCount++;
 	REFERENCE_TIME locFrameEnd = (mFrameCount * mFrameDuration);
@@ -464,56 +437,15 @@
 	
 	debugLog<<"Sample times = "<<locFrameStart<<" to "<<locFrameEnd<<"  frame "<<mFrameCount<<" KF = "<<((inIsKeyFrame) ? "YES" : "NO")<<endl;
 	
-	//FILTER_STATE locFS;
-	//GetState(0, &locFS);
-	//debugLog<<"State Before = "<<locFS<<endl;
-	//HRESULT locHR = mOutputPin->GetDeliveryBuffer(&locSample, &locFrameStart, &locFrameEnd, locFlags);
-	//GetState(0, &locFS);
-	//debugLog<<"State After = "<<locFS<<endl;
-	
-	
 
-	//Debuggin code
-	AM_MEDIA_TYPE* locMediaType = NULL;
-	outSample->GetMediaType(&locMediaType);
-	if (locMediaType == NULL) {
-		//debugLog<<"No dynamic change..."<<endl;
-	} else {
-		//debugLog<<"Attempting dynamic change..."<<endl;
-		if (locMediaType->majortype == MEDIATYPE_Video) {
-			//debugLog<<"Still MEDIATYPE_Video"<<endl;
-		}
 
-		if (locMediaType->subtype == MEDIASUBTYPE_YV12) {
-			//debugLog<<"Still MEDIASUBTYPE_YV12"<<endl;
-		}
-
-		if (locMediaType->formattype == FORMAT_VideoInfo) {
-			//debugLog<<"Still FORMAT_VideoInfo"<<endl;
-			VIDEOINFOHEADER* locVF = (VIDEOINFOHEADER*)locMediaType->pbFormat;
-			//debugLog<<"Size = "<<locVF->bmiHeader.biSizeImage<<endl;
-			//debugLog<<"Dim   = "<<locVF->bmiHeader.biWidth<<" x " <<locVF->bmiHeader.biHeight<<endl;
-		}
-
-		//debugLog<<"Major  : "<<DSStringer::GUID2String(&locMediaType->majortype);
-		//debugLog<<"Minor  : "<<DSStringer::GUID2String(&locMediaType->subtype);
-		//debugLog<<"Format : "<<DSStringer::GUID2String(&locMediaType->formattype);
-		//debugLog<<"Form Sz: "<<locMediaType->cbFormat;
-
-
-	}
-	//
-
 	////Create pointers for the samples buffer to be assigned to
 	BYTE* locBuffer = NULL;
 	
 	//
 	////Make our pointers set to point to the samples buffer
 	outSample->GetPointer(&locBuffer);
-	
-	
 
-
 	//Fill the buffer with yuv data...
 	//	
 

Modified: branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h	2005-10-24 22:44:25 UTC (rev 10300)
+++ branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h	2005-10-25 10:28:59 UTC (rev 10301)
@@ -86,6 +86,7 @@
 	bool mBegun;
 	TheoraDecoder* mTheoraDecoder;
 	
+	vector<StampedOggPacket*> mBufferedPackets;
 
 	int TheoraDecoded (yuv_buffer* inYUVBuffer, IMediaSample* outSample, bool inIsKeyFrame);
 



More information about the commits mailing list