[xiph-commits] r6951 - in trunk/oggdsf/src/lib/codecs:

illiminable at dactyl.lonelymoon.com illiminable
Fri Jul 2 11:29:12 PDT 2004


theora/filters/dsfTheoraDecoder theora/filters/dsfTheoraEncoder
vorbis/filters/dsfVorbisDecoder
Message-ID: <20040702182912.A188D9AAAD at dactyl.lonelymoon.com>

Author: illiminable
Date: Fri Jul  2 11:29:12 2004
New Revision: 6951

Modified:
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp
trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
Log:
* A few changes trying to fix the no-stop problem with theora... found a bug in the vorbis... and have rectified the occasionally loss of audio after a seek... seek performance in vorbis is back to high performance as before timestamp mangling.

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp	2004-07-02 16:24:34 UTC (rev 6950)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp	2004-07-02 18:29:11 UTC (rev 6951)
@@ -130,7 +130,7 @@
IMediaSample* locSample;
HRESULT locHR = mOutputPin->GetDeliveryBuffer(&locSample, &locFrameStart, &locFrameEnd, NULL);

-	if (FAILED(locHR)) {
+	if (locHR != S_OK) {
//We get here when the application goes into stop mode usually.
return locHR;
}
@@ -217,10 +217,8 @@
//locSample->AddRef();
HRESULT locHR = mOutputPin->mDataQueue->Receive(locSample);						//->DownstreamFilter()->Receive(locSample);
if (locHR != S_OK) {
-
+			return -1;

-		} else {
-
}
}

@@ -238,7 +236,9 @@
StampedOggPacket* locPacket = new StampedOggPacket(inBuf, inNumBytes, true, inStart, inEnd, StampedOggPacket::OGG_END_ONLY);
yuv_buffer* locYUV = mTheoraDecoder->decodeTheora(locPacket);
if (locYUV != NULL) {
-		TheoraDecoded(locYUV);
+		if (TheoraDecoded(locYUV) != 0) {
+			return -1;
+		}
}

return 0;

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp	2004-07-02 16:24:34 UTC (rev 6950)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp	2004-07-02 18:29:11 UTC (rev 6951)
@@ -107,7 +107,7 @@

//Implementation of ITheoraEncodeSEttings
unsigned long TheoraEncodeFilter::targetBitrate() {
-	return ((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->keyframe_data_target_bitrate;
+	return ((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->target_bitrate;
}
unsigned char TheoraEncodeFilter::quality() {
return ((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->quality;
@@ -118,7 +118,8 @@

bool TheoraEncodeFilter::setTargetBitrate(unsigned long inBitrate) {
//Needs error checking
-	((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->keyframe_data_target_bitrate = inBitrate;
+	((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->target_bitrate = inBitrate;
+	((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->keyframe_data_target_bitrate = (inBitrate * 3)/2;
return true;

}
@@ -130,6 +131,7 @@
bool TheoraEncodeFilter::setKeyframeFreq(unsigned long inKeyframeFreq) {
//Needs error checking
((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->keyframe_frequency = inKeyframeFreq;
+	((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->keyframe_frequency_force = inKeyframeFreq;
return true;
}


Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp	2004-07-02 16:24:34 UTC (rev 6950)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp	2004-07-02 18:29:11 UTC (rev 6951)
@@ -134,7 +134,7 @@
HRESULT locHR = locThis->mOutputPin->GetDeliveryBuffer(&locSample, &locFrameStart, &locFrameEnd, NULL);

if (locHR != S_OK) {
-		return locHR;
+		return -1;
}


@@ -182,8 +182,7 @@
//locSample->AddRef();
HRESULT lHR = locThis->mOutputPin->mDataQueue->Receive(locSample);
if (lHR != S_OK) {
-
-			} else {
+				return -1;
}
}




More information about the commits mailing list