ref: 6431007df3880ba03880961c909fa316deeb545f
parent: 245fba74b77474f8ad877355d78d9b426500ddf0
parent: 7ab1d3e49f107e62793405914ca375745ae1f871
author: Yaowu Xu <yaowu@google.com>
date: Thu Nov 29 04:27:00 EST 2012
Merge "minor fix to eob check for setting CONTEXT" into experimental
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -242,7 +242,7 @@
if (c < seg_eob)
coef_counts[coef_bands[c]][pt][DCT_EOB_TOKEN]++;
- a[0] = l[0] = (c != !type);
+ a[0] = l[0] = (c > !type);
return c;
}
@@ -290,11 +290,8 @@
l[1] = l[0];
eobtotal += c;
}
-
- // no Y2 block
- vpx_memset(&A[8], 0, sizeof(A[8]));
- vpx_memset(&L[8], 0, sizeof(L[8]));
-
+ A[8] = 0;
+ L[8] = 0;
return eobtotal;
}
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -533,7 +533,7 @@
final_eob++;
d->eob = final_eob;
- *a = *l = (d->eob != !type);
+ *a = *l = (d->eob > !type);
}
/**************************************************************************
@@ -897,7 +897,7 @@
final_eob++;
d->eob = final_eob;
- *a = *l = (d->eob != !type);
+ *a = *l = (d->eob > !type);
}
void vp9_optimize_mby_16x16(MACROBLOCK *x) {
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -548,8 +548,8 @@
if (c < 4)
cost += mb->token_costs[TX_8X8][type][vp9_coef_bands[c]]
[pt] [DCT_EOB_TOKEN];
-
- pt = (c != !type); // is eob first coefficient;
+ // is eob first coefficient;
+ pt = (c > !type);
*a = *l = pt;
return cost;
}
@@ -649,7 +649,8 @@
[pt][DCT_EOB_TOKEN];
}
- pt = (c != !type); // is eob first coefficient;
+ // is eob first coefficient;
+ pt = (c > !type);
*a = *l = pt;
return cost;
}
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -212,7 +212,7 @@
} while (c < eob && ++c < seg_eob);
*tp = t;
- *a = *l = (c != !type); /* 0 <-> all coeff data is zero */
+ *a = *l = (c > !type); /* 0 <-> all coeff data is zero */
}
int vp9_mby_is_skippable_4x4(MACROBLOCKD *xd, int has_2nd_order) {
@@ -377,8 +377,8 @@
A[vp9_block2above_8x8[b] + 1] = A[vp9_block2above_8x8[b]];
L[vp9_block2left_8x8[b] + 1] = L[vp9_block2left_8x8[b]];
}
- vpx_memset(&A[8], 0, sizeof(A[8]));
- vpx_memset(&L[8], 0, sizeof(L[8]));
+ A[8] = 0;
+ L[8] = 0;
} else if (tx_size == TX_8X8) {
for (b = 0; b < 16; b += 4) {
tokenize_b(cpi, xd, xd->block + b, t, plane_type,
--
⑨