Merge "Moved dequantization into the token decoder" into experimental
This commit is contained in:
		@@ -431,12 +431,11 @@ typedef struct macroblockd {
 | 
				
			|||||||
  /* Inverse transform function pointers. */
 | 
					  /* Inverse transform function pointers. */
 | 
				
			||||||
  void (*inv_txm4x4_1)(int16_t *input, int16_t *output, int pitch);
 | 
					  void (*inv_txm4x4_1)(int16_t *input, int16_t *output, int pitch);
 | 
				
			||||||
  void (*inv_txm4x4)(int16_t *input, int16_t *output, int pitch);
 | 
					  void (*inv_txm4x4)(int16_t *input, int16_t *output, int pitch);
 | 
				
			||||||
  void (*itxm_add)(int16_t *input, const int16_t *dq, uint8_t *dest,
 | 
					  void (*itxm_add)(int16_t *input, uint8_t *dest, int stride, int eob);
 | 
				
			||||||
    int stride, int eob);
 | 
					  void (*itxm_add_y_block)(int16_t *q, uint8_t *dst, int stride,
 | 
				
			||||||
  void (*itxm_add_y_block)(int16_t *q, const int16_t *dq,
 | 
					    struct macroblockd *xd);
 | 
				
			||||||
    uint8_t *dst, int stride, struct macroblockd *xd);
 | 
					  void (*itxm_add_uv_block)(int16_t *q, uint8_t *dst, int stride,
 | 
				
			||||||
  void (*itxm_add_uv_block)(int16_t *q, const int16_t *dq,
 | 
					    uint16_t *eobs);
 | 
				
			||||||
    uint8_t *dst, int stride, uint16_t *eobs);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  struct subpix_fn_table  subpix;
 | 
					  struct subpix_fn_table  subpix;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,26 +27,26 @@ forward_decls vp9_common_forward_decls
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# Dequant
 | 
					# Dequant
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
prototype void vp9_dequant_idct_add_y_block_8x8 "int16_t *q, const int16_t *dq, uint8_t *dst, int stride, struct macroblockd *xd"
 | 
					prototype void vp9_idct_add_y_block_8x8 "int16_t *q, uint8_t *dst, int stride, struct macroblockd *xd"
 | 
				
			||||||
specialize vp9_dequant_idct_add_y_block_8x8
 | 
					specialize vp9_idct_add_y_block_8x8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
prototype void vp9_dequant_idct_add_16x16 "int16_t *input, const int16_t *dq, uint8_t *dest, int stride, int eob"
 | 
					prototype void vp9_idct_add_16x16 "int16_t *input, uint8_t *dest, int stride, int eob"
 | 
				
			||||||
specialize vp9_dequant_idct_add_16x16
 | 
					specialize vp9_idct_add_16x16
 | 
				
			||||||
 | 
					
 | 
				
			||||||
prototype void vp9_dequant_idct_add_8x8 "int16_t *input, const int16_t *dq, uint8_t *dest, int stride, int eob"
 | 
					prototype void vp9_idct_add_8x8 "int16_t *input, uint8_t *dest, int stride, int eob"
 | 
				
			||||||
specialize vp9_dequant_idct_add_8x8
 | 
					specialize vp9_idct_add_8x8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
prototype void vp9_dequant_idct_add "int16_t *input, const int16_t *dq, uint8_t *dest, int stride, int eob"
 | 
					prototype void vp9_idct_add "int16_t *input, uint8_t *dest, int stride, int eob"
 | 
				
			||||||
specialize vp9_dequant_idct_add
 | 
					specialize vp9_idct_add
 | 
				
			||||||
 | 
					
 | 
				
			||||||
prototype void vp9_dequant_idct_add_y_block "int16_t *q, const int16_t *dq, uint8_t *dst, int stride, struct macroblockd *xd"
 | 
					prototype void vp9_idct_add_y_block "int16_t *q, uint8_t *dst, int stride, struct macroblockd *xd"
 | 
				
			||||||
specialize vp9_dequant_idct_add_y_block
 | 
					specialize vp9_idct_add_y_block
 | 
				
			||||||
 | 
					
 | 
				
			||||||
prototype void vp9_dequant_idct_add_uv_block "int16_t *q, const int16_t *dq, uint8_t *dst, int stride, uint16_t *eobs"
 | 
					prototype void vp9_idct_add_uv_block "int16_t *q, uint8_t *dst, int stride, uint16_t *eobs"
 | 
				
			||||||
specialize vp9_dequant_idct_add_uv_block
 | 
					specialize vp9_idct_add_uv_block
 | 
				
			||||||
 | 
					
 | 
				
			||||||
prototype void vp9_dequant_idct_add_32x32 "int16_t *q, const int16_t *dq, uint8_t *dst, int stride, int eob"
 | 
					prototype void vp9_idct_add_32x32 "int16_t *q, uint8_t *dst, int stride, int eob"
 | 
				
			||||||
specialize vp9_dequant_idct_add_32x32
 | 
					specialize vp9_idct_add_32x32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# RECON
 | 
					# RECON
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -216,32 +216,29 @@ static void mb_init_dequantizer(VP9D_COMP *pbi, MACROBLOCKD *mb) {
 | 
				
			|||||||
    assert(qindex == 0);
 | 
					    assert(qindex == 0);
 | 
				
			||||||
    mb->inv_txm4x4_1      = vp9_short_iwalsh4x4_1;
 | 
					    mb->inv_txm4x4_1      = vp9_short_iwalsh4x4_1;
 | 
				
			||||||
    mb->inv_txm4x4        = vp9_short_iwalsh4x4;
 | 
					    mb->inv_txm4x4        = vp9_short_iwalsh4x4;
 | 
				
			||||||
    mb->itxm_add          = vp9_dequant_idct_add_lossless_c;
 | 
					    mb->itxm_add          = vp9_idct_add_lossless_c;
 | 
				
			||||||
    mb->itxm_add_y_block  = vp9_dequant_idct_add_y_block_lossless_c;
 | 
					    mb->itxm_add_y_block  = vp9_idct_add_y_block_lossless_c;
 | 
				
			||||||
    mb->itxm_add_uv_block = vp9_dequant_idct_add_uv_block_lossless_c;
 | 
					    mb->itxm_add_uv_block = vp9_idct_add_uv_block_lossless_c;
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    mb->inv_txm4x4_1      = vp9_short_idct4x4_1;
 | 
					    mb->inv_txm4x4_1      = vp9_short_idct4x4_1;
 | 
				
			||||||
    mb->inv_txm4x4        = vp9_short_idct4x4;
 | 
					    mb->inv_txm4x4        = vp9_short_idct4x4;
 | 
				
			||||||
    mb->itxm_add          = vp9_dequant_idct_add;
 | 
					    mb->itxm_add          = vp9_idct_add;
 | 
				
			||||||
    mb->itxm_add_y_block  = vp9_dequant_idct_add_y_block;
 | 
					    mb->itxm_add_y_block  = vp9_idct_add_y_block;
 | 
				
			||||||
    mb->itxm_add_uv_block = vp9_dequant_idct_add_uv_block;
 | 
					    mb->itxm_add_uv_block = vp9_idct_add_uv_block;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void decode_16x16(MACROBLOCKD *xd) {
 | 
					static void decode_16x16(MACROBLOCKD *xd) {
 | 
				
			||||||
  const TX_TYPE tx_type = get_tx_type_16x16(xd, 0);
 | 
					  const TX_TYPE tx_type = get_tx_type_16x16(xd, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vp9_dequant_iht_add_16x16_c(tx_type, xd->plane[0].qcoeff,
 | 
					  vp9_iht_add_16x16_c(tx_type, xd->plane[0].qcoeff, xd->plane[0].dst.buf,
 | 
				
			||||||
                              xd->block[0].dequant, xd->plane[0].dst.buf,
 | 
					                      xd->plane[0].dst.stride, xd->plane[0].eobs[0]);
 | 
				
			||||||
                              xd->plane[0].dst.stride, xd->plane[0].eobs[0]);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vp9_dequant_idct_add_8x8(xd->plane[1].qcoeff, xd->block[16].dequant,
 | 
					  vp9_idct_add_8x8(xd->plane[1].qcoeff, xd->plane[1].dst.buf,
 | 
				
			||||||
                           xd->plane[1].dst.buf, xd->plane[1].dst.stride,
 | 
					                   xd->plane[1].dst.stride, xd->plane[1].eobs[0]);
 | 
				
			||||||
                           xd->plane[1].eobs[0]);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vp9_dequant_idct_add_8x8(xd->plane[2].qcoeff, xd->block[20].dequant,
 | 
					  vp9_idct_add_8x8(xd->plane[2].qcoeff, xd->plane[2].dst.buf,
 | 
				
			||||||
                           xd->plane[2].dst.buf, xd->plane[1].dst.stride,
 | 
					                   xd->plane[1].dst.stride, xd->plane[2].eobs[0]);
 | 
				
			||||||
                           xd->plane[2].eobs[0]);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void decode_8x8(MACROBLOCKD *xd) {
 | 
					static void decode_8x8(MACROBLOCKD *xd) {
 | 
				
			||||||
@@ -255,7 +252,6 @@ static void decode_8x8(MACROBLOCKD *xd) {
 | 
				
			|||||||
      int ib = vp9_i8x8_block[i];
 | 
					      int ib = vp9_i8x8_block[i];
 | 
				
			||||||
      int idx = (ib & 0x02) ? (ib + 2) : ib;
 | 
					      int idx = (ib & 0x02) ? (ib + 2) : ib;
 | 
				
			||||||
      int16_t *q  = BLOCK_OFFSET(xd->plane[0].qcoeff, idx, 16);
 | 
					      int16_t *q  = BLOCK_OFFSET(xd->plane[0].qcoeff, idx, 16);
 | 
				
			||||||
      int16_t *dq = xd->block[0].dequant;
 | 
					 | 
				
			||||||
      uint8_t *dst = *(xd->block[ib].base_dst) + xd->block[ib].dst;
 | 
					      uint8_t *dst = *(xd->block[ib].base_dst) + xd->block[ib].dst;
 | 
				
			||||||
      int stride = xd->plane[0].dst.stride;
 | 
					      int stride = xd->plane[0].dst.stride;
 | 
				
			||||||
      if (mode == I8X8_PRED) {
 | 
					      if (mode == I8X8_PRED) {
 | 
				
			||||||
@@ -264,13 +260,11 @@ static void decode_8x8(MACROBLOCKD *xd) {
 | 
				
			|||||||
        vp9_intra8x8_predict(xd, b, i8x8mode, dst, stride);
 | 
					        vp9_intra8x8_predict(xd, b, i8x8mode, dst, stride);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      tx_type = get_tx_type_8x8(xd, ib);
 | 
					      tx_type = get_tx_type_8x8(xd, ib);
 | 
				
			||||||
      vp9_dequant_iht_add_8x8_c(tx_type, q, dq, dst, stride,
 | 
					      vp9_iht_add_8x8_c(tx_type, q, dst, stride, xd->plane[0].eobs[idx]);
 | 
				
			||||||
                                xd->plane[0].eobs[idx]);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    vp9_dequant_idct_add_y_block_8x8(xd->plane[0].qcoeff,
 | 
					    vp9_idct_add_y_block_8x8(xd->plane[0].qcoeff, xd->plane[0].dst.buf,
 | 
				
			||||||
                                     xd->block[0].dequant, xd->plane[0].dst.buf,
 | 
					                             xd->plane[0].dst.stride, xd);
 | 
				
			||||||
                                     xd->plane[0].dst.stride, xd);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // chroma
 | 
					  // chroma
 | 
				
			||||||
@@ -285,29 +279,27 @@ static void decode_8x8(MACROBLOCKD *xd) {
 | 
				
			|||||||
      vp9_intra_uv4x4_predict(xd, b, i8x8mode, *(b->base_dst) + b->dst,
 | 
					      vp9_intra_uv4x4_predict(xd, b, i8x8mode, *(b->base_dst) + b->dst,
 | 
				
			||||||
                              b->dst_stride);
 | 
					                              b->dst_stride);
 | 
				
			||||||
      xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, i, 16),
 | 
					      xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, i, 16),
 | 
				
			||||||
                   b->dequant, *(b->base_dst) + b->dst, b->dst_stride,
 | 
					                   *(b->base_dst) + b->dst, b->dst_stride,
 | 
				
			||||||
                   xd->plane[1].eobs[i]);
 | 
					                   xd->plane[1].eobs[i]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      b = &xd->block[20 + i];
 | 
					      b = &xd->block[20 + i];
 | 
				
			||||||
      vp9_intra_uv4x4_predict(xd, b, i8x8mode, *(b->base_dst) + b->dst,
 | 
					      vp9_intra_uv4x4_predict(xd, b, i8x8mode, *(b->base_dst) + b->dst,
 | 
				
			||||||
                              b->dst_stride);
 | 
					                              b->dst_stride);
 | 
				
			||||||
      xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, i, 16),
 | 
					      xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, i, 16),
 | 
				
			||||||
                   b->dequant, *(b->base_dst) + b->dst, b->dst_stride,
 | 
					                   *(b->base_dst) + b->dst, b->dst_stride,
 | 
				
			||||||
                   xd->plane[2].eobs[i]);
 | 
					                   xd->plane[2].eobs[i]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } else if (mode == SPLITMV) {
 | 
					  } else if (mode == SPLITMV) {
 | 
				
			||||||
    xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant,
 | 
					    xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->plane[1].dst.buf,
 | 
				
			||||||
         xd->plane[1].dst.buf, xd->plane[1].dst.stride, xd->plane[1].eobs);
 | 
					        xd->plane[1].dst.stride, xd->plane[1].eobs);
 | 
				
			||||||
    xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant,
 | 
					    xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->plane[2].dst.buf,
 | 
				
			||||||
         xd->plane[2].dst.buf, xd->plane[1].dst.stride, xd->plane[2].eobs);
 | 
					        xd->plane[1].dst.stride, xd->plane[2].eobs);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    vp9_dequant_idct_add_8x8(xd->plane[1].qcoeff, xd->block[16].dequant,
 | 
					    vp9_idct_add_8x8(xd->plane[1].qcoeff, xd->plane[1].dst.buf,
 | 
				
			||||||
                             xd->plane[1].dst.buf, xd->plane[1].dst.stride,
 | 
					                     xd->plane[1].dst.stride, xd->plane[1].eobs[0]);
 | 
				
			||||||
                             xd->plane[1].eobs[0]);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    vp9_dequant_idct_add_8x8(xd->plane[2].qcoeff, xd->block[16].dequant,
 | 
					    vp9_idct_add_8x8(xd->plane[2].qcoeff, xd->plane[2].dst.buf,
 | 
				
			||||||
                             xd->plane[2].dst.buf, xd->plane[1].dst.stride,
 | 
					                     xd->plane[1].dst.stride, xd->plane[2].eobs[0]);
 | 
				
			||||||
                             xd->plane[2].eobs[0]);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -315,13 +307,10 @@ static INLINE void dequant_add_y(MACROBLOCKD *xd, TX_TYPE tx_type, int idx) {
 | 
				
			|||||||
  BLOCKD *const b = &xd->block[idx];
 | 
					  BLOCKD *const b = &xd->block[idx];
 | 
				
			||||||
  struct macroblockd_plane *const y = &xd->plane[0];
 | 
					  struct macroblockd_plane *const y = &xd->plane[0];
 | 
				
			||||||
  if (tx_type != DCT_DCT) {
 | 
					  if (tx_type != DCT_DCT) {
 | 
				
			||||||
    vp9_dequant_iht_add_c(tx_type,
 | 
					    vp9_iht_add_c(tx_type, BLOCK_OFFSET(y->qcoeff, idx, 16),
 | 
				
			||||||
                          BLOCK_OFFSET(y->qcoeff, idx, 16),
 | 
					                  *(b->base_dst) + b->dst, b->dst_stride, y->eobs[idx]);
 | 
				
			||||||
                          b->dequant, *(b->base_dst) + b->dst,
 | 
					 | 
				
			||||||
                          b->dst_stride, y->eobs[idx]);
 | 
					 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    xd->itxm_add(BLOCK_OFFSET(y->qcoeff, idx, 16),
 | 
					    xd->itxm_add(BLOCK_OFFSET(y->qcoeff, idx, 16), *(b->base_dst) + b->dst,
 | 
				
			||||||
                 b->dequant, *(b->base_dst) + b->dst,
 | 
					 | 
				
			||||||
                 b->dst_stride, y->eobs[idx]);
 | 
					                 b->dst_stride, y->eobs[idx]);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -348,13 +337,13 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, vp9_reader *r) {
 | 
				
			|||||||
      vp9_intra_uv4x4_predict(xd, b, i8x8mode, *(b->base_dst) + b->dst,
 | 
					      vp9_intra_uv4x4_predict(xd, b, i8x8mode, *(b->base_dst) + b->dst,
 | 
				
			||||||
                              b->dst_stride);
 | 
					                              b->dst_stride);
 | 
				
			||||||
      xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, i, 16),
 | 
					      xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, i, 16),
 | 
				
			||||||
                   b->dequant, *(b->base_dst) + b->dst, b->dst_stride,
 | 
					                   *(b->base_dst) + b->dst, b->dst_stride,
 | 
				
			||||||
                   xd->plane[1].eobs[i]);
 | 
					                   xd->plane[1].eobs[i]);
 | 
				
			||||||
      b = &xd->block[20 + i];
 | 
					      b = &xd->block[20 + i];
 | 
				
			||||||
      vp9_intra_uv4x4_predict(xd, b, i8x8mode, *(b->base_dst) + b->dst,
 | 
					      vp9_intra_uv4x4_predict(xd, b, i8x8mode, *(b->base_dst) + b->dst,
 | 
				
			||||||
                              b->dst_stride);
 | 
					                              b->dst_stride);
 | 
				
			||||||
      xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, i, 16),
 | 
					      xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, i, 16),
 | 
				
			||||||
                   b->dequant, *(b->base_dst) + b->dst, b->dst_stride,
 | 
					                   *(b->base_dst) + b->dst, b->dst_stride,
 | 
				
			||||||
                   xd->plane[2].eobs[i]);
 | 
					                   xd->plane[2].eobs[i]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } else if (mode == I4X4_PRED) {
 | 
					  } else if (mode == I4X4_PRED) {
 | 
				
			||||||
@@ -365,7 +354,7 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, vp9_reader *r) {
 | 
				
			|||||||
      xd->mode_info_context->bmi[i].as_mode.context = b->bmi.as_mode.context =
 | 
					      xd->mode_info_context->bmi[i].as_mode.context = b->bmi.as_mode.context =
 | 
				
			||||||
          vp9_find_bpred_context(xd, b);
 | 
					          vp9_find_bpred_context(xd, b);
 | 
				
			||||||
      if (!xd->mode_info_context->mbmi.mb_skip_coeff)
 | 
					      if (!xd->mode_info_context->mbmi.mb_skip_coeff)
 | 
				
			||||||
        vp9_decode_coefs_4x4(pbi, xd, r, PLANE_TYPE_Y_WITH_DC, i);
 | 
					        vp9_decode_coefs_4x4(pbi, xd, r, PLANE_TYPE_Y_WITH_DC, i, b->dequant);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
      vp9_intra4x4_predict(xd, b, b_mode, *(b->base_dst) + b->dst,
 | 
					      vp9_intra4x4_predict(xd, b, b_mode, *(b->base_dst) + b->dst,
 | 
				
			||||||
                           b->dst_stride);
 | 
					                           b->dst_stride);
 | 
				
			||||||
@@ -374,32 +363,29 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, vp9_reader *r) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
#if CONFIG_NEWBINTRAMODES
 | 
					#if CONFIG_NEWBINTRAMODES
 | 
				
			||||||
    if (!xd->mode_info_context->mbmi.mb_skip_coeff)
 | 
					    if (!xd->mode_info_context->mbmi.mb_skip_coeff)
 | 
				
			||||||
      vp9_decode_mb_tokens_4x4_uv(pbi, xd, r);
 | 
					      vp9_decode_mb_tokens_4x4_uv(pbi, xd, r, xd->block[16].dequant);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    vp9_build_intra_predictors_sbuv_s(xd, BLOCK_SIZE_MB16X16);
 | 
					    vp9_build_intra_predictors_sbuv_s(xd, BLOCK_SIZE_MB16X16);
 | 
				
			||||||
    xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant,
 | 
					    xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->plane[1].dst.buf,
 | 
				
			||||||
         xd->plane[1].dst.buf, xd->plane[1].dst.stride, xd->plane[1].eobs);
 | 
					        xd->plane[1].dst.stride, xd->plane[1].eobs);
 | 
				
			||||||
    xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant,
 | 
					    xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->plane[2].dst.buf,
 | 
				
			||||||
         xd->plane[2].dst.buf, xd->plane[1].dst.stride, xd->plane[2].eobs);
 | 
					        xd->plane[1].dst.stride, xd->plane[2].eobs);
 | 
				
			||||||
  } else if (mode == SPLITMV || get_tx_type_4x4(xd, 0) == DCT_DCT) {
 | 
					  } else if (mode == SPLITMV || get_tx_type_4x4(xd, 0) == DCT_DCT) {
 | 
				
			||||||
    xd->itxm_add_y_block(xd->plane[0].qcoeff,
 | 
					    xd->itxm_add_y_block(xd->plane[0].qcoeff, xd->plane[0].dst.buf,
 | 
				
			||||||
                          xd->block[0].dequant,
 | 
					        xd->plane[0].dst.stride, xd);
 | 
				
			||||||
                          xd->plane[0].dst.buf, xd->plane[0].dst.stride, xd);
 | 
					    xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->plane[1].dst.buf,
 | 
				
			||||||
    xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant,
 | 
					        xd->plane[1].dst.stride, xd->plane[1].eobs);
 | 
				
			||||||
         xd->plane[1].dst.buf, xd->plane[1].dst.stride, xd->plane[1].eobs);
 | 
					    xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->plane[2].dst.buf,
 | 
				
			||||||
    xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant,
 | 
					        xd->plane[1].dst.stride, xd->plane[2].eobs);
 | 
				
			||||||
         xd->plane[2].dst.buf, xd->plane[1].dst.stride, xd->plane[2].eobs);
 | 
					 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    for (i = 0; i < 16; i++) {
 | 
					    for (i = 0; i < 16; i++) {
 | 
				
			||||||
      tx_type = get_tx_type_4x4(xd, i);
 | 
					      tx_type = get_tx_type_4x4(xd, i);
 | 
				
			||||||
      dequant_add_y(xd, tx_type, i);
 | 
					      dequant_add_y(xd, tx_type, i);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant,
 | 
					    xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->plane[1].dst.buf,
 | 
				
			||||||
                          xd->plane[1].dst.buf, xd->plane[1].dst.stride,
 | 
					                          xd->plane[1].dst.stride, xd->plane[1].eobs);
 | 
				
			||||||
                          xd->plane[1].eobs);
 | 
					    xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->plane[2].dst.buf,
 | 
				
			||||||
    xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant,
 | 
					                          xd->plane[1].dst.stride, xd->plane[2].eobs);
 | 
				
			||||||
                          xd->plane[2].dst.buf, xd->plane[1].dst.stride,
 | 
					 | 
				
			||||||
                          xd->plane[2].eobs);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -413,11 +399,10 @@ static INLINE void decode_sby_32x32(MACROBLOCKD *mb, BLOCK_SIZE_TYPE bsize) {
 | 
				
			|||||||
    const int x_idx = n & (bw - 1);
 | 
					    const int x_idx = n & (bw - 1);
 | 
				
			||||||
    const int y_idx = n >> bwl;
 | 
					    const int y_idx = n >> bwl;
 | 
				
			||||||
    const int y_offset = (y_idx * 32) * mb->plane[0].dst.stride + (x_idx * 32);
 | 
					    const int y_offset = (y_idx * 32) * mb->plane[0].dst.stride + (x_idx * 32);
 | 
				
			||||||
    vp9_dequant_idct_add_32x32(BLOCK_OFFSET(mb->plane[0].qcoeff, n, 1024),
 | 
					    vp9_idct_add_32x32(BLOCK_OFFSET(mb->plane[0].qcoeff, n, 1024),
 | 
				
			||||||
                               mb->block[0].dequant ,
 | 
					                       mb->plane[0].dst.buf + y_offset,
 | 
				
			||||||
                               mb->plane[0].dst.buf + y_offset,
 | 
					                       mb->plane[0].dst.stride,
 | 
				
			||||||
                               mb->plane[0].dst.stride,
 | 
					                       mb->plane[0].eobs[n * 64]);
 | 
				
			||||||
                               mb->plane[0].eobs[n * 64]);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -431,16 +416,14 @@ static INLINE void decode_sbuv_32x32(MACROBLOCKD *mb, BLOCK_SIZE_TYPE bsize) {
 | 
				
			|||||||
     const int y_idx = n >> (bwl - 1);
 | 
					     const int y_idx = n >> (bwl - 1);
 | 
				
			||||||
     const int uv_offset = (y_idx * 32) * mb->plane[1].dst.stride +
 | 
					     const int uv_offset = (y_idx * 32) * mb->plane[1].dst.stride +
 | 
				
			||||||
         (x_idx * 32);
 | 
					         (x_idx * 32);
 | 
				
			||||||
     vp9_dequant_idct_add_32x32(BLOCK_OFFSET(mb->plane[1].qcoeff, n, 1024),
 | 
					     vp9_idct_add_32x32(BLOCK_OFFSET(mb->plane[1].qcoeff, n, 1024),
 | 
				
			||||||
                                mb->block[16].dequant,
 | 
					                        mb->plane[1].dst.buf + uv_offset,
 | 
				
			||||||
                                mb->plane[1].dst.buf + uv_offset,
 | 
					                        mb->plane[1].dst.stride,
 | 
				
			||||||
                                mb->plane[1].dst.stride,
 | 
					                        mb->plane[1].eobs[n * 64]);
 | 
				
			||||||
                                mb->plane[1].eobs[n * 64]);
 | 
					     vp9_idct_add_32x32(BLOCK_OFFSET(mb->plane[2].qcoeff, n, 1024),
 | 
				
			||||||
     vp9_dequant_idct_add_32x32(BLOCK_OFFSET(mb->plane[2].qcoeff, n, 1024),
 | 
					                        mb->plane[2].dst.buf + uv_offset,
 | 
				
			||||||
                                mb->block[20].dequant,
 | 
					                        mb->plane[1].dst.stride,
 | 
				
			||||||
                                mb->plane[2].dst.buf + uv_offset,
 | 
					                        mb->plane[2].eobs[n * 64]);
 | 
				
			||||||
                                mb->plane[1].dst.stride,
 | 
					 | 
				
			||||||
                                mb->plane[2].eobs[n * 64]);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -456,12 +439,9 @@ static INLINE void decode_sby_16x16(MACROBLOCKD *mb, BLOCK_SIZE_TYPE bsize) {
 | 
				
			|||||||
    const int y_offset = (y_idx * 16) * mb->plane[0].dst.stride + (x_idx * 16);
 | 
					    const int y_offset = (y_idx * 16) * mb->plane[0].dst.stride + (x_idx * 16);
 | 
				
			||||||
    const TX_TYPE tx_type = get_tx_type_16x16(mb,
 | 
					    const TX_TYPE tx_type = get_tx_type_16x16(mb,
 | 
				
			||||||
                                (y_idx * (4 * bw) + x_idx) * 4);
 | 
					                                (y_idx * (4 * bw) + x_idx) * 4);
 | 
				
			||||||
    vp9_dequant_iht_add_16x16_c(tx_type,
 | 
					    vp9_iht_add_16x16_c(tx_type, BLOCK_OFFSET(mb->plane[0].qcoeff, n, 256),
 | 
				
			||||||
                                BLOCK_OFFSET(mb->plane[0].qcoeff, n, 256),
 | 
					                        mb->plane[0].dst.buf + y_offset,
 | 
				
			||||||
                                mb->block[0].dequant,
 | 
					                        mb->plane[0].dst.stride, mb->plane[0].eobs[n * 16]);
 | 
				
			||||||
                                mb->plane[0].dst.buf + y_offset,
 | 
					 | 
				
			||||||
                                mb->plane[0].dst.stride,
 | 
					 | 
				
			||||||
                                mb->plane[0].eobs[n * 16]);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -477,16 +457,12 @@ static INLINE void decode_sbuv_16x16(MACROBLOCKD *mb, BLOCK_SIZE_TYPE bsize) {
 | 
				
			|||||||
    const int x_idx = n & (bw - 1);
 | 
					    const int x_idx = n & (bw - 1);
 | 
				
			||||||
    const int y_idx = n >> (bwl - 1);
 | 
					    const int y_idx = n >> (bwl - 1);
 | 
				
			||||||
    const int uv_offset = (y_idx * 16) * mb->plane[1].dst.stride + (x_idx * 16);
 | 
					    const int uv_offset = (y_idx * 16) * mb->plane[1].dst.stride + (x_idx * 16);
 | 
				
			||||||
    vp9_dequant_idct_add_16x16(BLOCK_OFFSET(mb->plane[1].qcoeff, n, 256),
 | 
					    vp9_idct_add_16x16(BLOCK_OFFSET(mb->plane[1].qcoeff, n, 256),
 | 
				
			||||||
                               mb->block[16].dequant,
 | 
					                       mb->plane[1].dst.buf + uv_offset,
 | 
				
			||||||
                               mb->plane[1].dst.buf + uv_offset,
 | 
					                       mb->plane[1].dst.stride, mb->plane[1].eobs[n * 16]);
 | 
				
			||||||
                               mb->plane[1].dst.stride,
 | 
					    vp9_idct_add_16x16(BLOCK_OFFSET(mb->plane[2].qcoeff, n, 256),
 | 
				
			||||||
                               mb->plane[1].eobs[n * 16]);
 | 
					                       mb->plane[2].dst.buf + uv_offset,
 | 
				
			||||||
    vp9_dequant_idct_add_16x16(BLOCK_OFFSET(mb->plane[2].qcoeff, n, 256),
 | 
					                       mb->plane[1].dst.stride, mb->plane[2].eobs[n * 16]);
 | 
				
			||||||
                               mb->block[20].dequant,
 | 
					 | 
				
			||||||
                               mb->plane[2].dst.buf + uv_offset,
 | 
					 | 
				
			||||||
                               mb->plane[1].dst.stride,
 | 
					 | 
				
			||||||
                               mb->plane[2].eobs[n * 16]);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -504,12 +480,9 @@ static INLINE void decode_sby_8x8(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) {
 | 
				
			|||||||
    const TX_TYPE tx_type = get_tx_type_8x8(xd,
 | 
					    const TX_TYPE tx_type = get_tx_type_8x8(xd,
 | 
				
			||||||
                                            (y_idx * (2 * bw) + x_idx) * 2);
 | 
					                                            (y_idx * (2 * bw) + x_idx) * 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    vp9_dequant_iht_add_8x8_c(tx_type,
 | 
					    vp9_iht_add_8x8_c(tx_type, BLOCK_OFFSET(xd->plane[0].qcoeff, n, 64),
 | 
				
			||||||
                              BLOCK_OFFSET(xd->plane[0].qcoeff, n, 64),
 | 
					                      xd->plane[0].dst.buf + y_offset, xd->plane[0].dst.stride,
 | 
				
			||||||
                              xd->block[0].dequant,
 | 
					                      xd->plane[0].eobs[n * 4]);
 | 
				
			||||||
                              xd->plane[0].dst.buf + y_offset,
 | 
					 | 
				
			||||||
                              xd->plane[0].dst.stride,
 | 
					 | 
				
			||||||
                              xd->plane[0].eobs[n * 4]);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -524,16 +497,12 @@ static INLINE void decode_sbuv_8x8(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) {
 | 
				
			|||||||
    const int x_idx = n & (bw - 1);
 | 
					    const int x_idx = n & (bw - 1);
 | 
				
			||||||
    const int y_idx = n >> (bwl - 1);
 | 
					    const int y_idx = n >> (bwl - 1);
 | 
				
			||||||
    const int uv_offset = (y_idx * 8) * xd->plane[1].dst.stride + (x_idx * 8);
 | 
					    const int uv_offset = (y_idx * 8) * xd->plane[1].dst.stride + (x_idx * 8);
 | 
				
			||||||
    vp9_dequant_idct_add_8x8(BLOCK_OFFSET(xd->plane[1].qcoeff, n, 64),
 | 
					    vp9_idct_add_8x8(BLOCK_OFFSET(xd->plane[1].qcoeff, n, 64),
 | 
				
			||||||
                             xd->block[16].dequant,
 | 
					                     xd->plane[1].dst.buf + uv_offset, xd->plane[1].dst.stride,
 | 
				
			||||||
                             xd->plane[1].dst.buf + uv_offset,
 | 
					                     xd->plane[1].eobs[n * 4]);
 | 
				
			||||||
                             xd->plane[1].dst.stride,
 | 
					    vp9_idct_add_8x8(BLOCK_OFFSET(xd->plane[2].qcoeff, n, 64),
 | 
				
			||||||
                             xd->plane[1].eobs[n * 4]);
 | 
					                     xd->plane[2].dst.buf + uv_offset, xd->plane[1].dst.stride,
 | 
				
			||||||
    vp9_dequant_idct_add_8x8(BLOCK_OFFSET(xd->plane[2].qcoeff, n, 64),
 | 
					                     xd->plane[2].eobs[n * 4]);
 | 
				
			||||||
                             xd->block[20].dequant,
 | 
					 | 
				
			||||||
                             xd->plane[2].dst.buf + uv_offset,
 | 
					 | 
				
			||||||
                             xd->plane[1].dst.stride,
 | 
					 | 
				
			||||||
                             xd->plane[2].eobs[n * 4]);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -550,15 +519,12 @@ static INLINE void decode_sby_4x4(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) {
 | 
				
			|||||||
    const TX_TYPE tx_type = get_tx_type_4x4(xd, n);
 | 
					    const TX_TYPE tx_type = get_tx_type_4x4(xd, n);
 | 
				
			||||||
    if (tx_type == DCT_DCT) {
 | 
					    if (tx_type == DCT_DCT) {
 | 
				
			||||||
      xd->itxm_add(BLOCK_OFFSET(xd->plane[0].qcoeff, n, 16),
 | 
					      xd->itxm_add(BLOCK_OFFSET(xd->plane[0].qcoeff, n, 16),
 | 
				
			||||||
                   xd->block[0].dequant,
 | 
					 | 
				
			||||||
                   xd->plane[0].dst.buf + y_offset, xd->plane[0].dst.stride,
 | 
					                   xd->plane[0].dst.buf + y_offset, xd->plane[0].dst.stride,
 | 
				
			||||||
                   xd->plane[0].eobs[n]);
 | 
					                   xd->plane[0].eobs[n]);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      vp9_dequant_iht_add_c(tx_type,
 | 
					      vp9_iht_add_c(tx_type, BLOCK_OFFSET(xd->plane[0].qcoeff, n, 16),
 | 
				
			||||||
                            BLOCK_OFFSET(xd->plane[0].qcoeff, n, 16),
 | 
					                    xd->plane[0].dst.buf + y_offset, xd->plane[0].dst.stride,
 | 
				
			||||||
                            xd->block[0].dequant,
 | 
					                    xd->plane[0].eobs[n]);
 | 
				
			||||||
                            xd->plane[0].dst.buf + y_offset,
 | 
					 | 
				
			||||||
                            xd->plane[0].dst.stride, xd->plane[0].eobs[n]);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -574,11 +540,9 @@ static INLINE void decode_sbuv_4x4(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize) {
 | 
				
			|||||||
    const int y_idx = n >> (bwl - 1);
 | 
					    const int y_idx = n >> (bwl - 1);
 | 
				
			||||||
    const int uv_offset = (y_idx * 4) * xd->plane[1].dst.stride + (x_idx * 4);
 | 
					    const int uv_offset = (y_idx * 4) * xd->plane[1].dst.stride + (x_idx * 4);
 | 
				
			||||||
    xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, n, 16),
 | 
					    xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, n, 16),
 | 
				
			||||||
        xd->block[16].dequant,
 | 
					 | 
				
			||||||
        xd->plane[1].dst.buf + uv_offset, xd->plane[1].dst.stride,
 | 
					        xd->plane[1].dst.buf + uv_offset, xd->plane[1].dst.stride,
 | 
				
			||||||
        xd->plane[1].eobs[n]);
 | 
					        xd->plane[1].eobs[n]);
 | 
				
			||||||
    xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, n, 16),
 | 
					    xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, n, 16),
 | 
				
			||||||
        xd->block[20].dequant,
 | 
					 | 
				
			||||||
        xd->plane[2].dst.buf + uv_offset, xd->plane[1].dst.stride,
 | 
					        xd->plane[2].dst.buf + uv_offset, xd->plane[1].dst.stride,
 | 
				
			||||||
        xd->plane[2].eobs[n]);
 | 
					        xd->plane[2].eobs[n]);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -632,7 +596,7 @@ static void decode_sb(VP9D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb_col,
 | 
				
			|||||||
      mb_init_dequantizer(pbi, xd);
 | 
					      mb_init_dequantizer(pbi, xd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // dequantization and idct
 | 
					    // dequantization and idct
 | 
				
			||||||
    eobtotal = vp9_decode_tokens(pbi, xd, r, bsize);
 | 
					    eobtotal = vp9_decode_tokens(pbi, xd, r, bsize, xd->block[0].dequant);
 | 
				
			||||||
    if (eobtotal == 0) {  // skip loopfilter
 | 
					    if (eobtotal == 0) {  // skip loopfilter
 | 
				
			||||||
      for (n = 0; n < bw * bh; n++) {
 | 
					      for (n = 0; n < bw * bh; n++) {
 | 
				
			||||||
        const int x_idx = n & (bw - 1), y_idx = n >> bwl;
 | 
					        const int x_idx = n & (bw - 1), y_idx = n >> bwl;
 | 
				
			||||||
@@ -706,7 +670,8 @@ static void decode_mb(VP9D_COMP *pbi, MACROBLOCKD *xd,
 | 
				
			|||||||
#if CONFIG_NEWBINTRAMODES
 | 
					#if CONFIG_NEWBINTRAMODES
 | 
				
			||||||
    if (mode != I4X4_PRED)
 | 
					    if (mode != I4X4_PRED)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
      eobtotal = vp9_decode_tokens(pbi, xd, r, BLOCK_SIZE_MB16X16);
 | 
					      eobtotal = vp9_decode_tokens(pbi, xd, r, BLOCK_SIZE_MB16X16,
 | 
				
			||||||
 | 
					                                   xd->block[0].dequant);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,365 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  Use of this source code is governed by a BSD-style license
 | 
					 | 
				
			||||||
 *  that can be found in the LICENSE file in the root of the source
 | 
					 | 
				
			||||||
 *  tree. An additional intellectual property rights grant can be found
 | 
					 | 
				
			||||||
 *  in the file PATENTS.  All contributing project authors may
 | 
					 | 
				
			||||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "vp9_rtcd.h"
 | 
					 | 
				
			||||||
#include "vp9/decoder/vp9_dequantize.h"
 | 
					 | 
				
			||||||
#include "vpx_mem/vpx_mem.h"
 | 
					 | 
				
			||||||
#include "vp9/decoder/vp9_onyxd_int.h"
 | 
					 | 
				
			||||||
#include "vp9/common/vp9_common.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void add_residual(const int16_t *diff, uint8_t *dest, int stride,
 | 
					 | 
				
			||||||
                         int width, int height) {
 | 
					 | 
				
			||||||
  int r, c;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  for (r = 0; r < height; r++) {
 | 
					 | 
				
			||||||
    for (c = 0; c < width; c++)
 | 
					 | 
				
			||||||
      dest[c] = clip_pixel(diff[c] + dest[c]);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    dest += stride;
 | 
					 | 
				
			||||||
    diff += width;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_add_residual_4x4_c(const int16_t *diff, uint8_t *dest, int stride) {
 | 
					 | 
				
			||||||
  add_residual(diff, dest, stride, 4, 4);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_add_residual_8x8_c(const int16_t *diff, uint8_t *dest, int stride) {
 | 
					 | 
				
			||||||
  add_residual(diff, dest, stride, 8, 8);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_add_residual_16x16_c(const int16_t *diff, uint8_t *dest, int stride) {
 | 
					 | 
				
			||||||
  add_residual(diff, dest, stride, 16, 16);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_add_residual_32x32_c(const int16_t *diff,uint8_t *dest, int stride) {
 | 
					 | 
				
			||||||
  add_residual(diff, dest, stride, 32, 32);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void add_constant_residual(const int16_t diff, uint8_t *dest, int stride,
 | 
					 | 
				
			||||||
                                  int width, int height) {
 | 
					 | 
				
			||||||
  int r, c;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  for (r = 0; r < height; r++) {
 | 
					 | 
				
			||||||
    for (c = 0; c < width; c++)
 | 
					 | 
				
			||||||
      dest[c] = clip_pixel(diff + dest[c]);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    dest += stride;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_add_constant_residual_8x8_c(const int16_t diff, uint8_t *dest,
 | 
					 | 
				
			||||||
                                     int stride) {
 | 
					 | 
				
			||||||
  add_constant_residual(diff, dest, stride, 8, 8);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_add_constant_residual_16x16_c(const int16_t diff, uint8_t *dest,
 | 
					 | 
				
			||||||
                                       int stride) {
 | 
					 | 
				
			||||||
  add_constant_residual(diff, dest, stride, 16, 16);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_add_constant_residual_32x32_c(const int16_t diff,  uint8_t *dest,
 | 
					 | 
				
			||||||
                                       int stride) {
 | 
					 | 
				
			||||||
  add_constant_residual(diff, dest, stride, 32, 32);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_iht_add_c(TX_TYPE tx_type, int16_t *input,
 | 
					 | 
				
			||||||
                           const int16_t *dq,
 | 
					 | 
				
			||||||
                           uint8_t *dest, int stride, int eob) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (tx_type == DCT_DCT) {
 | 
					 | 
				
			||||||
    vp9_dequant_idct_add(input, dq, dest, stride, eob);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    int i;
 | 
					 | 
				
			||||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (i = 0; i < 16; i++)
 | 
					 | 
				
			||||||
      input[i] *= dq[i];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    vp9_short_iht4x4(input, output, 4, tx_type);
 | 
					 | 
				
			||||||
    vpx_memset(input, 0, 32);
 | 
					 | 
				
			||||||
    vp9_add_residual_4x4(output, dest, stride);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_iht_add_8x8_c(TX_TYPE tx_type, int16_t *input,
 | 
					 | 
				
			||||||
                               const int16_t *dq, uint8_t *dest,
 | 
					 | 
				
			||||||
                               int stride, int eob) {
 | 
					 | 
				
			||||||
  if (tx_type == DCT_DCT) {
 | 
					 | 
				
			||||||
    vp9_dequant_idct_add_8x8(input, dq, dest, stride, eob);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    if (eob > 0) {
 | 
					 | 
				
			||||||
      int i;
 | 
					 | 
				
			||||||
      DECLARE_ALIGNED_ARRAY(16, int16_t, output, 64);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      input[0] *= dq[0];
 | 
					 | 
				
			||||||
      for (i = 1; i < 64; i++)
 | 
					 | 
				
			||||||
        input[i] *= dq[1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      vp9_short_iht8x8(input, output, 8, tx_type);
 | 
					 | 
				
			||||||
      vpx_memset(input, 0, 128);
 | 
					 | 
				
			||||||
      vp9_add_residual_8x8(output, dest, stride);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_idct_add_c(int16_t *input, const int16_t *dq, uint8_t *dest,
 | 
					 | 
				
			||||||
                            int stride, int eob) {
 | 
					 | 
				
			||||||
  int i;
 | 
					 | 
				
			||||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (eob > 1) {
 | 
					 | 
				
			||||||
    for (i = 0; i < 16; i++)
 | 
					 | 
				
			||||||
      input[i] *= dq[i];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // the idct halves ( >> 1) the pitch
 | 
					 | 
				
			||||||
    vp9_short_idct4x4(input, output, 4 << 1);
 | 
					 | 
				
			||||||
    vpx_memset(input, 0, 32);
 | 
					 | 
				
			||||||
    vp9_add_residual_4x4(output, dest, stride);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    vp9_dc_only_idct_add(input[0]*dq[0], dest, dest, stride, stride);
 | 
					 | 
				
			||||||
    ((int *)input)[0] = 0;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_dc_idct_add_c(int16_t *input, const int16_t *dq, uint8_t *dest,
 | 
					 | 
				
			||||||
                               int stride, int dc) {
 | 
					 | 
				
			||||||
  int i;
 | 
					 | 
				
			||||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  input[0] = dc;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  for (i = 1; i < 16; i++)
 | 
					 | 
				
			||||||
    input[i] *= dq[i];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // the idct halves ( >> 1) the pitch
 | 
					 | 
				
			||||||
  vp9_short_idct4x4(input, output, 4 << 1);
 | 
					 | 
				
			||||||
  vpx_memset(input, 0, 32);
 | 
					 | 
				
			||||||
  vp9_add_residual_4x4(output, dest, stride);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_idct_add_lossless_c(int16_t *input, const int16_t *dq,
 | 
					 | 
				
			||||||
                                     uint8_t *dest, int stride, int eob) {
 | 
					 | 
				
			||||||
  int i;
 | 
					 | 
				
			||||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (eob > 1) {
 | 
					 | 
				
			||||||
    for (i = 0; i < 16; i++)
 | 
					 | 
				
			||||||
      input[i] *= dq[i];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    vp9_short_iwalsh4x4_c(input, output, 4 << 1);
 | 
					 | 
				
			||||||
    vpx_memset(input, 0, 32);
 | 
					 | 
				
			||||||
    vp9_add_residual_4x4(output, dest, stride);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    vp9_dc_only_inv_walsh_add(input[0]*dq[0], dest, dest, stride, stride);
 | 
					 | 
				
			||||||
    ((int *)input)[0] = 0;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_dc_idct_add_lossless_c(int16_t *input, const int16_t *dq,
 | 
					 | 
				
			||||||
                                        uint8_t *dest, int stride, int dc) {
 | 
					 | 
				
			||||||
  int i;
 | 
					 | 
				
			||||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  input[0] = dc;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  for (i = 1; i < 16; i++)
 | 
					 | 
				
			||||||
    input[i] *= dq[i];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  vp9_short_iwalsh4x4_c(input, output, 4 << 1);
 | 
					 | 
				
			||||||
  vpx_memset(input, 0, 32);
 | 
					 | 
				
			||||||
  vp9_add_residual_4x4(output, dest, stride);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_idct_add_8x8_c(int16_t *input, const int16_t *dq,
 | 
					 | 
				
			||||||
                                uint8_t *dest, int stride, int eob) {
 | 
					 | 
				
			||||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 64);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // If dc is 1, then input[0] is the reconstructed value, do not need
 | 
					 | 
				
			||||||
  // dequantization. Also, when dc is 1, dc is counted in eobs, namely eobs >=1.
 | 
					 | 
				
			||||||
  input[0] *= dq[0];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // The calculation can be simplified if there are not many non-zero dct
 | 
					 | 
				
			||||||
  // coefficients. Use eobs to decide what to do.
 | 
					 | 
				
			||||||
  // TODO(yunqingwang): "eobs = 1" case is also handled in vp9_short_idct8x8_c.
 | 
					 | 
				
			||||||
  // Combine that with code here.
 | 
					 | 
				
			||||||
  if (eob) {
 | 
					 | 
				
			||||||
    if (eob == 1) {
 | 
					 | 
				
			||||||
      // DC only DCT coefficient
 | 
					 | 
				
			||||||
      int16_t in = input[0];
 | 
					 | 
				
			||||||
      int16_t out;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // Note: the idct1 will need to be modified accordingly whenever
 | 
					 | 
				
			||||||
      // vp9_short_idct8x8_c() is modified.
 | 
					 | 
				
			||||||
      vp9_short_idct1_8x8_c(&in, &out);
 | 
					 | 
				
			||||||
      input[0] = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      vp9_add_constant_residual_8x8(out, dest, stride);
 | 
					 | 
				
			||||||
#if !CONFIG_SCATTERSCAN
 | 
					 | 
				
			||||||
    } else if (eob <= 10) {
 | 
					 | 
				
			||||||
      input[1] *= dq[1];
 | 
					 | 
				
			||||||
      input[2] *= dq[1];
 | 
					 | 
				
			||||||
      input[3] *= dq[1];
 | 
					 | 
				
			||||||
      input[8] *= dq[1];
 | 
					 | 
				
			||||||
      input[9] *= dq[1];
 | 
					 | 
				
			||||||
      input[10] *= dq[1];
 | 
					 | 
				
			||||||
      input[16] *= dq[1];
 | 
					 | 
				
			||||||
      input[17] *= dq[1];
 | 
					 | 
				
			||||||
      input[24] *= dq[1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      vp9_short_idct10_8x8(input, output, 16);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      input[0] = input[1] = input[2] = input[3] = 0;
 | 
					 | 
				
			||||||
      input[8] = input[9] = input[10] = 0;
 | 
					 | 
				
			||||||
      input[16] = input[17] = 0;
 | 
					 | 
				
			||||||
      input[24] = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      vp9_add_residual_8x8(output, dest, stride);
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
      int i;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // recover quantizer for 4 4x4 blocks
 | 
					 | 
				
			||||||
      for (i = 1; i < 64; i++)
 | 
					 | 
				
			||||||
        input[i] *= dq[1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // the idct halves ( >> 1) the pitch
 | 
					 | 
				
			||||||
      vp9_short_idct8x8(input, output, 8 << 1);
 | 
					 | 
				
			||||||
      vpx_memset(input, 0, 128);
 | 
					 | 
				
			||||||
      vp9_add_residual_8x8(output, dest, stride);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_iht_add_16x16_c(TX_TYPE tx_type, int16_t *input,
 | 
					 | 
				
			||||||
                                 const int16_t *dq,
 | 
					 | 
				
			||||||
                                 uint8_t *dest, int stride,
 | 
					 | 
				
			||||||
                                 int eob) {
 | 
					 | 
				
			||||||
  if (tx_type == DCT_DCT) {
 | 
					 | 
				
			||||||
    vp9_dequant_idct_add_16x16(input, dq, dest, stride, eob);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    DECLARE_ALIGNED_ARRAY(16, int16_t, output, 256);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (eob > 0) {
 | 
					 | 
				
			||||||
      int i;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      input[0] *= dq[0];
 | 
					 | 
				
			||||||
      for (i = 1; i < 256; i++)
 | 
					 | 
				
			||||||
        input[i] *= dq[1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      vp9_short_iht16x16(input, output, 16, tx_type);
 | 
					 | 
				
			||||||
      vpx_memset(input, 0, 512);
 | 
					 | 
				
			||||||
      vp9_add_residual_16x16(output, dest, stride);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq,
 | 
					 | 
				
			||||||
                                  uint8_t *dest, int stride, int eob) {
 | 
					 | 
				
			||||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 256);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /* The calculation can be simplified if there are not many non-zero dct
 | 
					 | 
				
			||||||
   * coefficients. Use eobs to separate different cases. */
 | 
					 | 
				
			||||||
  if (eob) {
 | 
					 | 
				
			||||||
    if (eob == 1) {
 | 
					 | 
				
			||||||
      /* DC only DCT coefficient. */
 | 
					 | 
				
			||||||
      int16_t in = input[0] * dq[0];
 | 
					 | 
				
			||||||
      int16_t out;
 | 
					 | 
				
			||||||
      /* Note: the idct1 will need to be modified accordingly whenever
 | 
					 | 
				
			||||||
       * vp9_short_idct16x16() is modified. */
 | 
					 | 
				
			||||||
      vp9_short_idct1_16x16_c(&in, &out);
 | 
					 | 
				
			||||||
      input[0] = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      vp9_add_constant_residual_16x16(out, dest, stride);
 | 
					 | 
				
			||||||
#if !CONFIG_SCATTERSCAN
 | 
					 | 
				
			||||||
    } else if (eob <= 10) {
 | 
					 | 
				
			||||||
      input[0] *= dq[0];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      input[1] *= dq[1];
 | 
					 | 
				
			||||||
      input[2] *= dq[1];
 | 
					 | 
				
			||||||
      input[3] *= dq[1];
 | 
					 | 
				
			||||||
      input[16] *= dq[1];
 | 
					 | 
				
			||||||
      input[17] *= dq[1];
 | 
					 | 
				
			||||||
      input[18] *= dq[1];
 | 
					 | 
				
			||||||
      input[32] *= dq[1];
 | 
					 | 
				
			||||||
      input[33] *= dq[1];
 | 
					 | 
				
			||||||
      input[48] *= dq[1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // the idct halves ( >> 1) the pitch
 | 
					 | 
				
			||||||
      vp9_short_idct10_16x16(input, output, 32);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      input[0] = input[1] = input[2] = input[3] = 0;
 | 
					 | 
				
			||||||
      input[16] = input[17] = input[18] = 0;
 | 
					 | 
				
			||||||
      input[32] = input[33] = 0;
 | 
					 | 
				
			||||||
      input[48] = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      vp9_add_residual_16x16(output, dest, stride);
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
      int i;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      input[0] *= dq[0];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // recover quantizer for 4 4x4 blocks
 | 
					 | 
				
			||||||
      for (i = 1; i < 256; i++)
 | 
					 | 
				
			||||||
        input[i] *= dq[1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // the idct halves ( >> 1) the pitch
 | 
					 | 
				
			||||||
      vp9_short_idct16x16(input, output, 16 << 1);
 | 
					 | 
				
			||||||
      vpx_memset(input, 0, 512);
 | 
					 | 
				
			||||||
      vp9_add_residual_16x16(output, dest, stride);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_idct_add_32x32_c(int16_t *input, const int16_t *dq,
 | 
					 | 
				
			||||||
                                  uint8_t *dest, int stride, int eob) {
 | 
					 | 
				
			||||||
  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 1024);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (eob) {
 | 
					 | 
				
			||||||
    input[0] = input[0] * dq[0] / 2;
 | 
					 | 
				
			||||||
    if (eob == 1) {
 | 
					 | 
				
			||||||
      vp9_short_idct1_32x32(input, output);
 | 
					 | 
				
			||||||
      vp9_add_constant_residual_32x32(output[0], dest, stride);
 | 
					 | 
				
			||||||
      input[0] = 0;
 | 
					 | 
				
			||||||
#if !CONFIG_SCATTERSCAN
 | 
					 | 
				
			||||||
    } else if (eob <= 10) {
 | 
					 | 
				
			||||||
      input[1] = input[1] * dq[1] / 2;
 | 
					 | 
				
			||||||
      input[2] = input[2] * dq[1] / 2;
 | 
					 | 
				
			||||||
      input[3] = input[3] * dq[1] / 2;
 | 
					 | 
				
			||||||
      input[32] = input[32] * dq[1] / 2;
 | 
					 | 
				
			||||||
      input[33] = input[33] * dq[1] / 2;
 | 
					 | 
				
			||||||
      input[34] = input[34] * dq[1] / 2;
 | 
					 | 
				
			||||||
      input[64] = input[64] * dq[1] / 2;
 | 
					 | 
				
			||||||
      input[65] = input[65] * dq[1] / 2;
 | 
					 | 
				
			||||||
      input[96] = input[96] * dq[1] / 2;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // the idct halves ( >> 1) the pitch
 | 
					 | 
				
			||||||
      vp9_short_idct10_32x32(input, output, 64);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      input[0] = input[1] = input[2] = input[3] = 0;
 | 
					 | 
				
			||||||
      input[32] = input[33] = input[34] = 0;
 | 
					 | 
				
			||||||
      input[64] = input[65] = 0;
 | 
					 | 
				
			||||||
      input[96] = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      vp9_add_residual_32x32(output, dest, stride);
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
      int i;
 | 
					 | 
				
			||||||
      for (i = 1; i < 1024; i++)
 | 
					 | 
				
			||||||
        input[i] = input[i] * dq[1] / 2;
 | 
					 | 
				
			||||||
      vp9_short_idct32x32(input, output, 64);
 | 
					 | 
				
			||||||
      vpx_memset(input, 0, 2048);
 | 
					 | 
				
			||||||
      vp9_add_residual_32x32(output, dest, stride);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,52 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  Use of this source code is governed by a BSD-style license
 | 
					 | 
				
			||||||
 *  that can be found in the LICENSE file in the root of the source
 | 
					 | 
				
			||||||
 *  tree. An additional intellectual property rights grant can be found
 | 
					 | 
				
			||||||
 *  in the file PATENTS.  All contributing project authors may
 | 
					 | 
				
			||||||
 *  be found in the AUTHORS file in the root of the source tree.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef VP9_DECODER_VP9_DEQUANTIZE_H_
 | 
					 | 
				
			||||||
#define VP9_DECODER_VP9_DEQUANTIZE_H_
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "vp9/common/vp9_blockd.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_idct_add_lossless_c(int16_t *input, const int16_t *dq,
 | 
					 | 
				
			||||||
                                     unsigned char *dest, int stride, int eob);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_dc_idct_add_lossless_c(int16_t *input, const int16_t *dq,
 | 
					 | 
				
			||||||
                                        unsigned char *output, int stride,
 | 
					 | 
				
			||||||
                                        int dc);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_dc_idct_add_y_block_lossless_c(int16_t *q,
 | 
					 | 
				
			||||||
                                                const int16_t *dq,
 | 
					 | 
				
			||||||
                                                unsigned char *pre,
 | 
					 | 
				
			||||||
                                                unsigned char *dst,
 | 
					 | 
				
			||||||
                                                int stride,
 | 
					 | 
				
			||||||
                                                const int16_t *dc);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_idct_add_y_block_lossless_c(int16_t *q, const int16_t *dq,
 | 
					 | 
				
			||||||
                                             unsigned char *dst, int stride,
 | 
					 | 
				
			||||||
                                             struct macroblockd *xd);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_idct_add_uv_block_lossless_c(int16_t *q, const int16_t *dq,
 | 
					 | 
				
			||||||
                                              unsigned char *dst,
 | 
					 | 
				
			||||||
                                              int stride,
 | 
					 | 
				
			||||||
                                              uint16_t *eobs);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_iht_add_c(TX_TYPE tx_type, int16_t *input, const int16_t *dq,
 | 
					 | 
				
			||||||
                           unsigned char *dest, int stride, int eob);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_iht_add_8x8_c(TX_TYPE tx_type, int16_t *input,
 | 
					 | 
				
			||||||
                               const int16_t *dq,  unsigned char *dest,
 | 
					 | 
				
			||||||
                               int stride, int eob);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void vp9_dequant_iht_add_16x16_c(TX_TYPE tx_type, int16_t *input,
 | 
					 | 
				
			||||||
                                 const int16_t *dq, unsigned char *dest,
 | 
					 | 
				
			||||||
                                 int stride, int eob);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif  // VP9_DECODER_VP9_DEQUANTIZE_H_
 | 
					 | 
				
			||||||
@@ -85,7 +85,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define WRITE_COEF_CONTINUE(val, token)                  \
 | 
					#define WRITE_COEF_CONTINUE(val, token)                  \
 | 
				
			||||||
  {                                                      \
 | 
					  {                                                      \
 | 
				
			||||||
    qcoeff_ptr[scan[c]] = vp9_read_and_apply_sign(r, val); \
 | 
					    qcoeff_ptr[scan[c]] = vp9_read_and_apply_sign(r, val) * dq[c > 0]; \
 | 
				
			||||||
    INCREMENT_COUNT(token);                              \
 | 
					    INCREMENT_COUNT(token);                              \
 | 
				
			||||||
    c++;                                                 \
 | 
					    c++;                                                 \
 | 
				
			||||||
    continue;                                            \
 | 
					    continue;                                            \
 | 
				
			||||||
@@ -106,7 +106,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
 | 
				
			|||||||
static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
 | 
					static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
 | 
				
			||||||
                        vp9_reader *r, int block_idx,
 | 
					                        vp9_reader *r, int block_idx,
 | 
				
			||||||
                        PLANE_TYPE type, int seg_eob, int16_t *qcoeff_ptr,
 | 
					                        PLANE_TYPE type, int seg_eob, int16_t *qcoeff_ptr,
 | 
				
			||||||
                        TX_SIZE txfm_size) {
 | 
					                        TX_SIZE txfm_size, const int16_t *dq) {
 | 
				
			||||||
  ENTROPY_CONTEXT* const A0 = (ENTROPY_CONTEXT *) xd->above_context;
 | 
					  ENTROPY_CONTEXT* const A0 = (ENTROPY_CONTEXT *) xd->above_context;
 | 
				
			||||||
  ENTROPY_CONTEXT* const L0 = (ENTROPY_CONTEXT *) xd->left_context;
 | 
					  ENTROPY_CONTEXT* const L0 = (ENTROPY_CONTEXT *) xd->left_context;
 | 
				
			||||||
  int aidx, lidx;
 | 
					  int aidx, lidx;
 | 
				
			||||||
@@ -425,6 +425,7 @@ struct decode_block_args {
 | 
				
			|||||||
  MACROBLOCKD *xd;
 | 
					  MACROBLOCKD *xd;
 | 
				
			||||||
  vp9_reader *r;
 | 
					  vp9_reader *r;
 | 
				
			||||||
  int *eobtotal;
 | 
					  int *eobtotal;
 | 
				
			||||||
 | 
					  const int16_t *dq;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
static void decode_block(int plane, int block,
 | 
					static void decode_block(int plane, int block,
 | 
				
			||||||
                         BLOCK_SIZE_TYPE bsize,
 | 
					                         BLOCK_SIZE_TYPE bsize,
 | 
				
			||||||
@@ -444,7 +445,7 @@ static void decode_block(int plane, int block,
 | 
				
			|||||||
  const int eob = decode_coefs(arg->pbi, arg->xd, arg->r, old_block_idx,
 | 
					  const int eob = decode_coefs(arg->pbi, arg->xd, arg->r, old_block_idx,
 | 
				
			||||||
                               arg->xd->plane[plane].plane_type, seg_eob,
 | 
					                               arg->xd->plane[plane].plane_type, seg_eob,
 | 
				
			||||||
                               BLOCK_OFFSET(qcoeff_base, block, 16),
 | 
					                               BLOCK_OFFSET(qcoeff_base, block, 16),
 | 
				
			||||||
                               ss_tx_size);
 | 
					                               ss_tx_size, arg->dq);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  arg->xd->plane[plane].eobs[block] = eob;
 | 
					  arg->xd->plane[plane].eobs[block] = eob;
 | 
				
			||||||
  arg->eobtotal[0] += eob;
 | 
					  arg->eobtotal[0] += eob;
 | 
				
			||||||
@@ -453,9 +454,10 @@ static void decode_block(int plane, int block,
 | 
				
			|||||||
int vp9_decode_tokens(VP9D_COMP* const pbi,
 | 
					int vp9_decode_tokens(VP9D_COMP* const pbi,
 | 
				
			||||||
                         MACROBLOCKD* const xd,
 | 
					                         MACROBLOCKD* const xd,
 | 
				
			||||||
                         vp9_reader *r,
 | 
					                         vp9_reader *r,
 | 
				
			||||||
                         BLOCK_SIZE_TYPE bsize) {
 | 
					                         BLOCK_SIZE_TYPE bsize,
 | 
				
			||||||
 | 
					                         const int16_t *dq) {
 | 
				
			||||||
  int eobtotal = 0;
 | 
					  int eobtotal = 0;
 | 
				
			||||||
  struct decode_block_args args = {pbi, xd, r, &eobtotal};
 | 
					  struct decode_block_args args = {pbi, xd, r, &eobtotal, dq};
 | 
				
			||||||
  foreach_transformed_block(xd, bsize, decode_block, &args);
 | 
					  foreach_transformed_block(xd, bsize, decode_block, &args);
 | 
				
			||||||
  return eobtotal;
 | 
					  return eobtotal;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -463,10 +465,12 @@ int vp9_decode_tokens(VP9D_COMP* const pbi,
 | 
				
			|||||||
#if CONFIG_NEWBINTRAMODES
 | 
					#if CONFIG_NEWBINTRAMODES
 | 
				
			||||||
static int decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
 | 
					static int decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
 | 
				
			||||||
                            vp9_reader *r,
 | 
					                            vp9_reader *r,
 | 
				
			||||||
                            PLANE_TYPE type, int i, int seg_eob) {
 | 
					                            PLANE_TYPE type, int i, int seg_eob,
 | 
				
			||||||
 | 
					                            const int16_t *dq) {
 | 
				
			||||||
  const struct plane_block_idx pb_idx = plane_block_idx(16, i);
 | 
					  const struct plane_block_idx pb_idx = plane_block_idx(16, i);
 | 
				
			||||||
  const int c = decode_coefs(dx, xd, r, i, type, seg_eob,
 | 
					  const int c = decode_coefs(dx, xd, r, i, type, seg_eob,
 | 
				
			||||||
      BLOCK_OFFSET(xd->plane[pb_idx.plane].qcoeff, pb_idx.block, 16), TX_4X4);
 | 
					      BLOCK_OFFSET(xd->plane[pb_idx.plane].qcoeff, pb_idx.block, 16), TX_4X4,
 | 
				
			||||||
 | 
					      dq);
 | 
				
			||||||
  xd->plane[pb_idx.plane].eobs[pb_idx.block] = c;
 | 
					  xd->plane[pb_idx.plane].eobs[pb_idx.block] = c;
 | 
				
			||||||
  return c;
 | 
					  return c;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -474,30 +478,31 @@ static int decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
 | 
				
			|||||||
static int decode_mb_tokens_4x4_uv(VP9D_COMP* const dx,
 | 
					static int decode_mb_tokens_4x4_uv(VP9D_COMP* const dx,
 | 
				
			||||||
                                   MACROBLOCKD* const xd,
 | 
					                                   MACROBLOCKD* const xd,
 | 
				
			||||||
                                   vp9_reader *r,
 | 
					                                   vp9_reader *r,
 | 
				
			||||||
                                   int seg_eob) {
 | 
					                                   int seg_eob,
 | 
				
			||||||
 | 
					                                   const int16_t *dq) {
 | 
				
			||||||
  int i, eobtotal = 0;
 | 
					  int i, eobtotal = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // chroma blocks
 | 
					  // chroma blocks
 | 
				
			||||||
  for (i = 16; i < 24; i++)
 | 
					  for (i = 16; i < 24; i++)
 | 
				
			||||||
    eobtotal += decode_coefs_4x4(dx, xd, r, PLANE_TYPE_UV, i, seg_eob);
 | 
					    eobtotal += decode_coefs_4x4(dx, xd, r, PLANE_TYPE_UV, i, seg_eob, dq);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return eobtotal;
 | 
					  return eobtotal;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx,
 | 
					int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx,
 | 
				
			||||||
                                MACROBLOCKD* const xd,
 | 
					                                MACROBLOCKD* const xd,
 | 
				
			||||||
                                vp9_reader *r) {
 | 
					                                vp9_reader *r, const int16_t *dq) {
 | 
				
			||||||
  const int segment_id = xd->mode_info_context->mbmi.segment_id;
 | 
					  const int segment_id = xd->mode_info_context->mbmi.segment_id;
 | 
				
			||||||
  const int seg_eob = get_eob(xd, segment_id, 16);
 | 
					  const int seg_eob = get_eob(xd, segment_id, 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return decode_mb_tokens_4x4_uv(dx, xd, r, seg_eob);
 | 
					  return decode_mb_tokens_4x4_uv(dx, xd, r, seg_eob, dq);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int vp9_decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
 | 
					int vp9_decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
 | 
				
			||||||
                         vp9_reader *r,
 | 
					                         vp9_reader *r,
 | 
				
			||||||
                         PLANE_TYPE type, int i) {
 | 
					                         PLANE_TYPE type, int i, const int16_t *dq) {
 | 
				
			||||||
  const int segment_id = xd->mode_info_context->mbmi.segment_id;
 | 
					  const int segment_id = xd->mode_info_context->mbmi.segment_id;
 | 
				
			||||||
  const int seg_eob = get_eob(xd, segment_id, 16);
 | 
					  const int seg_eob = get_eob(xd, segment_id, 16);
 | 
				
			||||||
  return decode_coefs_4x4(dx, xd, r, type, i, seg_eob);
 | 
					  return decode_coefs_4x4(dx, xd, r, type, i, seg_eob, dq);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,14 +17,15 @@
 | 
				
			|||||||
int vp9_decode_tokens(VP9D_COMP* const pbi,
 | 
					int vp9_decode_tokens(VP9D_COMP* const pbi,
 | 
				
			||||||
                      MACROBLOCKD* const xd,
 | 
					                      MACROBLOCKD* const xd,
 | 
				
			||||||
                      vp9_reader *r,
 | 
					                      vp9_reader *r,
 | 
				
			||||||
                      BLOCK_SIZE_TYPE bsize);
 | 
					                      BLOCK_SIZE_TYPE bsize,
 | 
				
			||||||
 | 
					                      const int16_t *dq);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx, MACROBLOCKD* const xd,
 | 
					 | 
				
			||||||
                                vp9_reader *r);
 | 
					 | 
				
			||||||
#if CONFIG_NEWBINTRAMODES
 | 
					#if CONFIG_NEWBINTRAMODES
 | 
				
			||||||
 | 
					int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx, MACROBLOCKD* const xd,
 | 
				
			||||||
 | 
					                                vp9_reader *r, const int16_t *dq);
 | 
				
			||||||
int vp9_decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
 | 
					int vp9_decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
 | 
				
			||||||
                         vp9_reader *r,
 | 
					                         vp9_reader *r,
 | 
				
			||||||
                         PLANE_TYPE type, int i);
 | 
					                         PLANE_TYPE type, int i, const int16_t *dq);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif  // VP9_DECODER_VP9_DETOKENIZE_H_
 | 
					#endif  // VP9_DECODER_VP9_DETOKENIZE_H_
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,15 +10,15 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "vp9_rtcd.h"
 | 
					#include "vp9_rtcd.h"
 | 
				
			||||||
#include "vp9/common/vp9_blockd.h"
 | 
					#include "vp9/common/vp9_blockd.h"
 | 
				
			||||||
#include "vp9/decoder/vp9_dequantize.h"
 | 
					#include "vp9/decoder/vp9_idct_blk.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vp9_dequant_idct_add_y_block_c(int16_t *q, const int16_t *dq,
 | 
					void vp9_idct_add_y_block_c(int16_t *q, uint8_t *dst, int stride,
 | 
				
			||||||
                                    uint8_t *dst, int stride, MACROBLOCKD *xd) {
 | 
					                            MACROBLOCKD *xd) {
 | 
				
			||||||
  int i, j;
 | 
					  int i, j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for (i = 0; i < 4; i++) {
 | 
					  for (i = 0; i < 4; i++) {
 | 
				
			||||||
    for (j = 0; j < 4; j++) {
 | 
					    for (j = 0; j < 4; j++) {
 | 
				
			||||||
      vp9_dequant_idct_add(q, dq, dst, stride, xd->plane[0].eobs[i * 4  + j]);
 | 
					      vp9_idct_add(q, dst, stride, xd->plane[0].eobs[i * 4  + j]);
 | 
				
			||||||
      q   += 16;
 | 
					      q   += 16;
 | 
				
			||||||
      dst += 4;
 | 
					      dst += 4;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -27,13 +27,13 @@ void vp9_dequant_idct_add_y_block_c(int16_t *q, const int16_t *dq,
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vp9_dequant_idct_add_uv_block_c(int16_t *q, const int16_t *dq,
 | 
					void vp9_idct_add_uv_block_c(int16_t *q, uint8_t *dst, int stride,
 | 
				
			||||||
                                     uint8_t *dst, int stride, uint16_t *eobs) {
 | 
					                             uint16_t *eobs) {
 | 
				
			||||||
  int i, j;
 | 
					  int i, j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for (i = 0; i < 2; i++) {
 | 
					  for (i = 0; i < 2; i++) {
 | 
				
			||||||
    for (j = 0; j < 2; j++) {
 | 
					    for (j = 0; j < 2; j++) {
 | 
				
			||||||
      vp9_dequant_idct_add(q, dq, dst, stride, eobs[i * 2 + j]);
 | 
					      vp9_idct_add(q, dst, stride, eobs[i * 2 + j]);
 | 
				
			||||||
      q   += 16;
 | 
					      q   += 16;
 | 
				
			||||||
      dst += 4;
 | 
					      dst += 4;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -42,29 +42,25 @@ void vp9_dequant_idct_add_uv_block_c(int16_t *q, const int16_t *dq,
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vp9_dequant_idct_add_y_block_8x8_c(int16_t *q, const int16_t *dq,
 | 
					void vp9_idct_add_y_block_8x8_c(int16_t *q, uint8_t *dst, int stride,
 | 
				
			||||||
                                        uint8_t *dst, int stride,
 | 
					                                MACROBLOCKD *xd) {
 | 
				
			||||||
                                        MACROBLOCKD *xd) {
 | 
					 | 
				
			||||||
  uint8_t *origdest = dst;
 | 
					  uint8_t *origdest = dst;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vp9_dequant_idct_add_8x8_c(q, dq, dst, stride, xd->plane[0].eobs[0]);
 | 
					  vp9_idct_add_8x8_c(q, dst, stride, xd->plane[0].eobs[0]);
 | 
				
			||||||
  vp9_dequant_idct_add_8x8_c(&q[64], dq, origdest + 8, stride,
 | 
					  vp9_idct_add_8x8_c(&q[64], origdest + 8, stride, xd->plane[0].eobs[4]);
 | 
				
			||||||
                             xd->plane[0].eobs[4]);
 | 
					  vp9_idct_add_8x8_c(&q[128], origdest + 8 * stride, stride,
 | 
				
			||||||
  vp9_dequant_idct_add_8x8_c(&q[128], dq, origdest + 8 * stride, stride,
 | 
					                     xd->plane[0].eobs[8]);
 | 
				
			||||||
                             xd->plane[0].eobs[8]);
 | 
					  vp9_idct_add_8x8_c(&q[192], origdest + 8 * stride + 8, stride,
 | 
				
			||||||
  vp9_dequant_idct_add_8x8_c(&q[192], dq, origdest + 8 * stride + 8, stride,
 | 
					                     xd->plane[0].eobs[12]);
 | 
				
			||||||
                             xd->plane[0].eobs[12]);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vp9_dequant_idct_add_y_block_lossless_c(int16_t *q, const int16_t *dq,
 | 
					void vp9_idct_add_y_block_lossless_c(int16_t *q, uint8_t *dst, int stride,
 | 
				
			||||||
                                             uint8_t *dst, int stride,
 | 
					                                     MACROBLOCKD *xd) {
 | 
				
			||||||
                                             MACROBLOCKD *xd) {
 | 
					 | 
				
			||||||
  int i, j;
 | 
					  int i, j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for (i = 0; i < 4; i++) {
 | 
					  for (i = 0; i < 4; i++) {
 | 
				
			||||||
    for (j = 0; j < 4; j++) {
 | 
					    for (j = 0; j < 4; j++) {
 | 
				
			||||||
      vp9_dequant_idct_add_lossless_c(q, dq, dst, stride,
 | 
					      vp9_idct_add_lossless_c(q, dst, stride, xd->plane[0].eobs[i * 4 + j]);
 | 
				
			||||||
                                      xd->plane[0].eobs[i * 4 + j]);
 | 
					 | 
				
			||||||
      q   += 16;
 | 
					      q   += 16;
 | 
				
			||||||
      dst += 4;
 | 
					      dst += 4;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -73,14 +69,13 @@ void vp9_dequant_idct_add_y_block_lossless_c(int16_t *q, const int16_t *dq,
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vp9_dequant_idct_add_uv_block_lossless_c(int16_t *q, const int16_t *dq,
 | 
					void vp9_idct_add_uv_block_lossless_c(int16_t *q, uint8_t *dst, int stride,
 | 
				
			||||||
                                              uint8_t *dst, int stride,
 | 
					                                      uint16_t *eobs) {
 | 
				
			||||||
                                              uint16_t *eobs) {
 | 
					 | 
				
			||||||
  int i, j;
 | 
					  int i, j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for (i = 0; i < 2; i++) {
 | 
					  for (i = 0; i < 2; i++) {
 | 
				
			||||||
    for (j = 0; j < 2; j++) {
 | 
					    for (j = 0; j < 2; j++) {
 | 
				
			||||||
      vp9_dequant_idct_add_lossless_c(q, dq, dst, stride, eobs[i * 2 + j]);
 | 
					      vp9_idct_add_lossless_c(q, dst, stride, eobs[i * 2 + j]);
 | 
				
			||||||
      q   += 16;
 | 
					      q   += 16;
 | 
				
			||||||
      dst += 4;
 | 
					      dst += 4;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -89,3 +84,273 @@ void vp9_dequant_idct_add_uv_block_lossless_c(int16_t *q, const int16_t *dq,
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void add_residual(const int16_t *diff, uint8_t *dest, int stride,
 | 
				
			||||||
 | 
					                         int width, int height) {
 | 
				
			||||||
 | 
					  int r, c;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  for (r = 0; r < height; r++) {
 | 
				
			||||||
 | 
					    for (c = 0; c < width; c++)
 | 
				
			||||||
 | 
					      dest[c] = clip_pixel(diff[c] + dest[c]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dest += stride;
 | 
				
			||||||
 | 
					    diff += width;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_add_residual_4x4_c(const int16_t *diff, uint8_t *dest, int stride) {
 | 
				
			||||||
 | 
					  add_residual(diff, dest, stride, 4, 4);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_add_residual_8x8_c(const int16_t *diff, uint8_t *dest, int stride) {
 | 
				
			||||||
 | 
					  add_residual(diff, dest, stride, 8, 8);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_add_residual_16x16_c(const int16_t *diff, uint8_t *dest, int stride) {
 | 
				
			||||||
 | 
					  add_residual(diff, dest, stride, 16, 16);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_add_residual_32x32_c(const int16_t *diff, uint8_t *dest, int stride) {
 | 
				
			||||||
 | 
					  add_residual(diff, dest, stride, 32, 32);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void add_constant_residual(const int16_t diff, uint8_t *dest, int stride,
 | 
				
			||||||
 | 
					                                  int width, int height) {
 | 
				
			||||||
 | 
					  int r, c;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  for (r = 0; r < height; r++) {
 | 
				
			||||||
 | 
					    for (c = 0; c < width; c++)
 | 
				
			||||||
 | 
					      dest[c] = clip_pixel(diff + dest[c]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dest += stride;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_add_constant_residual_8x8_c(const int16_t diff, uint8_t *dest,
 | 
				
			||||||
 | 
					                                     int stride) {
 | 
				
			||||||
 | 
					  add_constant_residual(diff, dest, stride, 8, 8);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_add_constant_residual_16x16_c(const int16_t diff, uint8_t *dest,
 | 
				
			||||||
 | 
					                                       int stride) {
 | 
				
			||||||
 | 
					  add_constant_residual(diff, dest, stride, 16, 16);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_add_constant_residual_32x32_c(const int16_t diff,  uint8_t *dest,
 | 
				
			||||||
 | 
					                                       int stride) {
 | 
				
			||||||
 | 
					  add_constant_residual(diff, dest, stride, 32, 32);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_iht_add_c(TX_TYPE tx_type, int16_t *input, uint8_t *dest, int stride,
 | 
				
			||||||
 | 
					                   int eob) {
 | 
				
			||||||
 | 
					  if (tx_type == DCT_DCT) {
 | 
				
			||||||
 | 
					    vp9_idct_add(input, dest, stride, eob);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    vp9_short_iht4x4(input, output, 4, tx_type);
 | 
				
			||||||
 | 
					    vpx_memset(input, 0, 32);
 | 
				
			||||||
 | 
					    vp9_add_residual_4x4(output, dest, stride);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_iht_add_8x8_c(TX_TYPE tx_type, int16_t *input, uint8_t *dest,
 | 
				
			||||||
 | 
					                       int stride, int eob) {
 | 
				
			||||||
 | 
					  if (tx_type == DCT_DCT) {
 | 
				
			||||||
 | 
					    vp9_idct_add_8x8(input, dest, stride, eob);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    if (eob > 0) {
 | 
				
			||||||
 | 
					      DECLARE_ALIGNED_ARRAY(16, int16_t, output, 64);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vp9_short_iht8x8(input, output, 8, tx_type);
 | 
				
			||||||
 | 
					      vpx_memset(input, 0, 128);
 | 
				
			||||||
 | 
					      vp9_add_residual_8x8(output, dest, stride);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_idct_add_c(int16_t *input, uint8_t *dest, int stride, int eob) {
 | 
				
			||||||
 | 
					  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (eob > 1) {
 | 
				
			||||||
 | 
					    // the idct halves ( >> 1) the pitch
 | 
				
			||||||
 | 
					    vp9_short_idct4x4(input, output, 4 << 1);
 | 
				
			||||||
 | 
					    vpx_memset(input, 0, 32);
 | 
				
			||||||
 | 
					    vp9_add_residual_4x4(output, dest, stride);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    vp9_dc_only_idct_add(input[0], dest, dest, stride, stride);
 | 
				
			||||||
 | 
					    ((int *)input)[0] = 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_dc_idct_add_c(int16_t *input, uint8_t *dest, int stride, int dc) {
 | 
				
			||||||
 | 
					  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  input[0] = dc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // the idct halves ( >> 1) the pitch
 | 
				
			||||||
 | 
					  vp9_short_idct4x4(input, output, 4 << 1);
 | 
				
			||||||
 | 
					  vpx_memset(input, 0, 32);
 | 
				
			||||||
 | 
					  vp9_add_residual_4x4(output, dest, stride);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_idct_add_lossless_c(int16_t *input, uint8_t *dest, int stride,
 | 
				
			||||||
 | 
					                             int eob) {
 | 
				
			||||||
 | 
					  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (eob > 1) {
 | 
				
			||||||
 | 
					    vp9_short_iwalsh4x4_c(input, output, 4 << 1);
 | 
				
			||||||
 | 
					    vpx_memset(input, 0, 32);
 | 
				
			||||||
 | 
					    vp9_add_residual_4x4(output, dest, stride);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    vp9_dc_only_inv_walsh_add(input[0], dest, dest, stride, stride);
 | 
				
			||||||
 | 
					    ((int *)input)[0] = 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_dc_idct_add_lossless_c(int16_t *input, uint8_t *dest,
 | 
				
			||||||
 | 
					                                int stride, int dc) {
 | 
				
			||||||
 | 
					  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  input[0] = dc;
 | 
				
			||||||
 | 
					  vp9_short_iwalsh4x4_c(input, output, 4 << 1);
 | 
				
			||||||
 | 
					  vpx_memset(input, 0, 32);
 | 
				
			||||||
 | 
					  vp9_add_residual_4x4(output, dest, stride);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_idct_add_8x8_c(int16_t *input, uint8_t *dest, int stride, int eob) {
 | 
				
			||||||
 | 
					  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 64);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // If dc is 1, then input[0] is the reconstructed value, do not need
 | 
				
			||||||
 | 
					  // dequantization. Also, when dc is 1, dc is counted in eobs, namely eobs >=1.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // The calculation can be simplified if there are not many non-zero dct
 | 
				
			||||||
 | 
					  // coefficients. Use eobs to decide what to do.
 | 
				
			||||||
 | 
					  // TODO(yunqingwang): "eobs = 1" case is also handled in vp9_short_idct8x8_c.
 | 
				
			||||||
 | 
					  // Combine that with code here.
 | 
				
			||||||
 | 
					  if (eob) {
 | 
				
			||||||
 | 
					    if (eob == 1) {
 | 
				
			||||||
 | 
					      // DC only DCT coefficient
 | 
				
			||||||
 | 
					      int16_t in = input[0];
 | 
				
			||||||
 | 
					      int16_t out;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // Note: the idct1 will need to be modified accordingly whenever
 | 
				
			||||||
 | 
					      // vp9_short_idct8x8_c() is modified.
 | 
				
			||||||
 | 
					      vp9_short_idct1_8x8_c(&in, &out);
 | 
				
			||||||
 | 
					      input[0] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vp9_add_constant_residual_8x8(out, dest, stride);
 | 
				
			||||||
 | 
					#if !CONFIG_SCATTERSCAN
 | 
				
			||||||
 | 
					    } else if (eob <= 10) {
 | 
				
			||||||
 | 
					      vp9_short_idct10_8x8(input, output, 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      input[0] = input[1] = input[2] = input[3] = 0;
 | 
				
			||||||
 | 
					      input[8] = input[9] = input[10] = 0;
 | 
				
			||||||
 | 
					      input[16] = input[17] = 0;
 | 
				
			||||||
 | 
					      input[24] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vp9_add_residual_8x8(output, dest, stride);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      // the idct halves ( >> 1) the pitch
 | 
				
			||||||
 | 
					      vp9_short_idct8x8(input, output, 8 << 1);
 | 
				
			||||||
 | 
					      vpx_memset(input, 0, 128);
 | 
				
			||||||
 | 
					      vp9_add_residual_8x8(output, dest, stride);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_iht_add_16x16_c(TX_TYPE tx_type, int16_t *input, uint8_t *dest,
 | 
				
			||||||
 | 
					                         int stride, int eob) {
 | 
				
			||||||
 | 
					  if (tx_type == DCT_DCT) {
 | 
				
			||||||
 | 
					    vp9_idct_add_16x16(input, dest, stride, eob);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    DECLARE_ALIGNED_ARRAY(16, int16_t, output, 256);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (eob > 0) {
 | 
				
			||||||
 | 
					      vp9_short_iht16x16(input, output, 16, tx_type);
 | 
				
			||||||
 | 
					      vpx_memset(input, 0, 512);
 | 
				
			||||||
 | 
					      vp9_add_residual_16x16(output, dest, stride);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_idct_add_16x16_c(int16_t *input, uint8_t *dest, int stride, int eob) {
 | 
				
			||||||
 | 
					  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 256);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /* The calculation can be simplified if there are not many non-zero dct
 | 
				
			||||||
 | 
					   * coefficients. Use eobs to separate different cases. */
 | 
				
			||||||
 | 
					  if (eob) {
 | 
				
			||||||
 | 
					    if (eob == 1) {
 | 
				
			||||||
 | 
					      /* DC only DCT coefficient. */
 | 
				
			||||||
 | 
					      int16_t in = input[0];
 | 
				
			||||||
 | 
					      int16_t out;
 | 
				
			||||||
 | 
					      /* Note: the idct1 will need to be modified accordingly whenever
 | 
				
			||||||
 | 
					       * vp9_short_idct16x16() is modified. */
 | 
				
			||||||
 | 
					      vp9_short_idct1_16x16_c(&in, &out);
 | 
				
			||||||
 | 
					      input[0] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vp9_add_constant_residual_16x16(out, dest, stride);
 | 
				
			||||||
 | 
					#if !CONFIG_SCATTERSCAN
 | 
				
			||||||
 | 
					    } else if (eob <= 10) {
 | 
				
			||||||
 | 
					      // the idct halves ( >> 1) the pitch
 | 
				
			||||||
 | 
					      vp9_short_idct10_16x16(input, output, 32);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      input[0] = input[1] = input[2] = input[3] = 0;
 | 
				
			||||||
 | 
					      input[16] = input[17] = input[18] = 0;
 | 
				
			||||||
 | 
					      input[32] = input[33] = 0;
 | 
				
			||||||
 | 
					      input[48] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vp9_add_residual_16x16(output, dest, stride);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      // the idct halves ( >> 1) the pitch
 | 
				
			||||||
 | 
					      vp9_short_idct16x16(input, output, 16 << 1);
 | 
				
			||||||
 | 
					      vpx_memset(input, 0, 512);
 | 
				
			||||||
 | 
					      vp9_add_residual_16x16(output, dest, stride);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_idct_add_32x32_c(int16_t *input, uint8_t *dest, int stride, int eob) {
 | 
				
			||||||
 | 
					  DECLARE_ALIGNED_ARRAY(16, int16_t, output, 1024);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (eob) {
 | 
				
			||||||
 | 
					    input[0] = input[0] / 2;
 | 
				
			||||||
 | 
					    if (eob == 1) {
 | 
				
			||||||
 | 
					      vp9_short_idct1_32x32(input, output);
 | 
				
			||||||
 | 
					      vp9_add_constant_residual_32x32(output[0], dest, stride);
 | 
				
			||||||
 | 
					      input[0] = 0;
 | 
				
			||||||
 | 
					#if !CONFIG_SCATTERSCAN
 | 
				
			||||||
 | 
					    } else if (eob <= 10) {
 | 
				
			||||||
 | 
					      input[1] = input[1] / 2;
 | 
				
			||||||
 | 
					      input[2] = input[2] / 2;
 | 
				
			||||||
 | 
					      input[3] = input[3] / 2;
 | 
				
			||||||
 | 
					      input[32] = input[32] / 2;
 | 
				
			||||||
 | 
					      input[33] = input[33] / 2;
 | 
				
			||||||
 | 
					      input[34] = input[34] / 2;
 | 
				
			||||||
 | 
					      input[64] = input[64] / 2;
 | 
				
			||||||
 | 
					      input[65] = input[65] / 2;
 | 
				
			||||||
 | 
					      input[96] = input[96] / 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // the idct halves ( >> 1) the pitch
 | 
				
			||||||
 | 
					      vp9_short_idct10_32x32(input, output, 64);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      input[0] = input[1] = input[2] = input[3] = 0;
 | 
				
			||||||
 | 
					      input[32] = input[33] = input[34] = 0;
 | 
				
			||||||
 | 
					      input[64] = input[65] = 0;
 | 
				
			||||||
 | 
					      input[96] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vp9_add_residual_32x32(output, dest, stride);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      int i;
 | 
				
			||||||
 | 
					      for (i = 1; i < 1024; i++)
 | 
				
			||||||
 | 
					        input[i] = input[i] / 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vp9_short_idct32x32(input, output, 64);
 | 
				
			||||||
 | 
					      vpx_memset(input, 0, 2048);
 | 
				
			||||||
 | 
					      vp9_add_residual_32x32(output, dest, stride);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										43
									
								
								vp9/decoder/vp9_idct_blk.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								vp9/decoder/vp9_idct_blk.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  Use of this source code is governed by a BSD-style license
 | 
				
			||||||
 | 
					 *  that can be found in the LICENSE file in the root of the source
 | 
				
			||||||
 | 
					 *  tree. An additional intellectual property rights grant can be found
 | 
				
			||||||
 | 
					 *  in the file PATENTS.  All contributing project authors may
 | 
				
			||||||
 | 
					 *  be found in the AUTHORS file in the root of the source tree.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef VP9_DECODER_VP9_IDCT_BLK_H_
 | 
				
			||||||
 | 
					#define VP9_DECODER_VP9_IDCT_BLK_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "vp9/common/vp9_blockd.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_idct_add_lossless_c(int16_t *input, unsigned char *dest, int stride,
 | 
				
			||||||
 | 
					                             int eob);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_dc_idct_add_lossless_c(int16_t *input, unsigned char *output,
 | 
				
			||||||
 | 
					                                int stride, int dc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_dc_idct_add_y_block_lossless_c(int16_t *q, unsigned char *pre,
 | 
				
			||||||
 | 
					                                        unsigned char *dst, int stride,
 | 
				
			||||||
 | 
					                                        const int16_t *dc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_idct_add_y_block_lossless_c(int16_t *q, unsigned char *dst, int stride,
 | 
				
			||||||
 | 
					                                     struct macroblockd *xd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_idct_add_uv_block_lossless_c(int16_t *q, unsigned char *dst,
 | 
				
			||||||
 | 
					                                      int stride, uint16_t *eobs);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_iht_add_c(TX_TYPE tx_type, int16_t *input, unsigned char *dest,
 | 
				
			||||||
 | 
					                   int stride, int eob);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_iht_add_8x8_c(TX_TYPE tx_type, int16_t *input, unsigned char *dest,
 | 
				
			||||||
 | 
					                       int stride, int eob);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void vp9_iht_add_16x16_c(TX_TYPE tx_type, int16_t *input, unsigned char *dest,
 | 
				
			||||||
 | 
					                         int stride, int eob);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif  // VP9_DECODER_VP9_IDCT_BLK_H_
 | 
				
			||||||
@@ -14,7 +14,7 @@
 | 
				
			|||||||
#include "vp9/decoder/vp9_onyxd.h"
 | 
					#include "vp9/decoder/vp9_onyxd.h"
 | 
				
			||||||
#include "vp9/decoder/vp9_treereader.h"
 | 
					#include "vp9/decoder/vp9_treereader.h"
 | 
				
			||||||
#include "vp9/common/vp9_onyxc_int.h"
 | 
					#include "vp9/common/vp9_onyxc_int.h"
 | 
				
			||||||
#include "vp9/decoder/vp9_dequantize.h"
 | 
					#include "vp9/decoder/vp9_idct_blk.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// #define DEC_DEBUG
 | 
					// #define DEC_DEBUG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "./vpx_config.h"
 | 
					#include "./vpx_config.h"
 | 
				
			||||||
#include "vp9/common/vp9_blockd.h"
 | 
					#include "vp9/common/vp9_blockd.h"
 | 
				
			||||||
#include "vp9/decoder/vp9_dequantize.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vp9_idct_dequant_dc_0_2x_sse2(short *q, const short *dq,
 | 
					void vp9_idct_dequant_dc_0_2x_sse2(short *q, const short *dq,
 | 
				
			||||||
                                   unsigned char *pre, unsigned char *dst,
 | 
					                                   unsigned char *pre, unsigned char *dst,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,17 +22,16 @@ VP9_DX_SRCS-yes += decoder/vp9_dboolhuff.c
 | 
				
			|||||||
VP9_DX_SRCS-yes += decoder/vp9_decodemv.c
 | 
					VP9_DX_SRCS-yes += decoder/vp9_decodemv.c
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_decodframe.c
 | 
					VP9_DX_SRCS-yes += decoder/vp9_decodframe.c
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_decodframe.h
 | 
					VP9_DX_SRCS-yes += decoder/vp9_decodframe.h
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_dequantize.c
 | 
					 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_detokenize.c
 | 
					VP9_DX_SRCS-yes += decoder/vp9_detokenize.c
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_dboolhuff.h
 | 
					VP9_DX_SRCS-yes += decoder/vp9_dboolhuff.h
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_decodemv.h
 | 
					VP9_DX_SRCS-yes += decoder/vp9_decodemv.h
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_dequantize.h
 | 
					 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_detokenize.h
 | 
					VP9_DX_SRCS-yes += decoder/vp9_detokenize.h
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_onyxd.h
 | 
					VP9_DX_SRCS-yes += decoder/vp9_onyxd.h
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_onyxd_int.h
 | 
					VP9_DX_SRCS-yes += decoder/vp9_onyxd_int.h
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_treereader.h
 | 
					VP9_DX_SRCS-yes += decoder/vp9_treereader.h
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_onyxd_if.c
 | 
					VP9_DX_SRCS-yes += decoder/vp9_onyxd_if.c
 | 
				
			||||||
VP9_DX_SRCS-yes += decoder/vp9_idct_blk.c
 | 
					VP9_DX_SRCS-yes += decoder/vp9_idct_blk.c
 | 
				
			||||||
 | 
					VP9_DX_SRCS-yes += decoder/vp9_idct_blk.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
VP9_DX_SRCS-yes := $(filter-out $(VP9_DX_SRCS_REMOVE-yes),$(VP9_DX_SRCS-yes))
 | 
					VP9_DX_SRCS-yes := $(filter-out $(VP9_DX_SRCS_REMOVE-yes),$(VP9_DX_SRCS-yes))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user