[xiph-commits] r14372 - in trunk/theora: . lib/dec lib/enc
giles at svn.xiph.org
giles at svn.xiph.org
Sat Jan 5 15:52:41 PST 2008
Author: giles
Date: 2008-01-05 15:52:28 -0800 (Sat, 05 Jan 2008)
New Revision: 14372
Modified:
trunk/theora/AUTHORS
trunk/theora/CHANGES
trunk/theora/lib/dec/decinfo.c
trunk/theora/lib/enc/codec_internal.h
trunk/theora/lib/enc/encapiwrapper.c
trunk/theora/lib/enc/encoder_toplevel.c
trunk/theora/lib/enc/pb.c
Log:
Remove the optional libogg2 support.
This library was never released and now looks like it needs to be
redesigned. The support for building against it was never ported
to the new decoder, so it hasn't worked for some time.
Modified: trunk/theora/AUTHORS
===================================================================
--- trunk/theora/AUTHORS 2008-01-05 23:36:42 UTC (rev 14371)
+++ trunk/theora/AUTHORS 2008-01-05 23:52:28 UTC (rev 14372)
@@ -22,9 +22,6 @@
- Original win32 projects and example ports
- VP3->Theora transcoder
-Arc Riley
- - libogg2 porting.
-
Silvia Pfeiffer
- Figures for the spec
@@ -37,8 +34,9 @@
Adam Moss
Colin Ward
Jeremy C. Reed
+Arc Riley
Rodolphe Ortalo
- Bug fixes
-and other xiph.org contributors
+and other Xiph.org contributors
Modified: trunk/theora/CHANGES
===================================================================
--- trunk/theora/CHANGES 2008-01-05 23:36:42 UTC (rev 14371)
+++ trunk/theora/CHANGES 2008-01-05 23:52:28 UTC (rev 14372)
@@ -9,6 +9,7 @@
- Fix a problem with decoder quantizer initialization
- Fix a page queue problem with png2theora.
- Dropped build support for Microsoft VS2003.
+ - Dropped build support for the unreleased libogg2.
- Added the specification to the autotools build.
- Specification corrections.
Modified: trunk/theora/lib/dec/decinfo.c
===================================================================
--- trunk/theora/lib/dec/decinfo.c 2008-01-05 23:36:42 UTC (rev 14371)
+++ trunk/theora/lib/dec/decinfo.c 2008-01-05 23:52:28 UTC (rev 14372)
@@ -222,7 +222,6 @@
if(_info==NULL)return TH_EFAULT;
theorapackB_readinit(&opb,_op->packet,_op->bytes);
ret=oc_dec_headerin(&opb,_info,_tc,_setup,_op);
- /*TODO: Clear opb in libogg2.*/
return ret;
}
Modified: trunk/theora/lib/enc/codec_internal.h
===================================================================
--- trunk/theora/lib/enc/codec_internal.h 2008-01-05 23:36:42 UTC (rev 14371)
+++ trunk/theora/lib/enc/codec_internal.h 2008-01-05 23:52:28 UTC (rev 14372)
@@ -26,11 +26,7 @@
#include "encoder_huffman.h"
#include "dsp.h"
-#ifndef LIBOGG2
#define theora_read(x,y,z) ( *z = oggpackB_read(x,y) )
-#else
-#define theora_read(x,y,z) ( oggpackB_read(x,y,z) )
-#endif
#define CURRENT_ENCODE_VERSION 1
#define HUGE_ERROR (1<<28) /* Out of range test value */
@@ -713,9 +709,6 @@
/* ogg bitpacker for use in packet coding, other API state */
oggpack_buffer *oggbuffer;
-#ifdef LIBOGG2 /* Remember, this is just until we drop libogg1 */
- ogg_buffer_state *oggbufferstate;
-#endif
int readyflag;
int packetflag;
int doneflag;
Modified: trunk/theora/lib/enc/encapiwrapper.c
===================================================================
--- trunk/theora/lib/enc/encapiwrapper.c 2008-01-05 23:36:42 UTC (rev 14371)
+++ trunk/theora/lib/enc/encapiwrapper.c 2008-01-05 23:52:28 UTC (rev 14372)
@@ -69,10 +69,9 @@
case -2:{
if(_comments==NULL)return OC_FAULT;
theora_encode_comment((theora_comment *)_comments,_op);
-#ifndef LIBOGG2
/*The old API does not require a theora_state struct when writing the
comment header, so it can't use its internal buffer and relies on the
- application to free it when using libogg 1.
+ application to free it.
The old documentation is wrong on this subject, and this breaks on
Windows when linking against multiple versions of libc (which is
almost always done when, e.g., using DLLs built with mingw32).
@@ -84,7 +83,6 @@
oggpackB_writecopy(cpi->oggbuffer,_op->packet,_op->bytes*8);
_ogg_free(_op->packet);
_op->packet=oggpackB_get_buffer(cpi->oggbuffer);
-#endif
return -cpi->doneflag++;
}break;
case -1:{
Modified: trunk/theora/lib/enc/encoder_toplevel.c
===================================================================
--- trunk/theora/lib/enc/encoder_toplevel.c 2008-01-05 23:36:42 UTC (rev 14371)
+++ trunk/theora/lib/enc/encoder_toplevel.c 2008-01-05 23:52:28 UTC (rev 14372)
@@ -432,11 +432,8 @@
cpi->pb.InvLastInterDC = 0;
/* Initialise bit packing mechanism. */
-#ifndef LIBOGG2
oggpackB_reset(cpi->oggbuffer);
-#else
- oggpackB_writeinit(cpi->oggbuffer, cpi->oggbufferstate);
-#endif
+
/* mark as video frame */
oggpackB_write(cpi->oggbuffer,0,1);
@@ -981,14 +978,8 @@
cpi->QTargetModifier[i] = 1.0;
/* Set up an encode buffer */
-#ifndef LIBOGG2
cpi->oggbuffer = _ogg_malloc(sizeof(oggpack_buffer));
oggpackB_writeinit(cpi->oggbuffer);
-#else
- cpi->oggbuffer = _ogg_malloc(oggpack_buffersize());
- cpi->oggbufferstate = ogg_buffer_create();
- oggpackB_writeinit(cpi->oggbuffer, cpi->oggbufferstate);
-#endif
/* Set data rate related variables. */
cpi->Configuration.TargetBandwidth = (c->target_bitrate) / 8;
@@ -1155,11 +1146,7 @@
if(!cpi->packetflag)return(0);
if(cpi->doneflag>0)return(-1);
-#ifndef LIBOGG2
op->packet=oggpackB_get_buffer(cpi->oggbuffer);
-#else
- op->packet=oggpackB_writebuffer(cpi->oggbuffer);
-#endif
op->bytes=bytes;
op->b_o_s=0;
op->e_o_s=last_p;
@@ -1194,11 +1181,7 @@
CP_INSTANCE *cpi=(CP_INSTANCE *)(t->internal_encode);
int offset_y;
-#ifndef LIBOGG2
oggpackB_reset(cpi->oggbuffer);
-#else
- oggpackB_writeinit(cpi->oggbuffer, cpi->oggbufferstate);
-#endif
oggpackB_write(cpi->oggbuffer,0x80,8);
_tp_writebuffer(cpi->oggbuffer, "theora", 6);
@@ -1233,11 +1216,7 @@
oggpackB_write(cpi->oggbuffer,0,3); /* spare config bits */
-#ifndef LIBOGG2
op->packet=oggpackB_get_buffer(cpi->oggbuffer);
-#else
- op->packet=oggpackB_writebuffer(cpi->oggbuffer);
-#endif
op->bytes=oggpackB_bytes(cpi->oggbuffer);
op->b_o_s=1;
@@ -1258,13 +1237,8 @@
const int vendor_length = strlen(vendor);
oggpack_buffer *opb;
-#ifndef LIBOGG2
opb = _ogg_malloc(sizeof(oggpack_buffer));
oggpackB_writeinit(opb);
-#else
- opb = _ogg_malloc(oggpack_buffersize());
- oggpackB_writeinit(opb, ogg_buffer_create());
-#endif
oggpackB_write(opb, 0x81, 8);
_tp_writebuffer(opb, "theora", 6);
@@ -1285,16 +1259,10 @@
}
op->bytes=oggpack_bytes(opb);
-#ifndef LIBOGG2
/* So we're expecting the application will free this? */
op->packet=_ogg_malloc(oggpack_bytes(opb));
memcpy(op->packet, oggpack_get_buffer(opb), oggpack_bytes(opb));
oggpack_writeclear(opb);
-#else
- op->packet = oggpack_writebuffer(opb);
- /* When the application puts op->packet into a stream_state object,
- it becomes the property of libogg2's internal memory management. */
-#endif
_ogg_free(opb);
@@ -1312,22 +1280,14 @@
int theora_encode_tables(theora_state *t, ogg_packet *op){
CP_INSTANCE *cpi=(CP_INSTANCE *)(t->internal_encode);
-#ifndef LIBOGG2
oggpackB_reset(cpi->oggbuffer);
-#else
- oggpackB_writeinit(cpi->oggbuffer, cpi->oggbufferstate);
-#endif
oggpackB_write(cpi->oggbuffer,0x82,8);
_tp_writebuffer(cpi->oggbuffer,"theora",6);
WriteQTables(&cpi->pb,cpi->oggbuffer);
WriteHuffmanTrees(cpi->pb.HuffRoot_VP3x,cpi->oggbuffer);
-#ifndef LIBOGG2
op->packet=oggpackB_get_buffer(cpi->oggbuffer);
-#else
- op->packet=oggpackB_writebuffer(cpi->oggbuffer);
-#endif
op->bytes=oggpackB_bytes(cpi->oggbuffer);
op->b_o_s=0;
Modified: trunk/theora/lib/enc/pb.c
===================================================================
--- trunk/theora/lib/enc/pb.c 2008-01-05 23:36:42 UTC (rev 14371)
+++ trunk/theora/lib/enc/pb.c 2008-01-05 23:52:28 UTC (rev 14372)
@@ -74,11 +74,7 @@
InitTmpBuffers(pbi);
/* allocate memory for the oggpack_buffer */
-#ifndef LIBOGG2
pbi->opb = _ogg_malloc(sizeof(oggpack_buffer));
-#else
- pbi->opb = _ogg_malloc(oggpack_buffersize());
-#endif
/* variables needing initialization (not being set to 0) */
More information about the commits
mailing list