gecko/media/libtheora/lib/decinfo.c

247 lines
8.1 KiB
C
Raw Normal View History

2008-07-29 23:38:23 -07:00
/********************************************************************
* *
* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
2008-07-29 23:38:23 -07:00
* *
********************************************************************
function:
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
last mod: $Id: decinfo.c 16503 2009-08-22 18:14:02Z giles $
2008-07-29 23:38:23 -07:00
********************************************************************/
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "decint.h"
/*Unpacks a series of octets from a given byte array into the pack buffer.
No checking is done to ensure the buffer contains enough data.
_opb: The pack buffer to read the octets from.
_buf: The byte array to store the unpacked bytes in.
_len: The number of octets to unpack.*/
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
static void oc_unpack_octets(oc_pack_buf *_opb,char *_buf,size_t _len){
2008-07-29 23:38:23 -07:00
while(_len-->0){
long val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,8);
2008-07-29 23:38:23 -07:00
*_buf++=(char)val;
}
}
/*Unpacks a 32-bit integer encoded by octets in little-endian form.*/
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
static long oc_unpack_length(oc_pack_buf *_opb){
2008-07-29 23:38:23 -07:00
long ret[4];
int i;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
for(i=0;i<4;i++)ret[i]=oc_pack_read(_opb,8);
2008-07-29 23:38:23 -07:00
return ret[0]|ret[1]<<8|ret[2]<<16|ret[3]<<24;
}
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
static int oc_info_unpack(oc_pack_buf *_opb,th_info *_info){
2008-07-29 23:38:23 -07:00
long val;
/*Check the codec bitstream version.*/
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,8);
2008-07-29 23:38:23 -07:00
_info->version_major=(unsigned char)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,8);
2008-07-29 23:38:23 -07:00
_info->version_minor=(unsigned char)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,8);
2008-07-29 23:38:23 -07:00
_info->version_subminor=(unsigned char)val;
/*verify we can parse this bitstream version.
We accept earlier minors and all subminors, by spec*/
if(_info->version_major>TH_VERSION_MAJOR||
_info->version_major==TH_VERSION_MAJOR&&
_info->version_minor>TH_VERSION_MINOR){
return TH_EVERSION;
}
/*Read the encoded frame description.*/
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,16);
2008-07-29 23:38:23 -07:00
_info->frame_width=(ogg_uint32_t)val<<4;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,16);
2008-07-29 23:38:23 -07:00
_info->frame_height=(ogg_uint32_t)val<<4;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,24);
2008-07-29 23:38:23 -07:00
_info->pic_width=(ogg_uint32_t)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,24);
2008-07-29 23:38:23 -07:00
_info->pic_height=(ogg_uint32_t)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,8);
2008-07-29 23:38:23 -07:00
_info->pic_x=(ogg_uint32_t)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,8);
_info->pic_y=(ogg_uint32_t)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,32);
2008-07-29 23:38:23 -07:00
_info->fps_numerator=(ogg_uint32_t)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,32);
2008-07-29 23:38:23 -07:00
_info->fps_denominator=(ogg_uint32_t)val;
if(_info->frame_width==0||_info->frame_height==0||
_info->pic_width+_info->pic_x>_info->frame_width||
_info->pic_height+_info->pic_y>_info->frame_height||
_info->fps_numerator==0||_info->fps_denominator==0){
return TH_EBADHEADER;
}
/*Note: The sense of pic_y is inverted in what we pass back to the
application compared to how it is stored in the bitstream.
This is because the bitstream uses a right-handed coordinate system, while
applications expect a left-handed one.*/
_info->pic_y=_info->frame_height-_info->pic_height-_info->pic_y;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,24);
2008-07-29 23:38:23 -07:00
_info->aspect_numerator=(ogg_uint32_t)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,24);
2008-07-29 23:38:23 -07:00
_info->aspect_denominator=(ogg_uint32_t)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,8);
2008-07-29 23:38:23 -07:00
_info->colorspace=(th_colorspace)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,24);
2008-07-29 23:38:23 -07:00
_info->target_bitrate=(int)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,6);
2008-07-29 23:38:23 -07:00
_info->quality=(int)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,5);
2008-07-29 23:38:23 -07:00
_info->keyframe_granule_shift=(int)val;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,2);
2008-07-29 23:38:23 -07:00
_info->pixel_fmt=(th_pixel_fmt)val;
if(_info->pixel_fmt==TH_PF_RSVD)return TH_EBADHEADER;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,3);
if(val!=0||oc_pack_bytes_left(_opb)<0)return TH_EBADHEADER;
2008-07-29 23:38:23 -07:00
return 0;
}
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
static int oc_comment_unpack(oc_pack_buf *_opb,th_comment *_tc){
2008-07-29 23:38:23 -07:00
long len;
int i;
/*Read the vendor string.*/
len=oc_unpack_length(_opb);
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
if(len<0||len>oc_pack_bytes_left(_opb))return TH_EBADHEADER;
2008-07-29 23:38:23 -07:00
_tc->vendor=_ogg_malloc((size_t)len+1);
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
if(_tc->vendor==NULL)return TH_EFAULT;
2008-07-29 23:38:23 -07:00
oc_unpack_octets(_opb,_tc->vendor,len);
_tc->vendor[len]='\0';
/*Read the user comments.*/
_tc->comments=(int)oc_unpack_length(_opb);
2009-06-18 20:12:54 -07:00
len=_tc->comments;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
if(len<0||len>(LONG_MAX>>2)||len<<2>oc_pack_bytes_left(_opb)){
2009-06-18 20:12:54 -07:00
_tc->comments=0;
2008-07-29 23:38:23 -07:00
return TH_EBADHEADER;
}
_tc->comment_lengths=(int *)_ogg_malloc(
_tc->comments*sizeof(_tc->comment_lengths[0]));
_tc->user_comments=(char **)_ogg_malloc(
_tc->comments*sizeof(_tc->user_comments[0]));
for(i=0;i<_tc->comments;i++){
len=oc_unpack_length(_opb);
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
if(len<0||len>oc_pack_bytes_left(_opb)){
2008-07-29 23:38:23 -07:00
_tc->comments=i;
return TH_EBADHEADER;
}
_tc->comment_lengths[i]=len;
_tc->user_comments[i]=_ogg_malloc((size_t)len+1);
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
if(_tc->user_comments[i]==NULL){
_tc->comments=i;
return TH_EFAULT;
}
2008-07-29 23:38:23 -07:00
oc_unpack_octets(_opb,_tc->user_comments[i],len);
_tc->user_comments[i][len]='\0';
}
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
return oc_pack_bytes_left(_opb)<0?TH_EBADHEADER:0;
2008-07-29 23:38:23 -07:00
}
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
static int oc_setup_unpack(oc_pack_buf *_opb,th_setup_info *_setup){
2008-07-29 23:38:23 -07:00
int ret;
/*Read the quantizer tables.*/
ret=oc_quant_params_unpack(_opb,&_setup->qinfo);
if(ret<0)return ret;
/*Read the Huffman trees.*/
return oc_huff_trees_unpack(_opb,_setup->huff_tables);
}
static void oc_setup_clear(th_setup_info *_setup){
oc_quant_params_clear(&_setup->qinfo);
oc_huff_trees_clear(_setup->huff_tables);
}
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
static int oc_dec_headerin(oc_pack_buf *_opb,th_info *_info,
2008-07-29 23:38:23 -07:00
th_comment *_tc,th_setup_info **_setup,ogg_packet *_op){
char buffer[6];
long val;
int packtype;
int ret;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
val=oc_pack_read(_opb,8);
2008-07-29 23:38:23 -07:00
packtype=(int)val;
/*If we're at a data packet and we have received all three headers, we're
done.*/
if(!(packtype&0x80)&&_info->frame_width>0&&_tc->vendor!=NULL&&*_setup!=NULL){
return 0;
}
/*Check the codec string.*/
oc_unpack_octets(_opb,buffer,6);
if(memcmp(buffer,"theora",6)!=0)return TH_ENOTFORMAT;
switch(packtype){
/*Codec info header.*/
case 0x80:{
/*This should be the first packet, and we should not already be
initialized.*/
if(!_op->b_o_s||_info->frame_width>0)return TH_EBADHEADER;
ret=oc_info_unpack(_opb,_info);
if(ret<0)th_info_clear(_info);
else ret=3;
}break;
/*Comment header.*/
case 0x81:{
if(_tc==NULL)return TH_EFAULT;
/*We shoud have already decoded the info header, and should not yet have
decoded the comment header.*/
if(_info->frame_width==0||_tc->vendor!=NULL)return TH_EBADHEADER;
ret=oc_comment_unpack(_opb,_tc);
if(ret<0)th_comment_clear(_tc);
else ret=2;
}break;
/*Codec setup header.*/
case 0x82:{
oc_setup_info *setup;
if(_tc==NULL||_setup==NULL)return TH_EFAULT;
/*We should have already decoded the info header and the comment header,
and should not yet have decoded the setup header.*/
if(_info->frame_width==0||_tc->vendor==NULL||*_setup!=NULL){
return TH_EBADHEADER;
}
setup=(oc_setup_info *)_ogg_calloc(1,sizeof(*setup));
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
if(setup==NULL)return TH_EFAULT;
2008-07-29 23:38:23 -07:00
ret=oc_setup_unpack(_opb,setup);
if(ret<0){
oc_setup_clear(setup);
_ogg_free(setup);
}
else{
*_setup=setup;
ret=1;
}
}break;
default:{
/*We don't know what this header is.*/
return TH_EBADHEADER;
}break;
}
return ret;
}
/*Decodes one header packet.
This should be called repeatedly with the packets at the beginning of the
stream until it returns 0.*/
int th_decode_headerin(th_info *_info,th_comment *_tc,
th_setup_info **_setup,ogg_packet *_op){
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
oc_pack_buf opb;
2008-07-29 23:38:23 -07:00
if(_op==NULL)return TH_EBADHEADER;
if(_info==NULL)return TH_EFAULT;
Bug 507554 - Update in-tree libtheora to 1.1.0 (Thusnelda) plus post-release fixes from SVN. r=chris.double, rs=roc --HG-- rename : media/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/apiwrapper.c rename : media/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/apiwrapper.h rename : media/libtheora/lib/dec/bitpack.c => media/libtheora/lib/bitpack.c rename : media/libtheora/lib/dec/bitpack.h => media/libtheora/lib/bitpack.h rename : media/libtheora/lib/dec/dct.h => media/libtheora/lib/dct.h rename : media/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/decapiwrapper.c rename : media/libtheora/lib/dec/decinfo.c => media/libtheora/lib/decinfo.c rename : media/libtheora/lib/dec/decint.h => media/libtheora/lib/decint.h rename : media/libtheora/lib/dec/decode.c => media/libtheora/lib/decode.c rename : media/libtheora/lib/dec/dequant.c => media/libtheora/lib/dequant.c rename : media/libtheora/lib/dec/dequant.h => media/libtheora/lib/dequant.h rename : media/libtheora/lib/dec/fragment.c => media/libtheora/lib/fragment.c rename : media/libtheora/lib/dec/huffdec.c => media/libtheora/lib/huffdec.c rename : media/libtheora/lib/dec/huffdec.h => media/libtheora/lib/huffdec.h rename : media/libtheora/lib/dec/huffman.h => media/libtheora/lib/huffman.h rename : media/libtheora/lib/dec/idct.c => media/libtheora/lib/idct.c rename : media/libtheora/lib/dec/info.c => media/libtheora/lib/info.c rename : media/libtheora/lib/dec/internal.c => media/libtheora/lib/internal.c rename : media/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/ocintrin.h rename : media/libtheora/lib/dec/quant.c => media/libtheora/lib/quant.c rename : media/libtheora/lib/dec/quant.h => media/libtheora/lib/quant.h rename : media/libtheora/lib/dec/state.c => media/libtheora/lib/state.c rename : media/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/x86/mmxfrag.c rename : media/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/x86/mmxidct.c rename : media/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/x86/mmxstate.c rename : media/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/x86/x86int.h rename : media/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/x86/x86state.c rename : media/libtheora/lib/dec/x86_vc/mmxfrag.c => media/libtheora/lib/x86_vc/mmxfrag.c rename : media/libtheora/lib/dec/x86_vc/mmxidct.c => media/libtheora/lib/x86_vc/mmxidct.c rename : media/libtheora/lib/dec/x86_vc/mmxstate.c => media/libtheora/lib/x86_vc/mmxstate.c rename : media/libtheora/lib/dec/x86_vc/x86int.h => media/libtheora/lib/x86_vc/x86int.h rename : media/libtheora/lib/dec/x86_vc/x86state.c => media/libtheora/lib/x86_vc/x86state.c
2009-09-27 15:14:21 -07:00
oc_pack_readinit(&opb,_op->packet,_op->bytes);
2009-06-18 20:12:54 -07:00
return oc_dec_headerin(&opb,_info,_tc,_setup,_op);
2008-07-29 23:38:23 -07:00
}
void th_setup_free(th_setup_info *_setup){
if(_setup!=NULL){
oc_setup_clear(_setup);
_ogg_free(_setup);
}
}