}
uint8_t Rand8(void) {
- return (rand() >> 8) & 0xff;
+ const uint32_t value =
+ random_.Generate(testing::internal::Random::kMaxRange);
+ // There's a bit more entropy in the upper bits of this implementation.
+ return (value >> 24) & 0xff;
}
+ uint8_t Rand8Extremes(void) {
+ // Returns a random value near 0 or near 255, to better exercise
+ // saturation behavior.
+ const uint8_t r = Rand8();
+ return r < 128 ? r << 4 : r >> 4;
+ }
+
int PseudoUniform(int range) {
- return (rand() >> 8) % range;
+ return random_.Generate(range);
}
int operator()(int n) {
if (pbi->oxcf.inv_tile_order) {
const int n_cols = pc->tile_columns;
const uint8_t *data_ptr2[4][1 << 6];
- vp9_reader UNINITIALIZED_IS_SAFE(bc_bak);
- BOOL_DECODER bc_bak = {0};
++ vp9_reader bc_bak = {0};
// pre-initialize the offsets, we're going to read in inverse order
data_ptr2[0][0] = data_ptr;
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_idct.h"
- #if HAVE_SSE2
-
-void vp9_add_residual_4x4_sse2(const int16_t *diff, const uint8_t *pred,
- int pitch, uint8_t *dest, int stride) {
+void vp9_add_residual_4x4_sse2(const int16_t *diff, uint8_t *dest, int stride) {
const int width = 4;
const __m128i zero = _mm_setzero_si128();