Commit 4efb9771 authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "vp10/common: apply clang-format" into nextgenv2

parents ca502bf0 7feae8e8
...@@ -35,8 +35,7 @@ static int alloc_seg_map(VP10_COMMON *cm, int seg_map_size) { ...@@ -35,8 +35,7 @@ static int alloc_seg_map(VP10_COMMON *cm, int seg_map_size) {
for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) { for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) {
cm->seg_map_array[i] = (uint8_t *)vpx_calloc(seg_map_size, 1); cm->seg_map_array[i] = (uint8_t *)vpx_calloc(seg_map_size, 1);
if (cm->seg_map_array[i] == NULL) if (cm->seg_map_array[i] == NULL) return 1;
return 1;
} }
cm->seg_map_alloc_size = seg_map_size; cm->seg_map_alloc_size = seg_map_size;
...@@ -91,7 +90,7 @@ void vp10_free_context_buffers(VP10_COMMON *cm) { ...@@ -91,7 +90,7 @@ void vp10_free_context_buffers(VP10_COMMON *cm) {
int i; int i;
cm->free_mi(cm); cm->free_mi(cm);
free_seg_map(cm); free_seg_map(cm);
for (i = 0 ; i < MAX_MB_PLANE ; i++) { for (i = 0; i < MAX_MB_PLANE; i++) {
vpx_free(cm->above_context[i]); vpx_free(cm->above_context[i]);
cm->above_context[i] = NULL; cm->above_context[i] = NULL;
} }
...@@ -110,15 +109,13 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) { ...@@ -110,15 +109,13 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) {
new_mi_size = cm->mi_stride * calc_mi_size(cm->mi_rows); new_mi_size = cm->mi_stride * calc_mi_size(cm->mi_rows);
if (cm->mi_alloc_size < new_mi_size) { if (cm->mi_alloc_size < new_mi_size) {
cm->free_mi(cm); cm->free_mi(cm);
if (cm->alloc_mi(cm, new_mi_size)) if (cm->alloc_mi(cm, new_mi_size)) goto fail;
goto fail;
} }
if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) { if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) {
// Create the segmentation map structure and set to 0. // Create the segmentation map structure and set to 0.
free_seg_map(cm); free_seg_map(cm);
if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail;
goto fail;
} }
if (cm->above_context_alloc_cols < cm->mi_cols) { if (cm->above_context_alloc_cols < cm->mi_cols) {
...@@ -129,7 +126,7 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) { ...@@ -129,7 +126,7 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) {
ALIGN_POWER_OF_TWO(cm->mi_cols, MAX_MIB_SIZE_LOG2); ALIGN_POWER_OF_TWO(cm->mi_cols, MAX_MIB_SIZE_LOG2);
int i; int i;
for (i = 0 ; i < MAX_MB_PLANE ; i++) { for (i = 0; i < MAX_MB_PLANE; i++) {
vpx_free(cm->above_context[i]); vpx_free(cm->above_context[i]);
cm->above_context[i] = (ENTROPY_CONTEXT *)vpx_calloc( cm->above_context[i] = (ENTROPY_CONTEXT *)vpx_calloc(
2 * aligned_mi_cols, sizeof(*cm->above_context[0])); 2 * aligned_mi_cols, sizeof(*cm->above_context[0]));
...@@ -153,7 +150,7 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) { ...@@ -153,7 +150,7 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) {
return 0; return 0;
fail: fail:
vp10_free_context_buffers(cm); vp10_free_context_buffers(cm);
return 1; return 1;
} }
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP10_COMMON_ALLOCCOMMON_H_ #ifndef VP10_COMMON_ALLOCCOMMON_H_
#define VP10_COMMON_ALLOCCOMMON_H_ #define VP10_COMMON_ALLOCCOMMON_H_
......
...@@ -27,16 +27,14 @@ ...@@ -27,16 +27,14 @@
quotient = fastdiv(dividend, divisor); \ quotient = fastdiv(dividend, divisor); \
remainder = dividend - quotient * divisor; \ remainder = dividend - quotient * divisor; \
} while (0) } while (0)
#define ANS_DIV(dividend, divisor) \ #define ANS_DIV(dividend, divisor) fastdiv(dividend, divisor)
fastdiv(dividend, divisor)
#else #else
#define ANS_DIVREM(quotient, remainder, dividend, divisor) \ #define ANS_DIVREM(quotient, remainder, dividend, divisor) \
do { \ do { \
quotient = dividend / divisor; \ quotient = dividend / divisor; \
remainder = dividend % divisor; \ remainder = dividend % divisor; \
} while (0) } while (0)
#define ANS_DIV(dividend, divisor) \ #define ANS_DIV(dividend, divisor) ((dividend) / (divisor))
((dividend) / (divisor))
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
...@@ -245,8 +243,7 @@ static INLINE int uabs_read_literal(struct AnsDecoder *ans, int bits) { ...@@ -245,8 +243,7 @@ static INLINE int uabs_read_literal(struct AnsDecoder *ans, int bits) {
// TODO(aconverse): Investigate ways to read/write literals faster, // TODO(aconverse): Investigate ways to read/write literals faster,
// e.g. 8-bit chunks. // e.g. 8-bit chunks.
for (bit = bits - 1; bit >= 0; bit--) for (bit = bits - 1; bit >= 0; bit--) literal |= uabs_read_bit(ans) << bit;
literal |= uabs_read_bit(ans) << bit;
return literal; return literal;
} }
...@@ -257,8 +254,7 @@ static INLINE int uabs_read_tree(struct AnsDecoder *ans, ...@@ -257,8 +254,7 @@ static INLINE int uabs_read_tree(struct AnsDecoder *ans,
const AnsP8 *probs) { const AnsP8 *probs) {
vpx_tree_index i = 0; vpx_tree_index i = 0;
while ((i = tree[i + uabs_read(ans, probs[i >> 1])]) > 0) while ((i = tree[i + uabs_read(ans, probs[i >> 1])]) > 0) continue;
continue;
return -i; return -i;
} }
...@@ -288,8 +284,7 @@ static INLINE void rans_build_cdf_from_pdf(const AnsP10 token_probs[], ...@@ -288,8 +284,7 @@ static INLINE void rans_build_cdf_from_pdf(const AnsP10 token_probs[],
assert(cdf_tab[i - 1] == rans_precision); assert(cdf_tab[i - 1] == rans_precision);
} }
static INLINE int ans_find_largest(const AnsP10 *const pdf_tab, static INLINE int ans_find_largest(const AnsP10 *const pdf_tab, int num_syms) {
int num_syms) {
int largest_idx = -1; int largest_idx = -1;
int largest_p = -1; int largest_p = -1;
int i; int i;
...@@ -365,8 +360,7 @@ static INLINE void fetch_sym(struct rans_dec_sym *out, const rans_dec_lut cdf, ...@@ -365,8 +360,7 @@ static INLINE void fetch_sym(struct rans_dec_sym *out, const rans_dec_lut cdf,
out->cum_prob = (AnsP10)cdf[i - 1]; out->cum_prob = (AnsP10)cdf[i - 1];
} }
static INLINE int rans_read(struct AnsDecoder *ans, static INLINE int rans_read(struct AnsDecoder *ans, const rans_dec_lut tab) {
const rans_dec_lut tab) {
unsigned rem; unsigned rem;
unsigned quo; unsigned quo;
struct rans_dec_sym sym; struct rans_dec_sym sym;
...@@ -381,8 +375,7 @@ static INLINE int rans_read(struct AnsDecoder *ans, ...@@ -381,8 +375,7 @@ static INLINE int rans_read(struct AnsDecoder *ans,
} }
static INLINE int ans_read_init(struct AnsDecoder *const ans, static INLINE int ans_read_init(struct AnsDecoder *const ans,
const uint8_t *const buf, const uint8_t *const buf, int offset) {
int offset) {
unsigned x; unsigned x;
if (offset < 1) return 1; if (offset < 1) return 1;
ans->buf = buf; ans->buf = buf;
...@@ -403,8 +396,7 @@ static INLINE int ans_read_init(struct AnsDecoder *const ans, ...@@ -403,8 +396,7 @@ static INLINE int ans_read_init(struct AnsDecoder *const ans,
return 1; return 1;
} }
ans->state += l_base; ans->state += l_base;
if (ans->state >= l_base * io_base) if (ans->state >= l_base * io_base) return 1;
return 1;
return 0; return 0;
} }
......
...@@ -23,9 +23,7 @@ static int16_t cospi_8_64 = 0x3b21; ...@@ -23,9 +23,7 @@ static int16_t cospi_8_64 = 0x3b21;
static int16_t cospi_16_64 = 0x2d41; static int16_t cospi_16_64 = 0x2d41;
static int16_t cospi_24_64 = 0x187e; static int16_t cospi_24_64 = 0x187e;
static INLINE void TRANSPOSE4X4( static INLINE void TRANSPOSE4X4(int16x8_t *q8s16, int16x8_t *q9s16) {
int16x8_t *q8s16,
int16x8_t *q9s16) {
int32x4_t q8s32, q9s32; int32x4_t q8s32, q9s32;
int16x4x2_t d0x2s16, d1x2s16; int16x4x2_t d0x2s16, d1x2s16;
int32x4x2_t q0x2s32; int32x4x2_t q0x2s32;
...@@ -42,9 +40,7 @@ static INLINE void TRANSPOSE4X4( ...@@ -42,9 +40,7 @@ static INLINE void TRANSPOSE4X4(
return; return;
} }
static INLINE void GENERATE_COSINE_CONSTANTS( static INLINE void GENERATE_COSINE_CONSTANTS(int16x4_t *d0s16, int16x4_t *d1s16,
int16x4_t *d0s16,
int16x4_t *d1s16,
int16x4_t *d2s16) { int16x4_t *d2s16) {
*d0s16 = vdup_n_s16(cospi_8_64); *d0s16 = vdup_n_s16(cospi_8_64);
*d1s16 = vdup_n_s16(cospi_16_64); *d1s16 = vdup_n_s16(cospi_16_64);
...@@ -52,11 +48,8 @@ static INLINE void GENERATE_COSINE_CONSTANTS( ...@@ -52,11 +48,8 @@ static INLINE void GENERATE_COSINE_CONSTANTS(
return; return;
} }
static INLINE void GENERATE_SINE_CONSTANTS( static INLINE void GENERATE_SINE_CONSTANTS(int16x4_t *d3s16, int16x4_t *d4s16,
int16x4_t *d3s16, int16x4_t *d5s16, int16x8_t *q3s16) {
int16x4_t *d4s16,
int16x4_t *d5s16,
int16x8_t *q3s16) {
*d3s16 = vdup_n_s16(sinpi_1_9); *d3s16 = vdup_n_s16(sinpi_1_9);
*d4s16 = vdup_n_s16(sinpi_2_9); *d4s16 = vdup_n_s16(sinpi_2_9);
*q3s16 = vdupq_n_s16(sinpi_3_9); *q3s16 = vdupq_n_s16(sinpi_3_9);
...@@ -64,11 +57,8 @@ static INLINE void GENERATE_SINE_CONSTANTS( ...@@ -64,11 +57,8 @@ static INLINE void GENERATE_SINE_CONSTANTS(
return; return;
} }
static INLINE void IDCT4x4_1D( static INLINE void IDCT4x4_1D(int16x4_t *d0s16, int16x4_t *d1s16,
int16x4_t *d0s16, int16x4_t *d2s16, int16x8_t *q8s16,
int16x4_t *d1s16,
int16x4_t *d2s16,
int16x8_t *q8s16,
int16x8_t *q9s16) { int16x8_t *q9s16) {
int16x4_t d16s16, d17s16, d18s16, d19s16, d23s16, d24s16; int16x4_t d16s16, d17s16, d18s16, d19s16, d23s16, d24s16;
int16x4_t d26s16, d27s16, d28s16, d29s16; int16x4_t d26s16, d27s16, d28s16, d29s16;
...@@ -99,18 +89,13 @@ static INLINE void IDCT4x4_1D( ...@@ -99,18 +89,13 @@ static INLINE void IDCT4x4_1D(
q14s16 = vcombine_s16(d28s16, d29s16); q14s16 = vcombine_s16(d28s16, d29s16);
*q8s16 = vaddq_s16(q13s16, q14s16); *q8s16 = vaddq_s16(q13s16, q14s16);
*q9s16 = vsubq_s16(q13s16, q14s16); *q9s16 = vsubq_s16(q13s16, q14s16);
*q9s16 = vcombine_s16(vget_high_s16(*q9s16), *q9s16 = vcombine_s16(vget_high_s16(*q9s16), vget_low_s16(*q9s16)); // vswp
vget_low_s16(*q9s16)); // vswp
return; return;
} }
static INLINE void IADST4x4_1D( static INLINE void IADST4x4_1D(int16x4_t *d3s16, int16x4_t *d4s16,
int16x4_t *d3s16, int16x4_t *d5s16, int16x8_t *q3s16,
int16x4_t *d4s16, int16x8_t *q8s16, int16x8_t *q9s16) {
int16x4_t *d5s16,
int16x8_t *q3s16,
int16x8_t *q8s16,
int16x8_t *q9s16) {
int16x4_t d6s16, d16s16, d17s16, d18s16, d19s16; int16x4_t d6s16, d16s16, d17s16, d18s16, d19s16;
int32x4_t q8s32, q9s32, q10s32, q11s32, q12s32, q13s32, q14s32, q15s32; int32x4_t q8s32, q9s32, q10s32, q11s32, q12s32, q13s32, q14s32, q15s32;
......
...@@ -31,15 +31,10 @@ static int16_t cospi_26_64 = 4756; ...@@ -31,15 +31,10 @@ static int16_t cospi_26_64 = 4756;
static int16_t cospi_28_64 = 3196; static int16_t cospi_28_64 = 3196;
static int16_t cospi_30_64 = 1606; static int16_t cospi_30_64 = 1606;
static INLINE void TRANSPOSE8X8( static INLINE void TRANSPOSE8X8(int16x8_t *q8s16, int16x8_t *q9s16,
int16x8_t *q8s16, int16x8_t *q10s16, int16x8_t *q11s16,
int16x8_t *q9s16, int16x8_t *q12s16, int16x8_t *q13s16,
int16x8_t *q10s16, int16x8_t *q14s16, int16x8_t *q15s16) {
int16x8_t *q11s16,
int16x8_t *q12s16,
int16x8_t *q13s16,
int16x8_t *q14s16,
int16x8_t *q15s16) {
int16x4_t d16s16, d17s16, d18s16, d19s16, d20s16, d21s16, d22s16, d23s16; int16x4_t d16s16, d17s16, d18s16, d19s16, d20s16, d21s16, d22s16, d23s16;
int16x4_t d24s16, d25s16, d26s16, d27s16, d28s16, d29s16, d30s16, d31s16; int16x4_t d24s16, d25s16, d26s16, d27s16, d28s16, d29s16, d30s16, d31s16;
int32x4x2_t q0x2s32, q1x2s32, q2x2s32, q3x2s32; int32x4x2_t q0x2s32, q1x2s32, q2x2s32, q3x2s32;
...@@ -71,14 +66,14 @@ static INLINE void TRANSPOSE8X8( ...@@ -71,14 +66,14 @@ static INLINE void TRANSPOSE8X8(
*q14s16 = vcombine_s16(d21s16, d29s16); *q14s16 = vcombine_s16(d21s16, d29s16);
*q15s16 = vcombine_s16(d23s16, d31s16); *q15s16 = vcombine_s16(d23s16, d31s16);
q0x2s32 = vtrnq_s32(vreinterpretq_s32_s16(*q8s16), q0x2s32 =
vreinterpretq_s32_s16(*q10s16)); vtrnq_s32(vreinterpretq_s32_s16(*q8s16), vreinterpretq_s32_s16(*q10s16));
q1x2s32 = vtrnq_s32(vreinterpretq_s32_s16(*q9s16), q1x2s32 =
vreinterpretq_s32_s16(*q11s16)); vtrnq_s32(vreinterpretq_s32_s16(*q9s16), vreinterpretq_s32_s16(*q11s16));
q2x2s32 = vtrnq_s32(vreinterpretq_s32_s16(*q12s16), q2x2s32 =
vreinterpretq_s32_s16(*q14s16)); vtrnq_s32(vreinterpretq_s32_s16(*q12s16), vreinterpretq_s32_s16(*q14s16));
q3x2s32 = vtrnq_s32(vreinterpretq_s32_s16(*q13s16), q3x2s32 =
vreinterpretq_s32_s16(*q15s16)); vtrnq_s32(vreinterpretq_s32_s16(*q13s16), vreinterpretq_s32_s16(*q15s16));
q0x2s16 = vtrnq_s16(vreinterpretq_s16_s32(q0x2s32.val[0]), // q8 q0x2s16 = vtrnq_s16(vreinterpretq_s16_s32(q0x2s32.val[0]), // q8
vreinterpretq_s16_s32(q1x2s32.val[0])); // q9 vreinterpretq_s16_s32(q1x2s32.val[0])); // q9
...@@ -100,15 +95,10 @@ static INLINE void TRANSPOSE8X8( ...@@ -100,15 +95,10 @@ static INLINE void TRANSPOSE8X8(
return; return;
} }
static INLINE void IDCT8x8_1D( static INLINE void IDCT8x8_1D(int16x8_t *q8s16, int16x8_t *q9s16,
int16x8_t *q8s16, int16x8_t *q10s16, int16x8_t *q11s16,
int16x8_t *q9s16, int16x8_t *q12s16, int16x8_t *q13s16,
int16x8_t *q10s16, int16x8_t *q14s16, int16x8_t *q15s16) {
int16x8_t *q11s16,
int16x8_t *q12s16,
int16x8_t *q13s16,
int16x8_t *q14s16,
int16x8_t *q15s16) {
int16x4_t d0s16, d1s16, d2s16, d3s16; int16x4_t d0s16, d1s16, d2s16, d3s16;
int16x4_t d8s16, d9s16, d10s16, d11s16, d12s16, d13s16, d14s16, d15s16; int16x4_t d8s16, d9s16, d10s16, d11s16, d12s16, d13s16, d14s16, d15s16;
int16x4_t d16s16, d17s16, d18s16, d19s16, d20s16, d21s16, d22s16, d23s16; int16x4_t d16s16, d17s16, d18s16, d19s16, d20s16, d21s16, d22s16, d23s16;
...@@ -256,15 +246,10 @@ static INLINE void IDCT8x8_1D( ...@@ -256,15 +246,10 @@ static INLINE void IDCT8x8_1D(
return; return;
} }
static INLINE void IADST8X8_1D( static INLINE void IADST8X8_1D(int16x8_t *q8s16, int16x8_t *q9s16,
int16x8_t *q8s16, int16x8_t *q10s16, int16x8_t *q11s16,
int16x8_t *q9s16, int16x8_t *q12s16, int16x8_t *q13s16,
int16x8_t *q10s16, int16x8_t *q14s16, int16x8_t *q15s16) {
int16x8_t *q11s16,
int16x8_t *q12s16,
int16x8_t *q13s16,
int16x8_t *q14s16,
int16x8_t *q15s16) {
int16x4_t d0s16, d1s16, d2s16, d3s16, d4s16, d5s16, d6s16, d7s16; int16x4_t d0s16, d1s16, d2s16, d3s16, d4s16, d5s16, d6s16, d7s16;
int16x4_t d8s16, d9s16, d10s16, d11s16, d12s16, d13s16, d14s16, d15s16; int16x4_t d8s16, d9s16, d10s16, d11s16, d12s16, d13s16, d14s16, d15s16;
int16x4_t d16s16, d17s16, d18s16, d19s16, d20s16, d21s16, d22s16, d23s16; int16x4_t d16s16, d17s16, d18s16, d19s16, d20s16, d21s16, d22s16, d23s16;
...@@ -504,8 +489,8 @@ void vp10_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, ...@@ -504,8 +489,8 @@ void vp10_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest,
q14s16 = vld1q_s16(input + 8 * 6); q14s16 = vld1q_s16(input + 8 * 6);
q15s16 = vld1q_s16(input + 8 * 7); q15s16 = vld1q_s16(input + 8 * 7);
TRANSPOSE8X8(&q8s16, &q9s16, &q10s16, &q11s16, TRANSPOSE8X8(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
switch (tx_type) { switch (tx_type) {
case 0: // idct_idct is not supported. Fall back to C case 0: // idct_idct is not supported. Fall back to C
...@@ -517,54 +502,54 @@ void vp10_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, ...@@ -517,54 +502,54 @@ void vp10_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest,
// GENERATE_IDCT_CONSTANTS // GENERATE_IDCT_CONSTANTS
// first transform rows // first transform rows
IDCT8x8_1D(&q8s16, &q9s16, &q10s16, &q11s16, IDCT8x8_1D(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
// transpose the matrix // transpose the matrix
TRANSPOSE8X8(&q8s16, &q9s16, &q10s16, &q11s16, TRANSPOSE8X8(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
// generate IADST constants // generate IADST constants
// GENERATE_IADST_CONSTANTS // GENERATE_IADST_CONSTANTS
// then transform columns // then transform columns
IADST8X8_1D(&q8s16, &q9s16, &q10s16, &q11s16, IADST8X8_1D(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
break; break;
case 2: // idct_iadst case 2: // idct_iadst
// generate IADST constants // generate IADST constants
// GENERATE_IADST_CONSTANTS // GENERATE_IADST_CONSTANTS
// first transform rows // first transform rows
IADST8X8_1D(&q8s16, &q9s16, &q10s16, &q11s16, IADST8X8_1D(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
// transpose the matrix // transpose the matrix
TRANSPOSE8X8(&q8s16, &q9s16, &q10s16, &q11s16, TRANSPOSE8X8(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
// generate IDCT constants // generate IDCT constants
// GENERATE_IDCT_CONSTANTS // GENERATE_IDCT_CONSTANTS
// then transform columns // then transform columns
IDCT8x8_1D(&q8s16, &q9s16, &q10s16, &q11s16, IDCT8x8_1D(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
break; break;
case 3: // iadst_iadst case 3: // iadst_iadst
// generate IADST constants // generate IADST constants
// GENERATE_IADST_CONSTANTS // GENERATE_IADST_CONSTANTS
// first transform rows // first transform rows
IADST8X8_1D(&q8s16, &q9s16, &q10s16, &q11s16, IADST8X8_1D(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
// transpose the matrix // transpose the matrix
TRANSPOSE8X8(&q8s16, &q9s16, &q10s16, &q11s16, TRANSPOSE8X8(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
// then transform columns // then transform columns
IADST8X8_1D(&q8s16, &q9s16, &q10s16, &q11s16, IADST8X8_1D(&q8s16, &q9s16, &q10s16, &q11s16, &q12s16, &q13s16, &q14s16,
&q12s16, &q13s16, &q14s16, &q15s16); &q15s16);
break; break;
default: // iadst_idct default: // iadst_idct
assert(0); assert(0);
...@@ -597,14 +582,12 @@ void vp10_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, ...@@ -597,14 +582,12 @@ void vp10_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest,
d3u64 = vld1_u64((uint64_t *)d1); d3u64 = vld1_u64((uint64_t *)d1);
d1 += dest_stride; d1 += dest_stride;
q8u16 = vaddw_u8(vreinterpretq_u16_s16(q8s16), q8u16 = vaddw_u8(vreinterpretq_u16_s16(q8s16), vreinterpret_u8_u64(d0u64));
vreinterpret_u8_u64(d0u64)); q9u16 = vaddw_u8(vreinterpretq_u16_s16(q9s16), vreinterpret_u8_u64(d1u64));
q9u16 = vaddw_u8(vreinterpretq_u16_s16(q9s16), q10u16 =
vreinterpret_u8_u64(d1u64)); vaddw_u8(vreinterpretq_u16_s16(q10s16), vreinterpret_u8_u64(d2u64));
q10u16 = vaddw_u8(vreinterpretq_u16_s16(q10s16), q11u16 =
vreinterpret_u8_u64(d2u64)); vaddw_u8(vreinterpretq_u16_s16(q11s16), vreinterpret_u8_u64(d3u64));
q11u16 = vaddw_u8(vreinterpretq_u16_s16(q11s16),
vreinterpret_u8_u64(d3u64));
d0u8 = vqmovun_s16(vreinterpretq_s16_u16(q8u16)); d0u8 = vqmovun_s16(vreinterpretq_s16_u16(q8u16));
d1u8 = vqmovun_s16(vreinterpretq_s16_u16(q9u16)); d1u8 = vqmovun_s16(vreinterpretq_s16_u16(q9u16));
......
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
PREDICTION_MODE vp10_left_block_mode(const MODE_INFO *cur_mi, PREDICTION_MODE vp10_left_block_mode(const MODE_INFO *cur_mi,
const MODE_INFO *left_mi, int b) { const MODE_INFO *left_mi, int b) {
if (b == 0 || b == 2) { if (b == 0 || b == 2) {
if (!left_mi || is_inter_block(&left_mi->mbmi)) if (!left_mi || is_inter_block(&left_mi->mbmi)) return DC_PRED;
return DC_PRED;
return get_y_mode(left_mi, b + 1); return get_y_mode(left_mi, b + 1);
} else { } else {
...@@ -30,8 +29,7 @@ PREDICTION_MODE vp10_left_block_mode(const MODE_INFO *cur_mi, ...@@ -30,8 +29,7 @@ PREDICTION_MODE vp10_left_block_mode(const MODE_INFO *cur_mi,
PREDICTION_MODE vp10_above_block_mode(const MODE_INFO *cur_mi, PREDICTION_MODE vp10_above_block_mode(const MODE_INFO *cur_mi,
const MODE_INFO *above_mi, int b) { const MODE_INFO *above_mi, int b) {
if (b == 0 || b == 1) { if (b == 0 || b == 1) {
if (!above_mi || is_inter_block(&above_mi->mbmi)) if (!above_mi || is_inter_block(&above_mi->mbmi)) return DC_PRED;
return DC_PRED;
return get_y_mode(above_mi, b + 2); return get_y_mode(above_mi, b + 2);
} else { } else {
...@@ -44,12 +42,11 @@ void vp10_foreach_transformed_block_in_plane( ...@@ -44,12 +42,11 @@ void vp10_foreach_transformed_block_in_plane(
const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane, const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane,
foreach_transformed_block_visitor visit, void *arg) { foreach_transformed_block_visitor visit, void *arg) {
const struct macroblockd_plane *const pd = &xd->plane[plane]; const struct macroblockd_plane *const pd = &xd->plane[plane];
const MB_MODE_INFO* mbmi = &xd->mi[0]->mbmi; const MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
// block and transform sizes, in number of 4x4 blocks log 2 ("*_b") // block and transform sizes, in number of 4x4 blocks log 2 ("*_b")
// 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8 // 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8
// transform size varies per plane, look it up in a common way. // transform size varies per plane, look it up in a common way.
const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi, pd) const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi, pd) : mbmi->tx_size;
: mbmi->tx_size;
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);