[xiph-cvs] r6567 - trunk/theora-tools/theora_transcoder

giles at xiph.org giles at xiph.org
Tue May 4 21:24:56 PDT 2004



Author: giles
Date: 2004-04-21 14:34:18 -0400 (Wed, 21 Apr 2004)
New Revision: 6567

Modified:
   trunk/theora-tools/theora_transcoder/avi2vp3.c
   trunk/theora-tools/theora_transcoder/theora_transcoder.c
Log:
Import the 0.2 source tarball of Jan's theora-tools package.

<p>Modified: trunk/theora-tools/theora_transcoder/avi2vp3.c
===================================================================
--- trunk/theora-tools/theora_transcoder/avi2vp3.c	2004-04-21 18:28:18 UTC (rev 6566)
+++ trunk/theora-tools/theora_transcoder/avi2vp3.c	2004-04-21 18:34:18 UTC (rev 6567)
@@ -1,10 +1,11 @@
 #include <stdio.h>
 #include <stdlib.h>
-#ifdef WIN32
+#ifdef _WIN32
 #include <windows.h>
+#else
+typedef long DWORD;
 #endif
 
-
 /*extremely crude app to dump vp3 frames from an avi file*/
 /*filenames are hardcoded*/
 
@@ -12,8 +13,9 @@
 
 int main(int argc, const char **argv)
 {
+
     FILE * f = fopen("outfile.vp3", "wb");
-
+    
     char * buffer = malloc(32768);
     int olength;
     int length;
@@ -23,6 +25,7 @@
     int keyframegap = 0;
     int maxkeyframegap = 0;
     
+    DWORD initialticks;
     
     int framew = 0;
     int frameh = 0;

Modified: trunk/theora-tools/theora_transcoder/theora_transcoder.c
===================================================================
--- trunk/theora-tools/theora_transcoder/theora_transcoder.c	2004-04-21 18:28:18 UTC (rev 6566)
+++ trunk/theora-tools/theora_transcoder/theora_transcoder.c	2004-04-21 18:34:18 UTC (rev 6567)
@@ -5,14 +5,14 @@
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2003                *
+ * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2004                *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
 
   function: example encoder application; makes an Ogg Theora/Vorbis
             file from YUV4MPEG2 and WAV input
-  last mod: $Id: transcoder_example.c,v 1.2 2003/10/28 18:18:42 mauricio Exp $
+  last mod: $Id: transcoder_example.c,v 1.3 2004/03/19 23:49:12 giles Exp $
 
  ********************************************************************/
 
@@ -29,9 +29,9 @@
 #include <getopt.h>
 #include <time.h>
 #include <math.h>
-#include <theora/theora.h>
-#include <vorbis/codec.h>
-#include <vorbis/vorbisenc.h>
+#include "theora/theora.h"
+#include "vorbis/codec.h"
+#include "vorbis/vorbisenc.h"
 
 #ifdef _WIN32
 /*supply missing headers and functions to Win32. going to hell, I know*/
@@ -418,6 +418,8 @@
     oggpackB_adv1(&ttc->opb_in);
     /*Copy Q multiplier.*/
     oggpackB_write(&ttc->opb_out,oggpackB_read(&ttc->opb_in,6),6);
+    /*VP3 has no per-block Q multipliers*/
+    oggpackB_write(&ttc->opb_out,0,1);
     /*If the frame is a base/key/golden frame, copy a few extra bits.*/
     if(frame_type==0){
       /*These 13 bits are not included in a Theora frame header.
@@ -882,7 +884,7 @@
           akbps=rint(audio_bytesout*8./timebase*.001);
         
         fprintf(stderr,
-                "\r      %d:%02d:%02d.%02d audio: %dkbps video: %dkbps                 ",
+                "\n      %d:%02d:%02d.%02d audio: %dkbps video: %dkbps                 ",
                 hours,minutes,seconds,hundredths,akbps,vkbps);
       }
     }

--- >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