[xiph-cvs] cvs commit: theora/win32/experimental/transcoder transcoder_example.c
Mauricio Piacentini
mauricio at xiph.org
Tue Oct 28 10:18:43 PST 2003
mauricio 03/10/28 13:18:43
Modified: win32/experimental/transcoder transcoder_example.c
Log:
fixes to generate a correct granulepos value in the transcoded stream. Previously the value was not being initalized correcty: we may need to document that a corrected granulepos_shift value is only available after the client calls theora_encode_init AND at least one frame is compressed. The transcoder of course bypasses the second part, as it grabs already compressed data from a vp3 stream.
Revision Changes Path
1.2 +5 -4 theora/win32/experimental/transcoder/transcoder_example.c
Index: transcoder_example.c
===================================================================
RCS file: /usr/local/cvsroot/theora/win32/experimental/transcoder/transcoder_example.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- transcoder_example.c 26 Sep 2003 15:11:47 -0000 1.1
+++ transcoder_example.c 28 Oct 2003 18:18:42 -0000 1.2
@@ -12,7 +12,7 @@
function: example encoder application; makes an Ogg Theora/Vorbis
file from YUV4MPEG2 and WAV input
- last mod: $Id: transcoder_example.c,v 1.1 2003/09/26 15:11:47 tterribe Exp $
+ last mod: $Id: transcoder_example.c,v 1.2 2003/10/28 18:18:42 mauricio Exp $
********************************************************************/
@@ -457,12 +457,13 @@
int theora_transcoder_init(theora_info * ti, TC_INSTANCE * ttc){
memset(ttc, 0, sizeof(*ttc));
+ ttc->granulepos = -1;
ttc->keyframe_granule_shift=_ilog(ti->keyframe_frequency_force-1);
ttc->LastKeyFrame = 0;
ttc->KeyFrameCount = 0;
ttc->ThisIsFirstFrame = 1;
ttc->ThisIsKeyFrame = 0;
- ttc->CurrentFrame = 1; /* or 0?*/
+ ttc->CurrentFrame = 1;
ttc->in_bytes = 0;
ttc->in_bytecount = 0;
ttc->fps_denominator = ti->fps_denominator;
@@ -725,8 +726,8 @@
ti.dropframes_p=0;
ti.quick_p=1;
ti.keyframe_auto_p=1;
- ti.keyframe_frequency=64;
- ti.keyframe_frequency_force=64;
+ ti.keyframe_frequency=32768;
+ ti.keyframe_frequency_force=32768;
ti.keyframe_data_target_bitrate=video_r*1.5;
ti.keyframe_auto_threshold=80;
ti.keyframe_mindistance=8;
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list