media/libtheora/bug703135.patch

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 diff --git a/media/libtheora/lib/huffdec.c b/media/libtheora/lib/huffdec.c
michael@0 2 --- a/media/libtheora/lib/huffdec.c
michael@0 3 +++ b/media/libtheora/lib/huffdec.c
michael@0 4 @@ -320,16 +320,19 @@ static size_t oc_huff_node_size(int _nbi
michael@0 5 /*Produces a collapsed-tree representation of the given token list.
michael@0 6 _tree: The storage for the collapsed Huffman tree.
michael@0 7 This may be NULL to compute the required storage size instead of
michael@0 8 constructing the tree.
michael@0 9 _tokens: A list of internal tokens, in the order they are found in the
michael@0 10 codebook, and the lengths of their corresponding codewords.
michael@0 11 _ntokens: The number of tokens corresponding to this tree node.
michael@0 12 Return: The number of words required to store the tree.*/
michael@0 13 +#if defined(_MSC_VER) && _MSC_VER >= 1700
michael@0 14 +#pragma optimize( "", off )
michael@0 15 +#endif
michael@0 16 static size_t oc_huff_tree_collapse(ogg_int16_t *_tree,
michael@0 17 unsigned char _tokens[][2],int _ntokens){
michael@0 18 ogg_int16_t node[34];
michael@0 19 unsigned char depth[34];
michael@0 20 unsigned char last[34];
michael@0 21 size_t ntree;
michael@0 22 int ti;
michael@0 23 int l;
michael@0 24 @@ -367,16 +370,19 @@ static size_t oc_huff_tree_collapse(ogg_
michael@0 25 /*Pop back up a level of recursion.*/
michael@0 26 else if(l-->0)nbits=depth[l+1]-depth[l];
michael@0 27 }
michael@0 28 while(l>=0);
michael@0 29 }
michael@0 30 while(l>=0);
michael@0 31 return ntree;
michael@0 32 }
michael@0 33 +#if defined(_MSC_VER) && _MSC_VER >= 1700
michael@0 34 +#pragma optimize( "", on )
michael@0 35 +#endif
michael@0 36
michael@0 37 /*Unpacks a set of Huffman trees, and reduces them to a collapsed
michael@0 38 representation.
michael@0 39 _opb: The buffer to unpack the trees from.
michael@0 40 _nodes: The table to fill with the Huffman trees.
michael@0 41 Return: 0 on success, or a negative value on error.
michael@0 42 The caller is responsible for cleaning up any partially initialized
michael@0 43 _nodes on failure.*/

mercurial