[xiph-commits] r7688 - experimental/derf/theora-exp/lib
tterribe at motherfish-iii.xiph.org
tterribe at motherfish-iii.xiph.org
Thu Sep 2 16:35:14 PDT 2004
Author: tterribe
Date: 2004-09-02 16:35:13 -0700 (Thu, 02 Sep 2004)
New Revision: 7688
Modified:
experimental/derf/theora-exp/lib/encode.c
Log:
Two more bugs resolved:
- The VLC codes for motion vectors values 26 and 27 were accidentally reversed.
- The encoder occaisionally included extra blocks in its coded luma block list,
which caused chroma vectors to be wrong and the "last" motion vector to be
updated incorrectly.
Modified: experimental/derf/theora-exp/lib/encode.c
===================================================================
--- experimental/derf/theora-exp/lib/encode.c 2004-09-02 19:56:20 UTC (rev 7687)
+++ experimental/derf/theora-exp/lib/encode.c 2004-09-02 23:35:13 UTC (rev 7688)
@@ -45,7 +45,7 @@
{0x01,3},{0x06,4},{0x08,4},{0x28,6},{0x2A,6},{0x2C,6},{0x2E,6},{0x60,7},
{0x62,7},{0x64,7},{0x66,7},{0x68,7},{0x6A,7},{0x6C,7},{0x6E,7},{0xE0,8},
{0xE2,8},{0xE4,8},{0xE6,8},{0xE8,8},{0xEA,8},{0xEC,8},{0xEE,8},{0xF0,8},
- {0xF2,8},{0xF6,8},{0xF4,8},{0xF8,8},{0xFA,8},{0xFC,8},{0xFE,8}
+ {0xF2,8},{0xF4,8},{0xF6,8},{0xF8,8},{0xFA,8},{0xFC,8},{0xFE,8}
},
/*Scheme 2: (5 bit magnitude),(1 bit sign).
This wastes a code word (0x01, negative zero), or a bit (0x00, positive
@@ -1935,7 +1935,7 @@
char mbmv[2];
int err[OC_NMODES][12];
int bits[OC_NMODES];
- int coded[12];
+ int coded[13];
int frag_qii[12][2][2];
int ncoded;
int ncoded_luma;
@@ -1972,6 +1972,8 @@
/*Count the number of coded blocks that are luma blocks, and replace the
block MVs for not-coded blocks with (0,0).*/
memcpy(bmvs[0],mbinfo->bmvs,sizeof(bmvs[0]));
+ /*Mark the end of the list so we don't go past it below.*/
+ coded[ncoded]=-1;
for(mapi=ncoded_luma=0;mapi<4;mapi++){
if(coded[ncoded_luma]==mapi)ncoded_luma++;
else bmvs[0][mapi][0]=bmvs[0][mapi][1]=0;
More information about the commits
mailing list