summaryrefslogtreecommitdiff
path: root/libavcodec/tscc2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-18 22:27:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-18 22:34:48 +0200
commit204c4e953d895e15ab0908d715fd46181bf32add (patch)
treeaebdffe23aa1133eeb1db55b810135ecdfe1c188 /libavcodec/tscc2.c
parentc66978e29ad9cae2c71da83857c6a3cec11bb9cb (diff)
parentffdd93a25e64db82c053577f415ea82c54fd5235 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: ppc: fix build with altivec disabled vp3: move idct and loop filter pointers to new vp3dsp context build: add CONFIG_VP3DSP, reduce repetition in OBJS lists tscc2: do not add/subtract 128 bias during DCT tscc2: fix typo in DCT configure: clarify external library section of help output configure: mark libfdk-aac as nonfree configure: cosmetics: drop some unnecessary backslashes os_support: K&R formatting cosmetics Conflicts: configure libavcodec/vp3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tscc2.c')
-rw-r--r--libavcodec/tscc2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c
index 9c8d2341ce..a8fd652e59 100644
--- a/libavcodec/tscc2.c
+++ b/libavcodec/tscc2.c
@@ -91,11 +91,11 @@ static av_cold int init_vlcs(TSCC2Context *c)
#define DCT1D(d0, d1, d2, d3, s0, s1, s2, s3, OP) \
OP(d0, 5 * ((s0) + (s1) + (s2)) + 2 * (s3)); \
OP(d1, 5 * ((s0) - (s2) - (s3)) + 2 * (s1)); \
- OP(d2, 5 * ((s0) - (s2) + (s3)) - 2 * (s3)); \
+ OP(d2, 5 * ((s0) - (s2) + (s3)) - 2 * (s1)); \
OP(d3, 5 * ((s0) - (s1) + (s2)) - 2 * (s3)); \
#define COL_OP(a, b) a = b
-#define ROW_OP(a, b) a = (((b) + 0x20) >> 6) + 0x80
+#define ROW_OP(a, b) a = ((b) + 0x20) >> 6
static void tscc2_idct4_put(int *in, int q[3], uint8_t *dst, int stride)
{
@@ -158,7 +158,7 @@ static int tscc2_decode_mb(TSCC2Context *c, int *q, int vlc_set,
}
dc = (dc + prev_dc) & 0xFF;
prev_dc = dc;
- c->block[0] = dc - 0x80;
+ c->block[0] = dc;
nc = get_vlc2(gb, c->nc_vlc[vlc_set].table, 9, 1);
if (nc == -1)