shithub: libvpx

Download patch

ref: 1fa04e1a03c2a77ce1575ef8e7c9d15e2334ad3a
parent: bbd5cb2bd4c348a3a033c211346e13ee1f1f6496
parent: ceee4563d63fd2e9861768759d58fb03e9c98d11
author: John Koleszar <jkoleszar@google.com>
date: Wed Jun 12 09:43:30 EDT 2013

Merge changes I86fe51b0,I4c9a9e0f

* changes:
  Remove unused vp9_idct_add_{y,uv}_block
  Remove some unused loopfilter code

--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -355,10 +355,6 @@
   void (*inv_txm4x4_1_add)(int16_t *input, uint8_t *dest, int stride);
   void (*inv_txm4x4_add)(int16_t *input, uint8_t *dest, int stride);
   void (*itxm_add)(int16_t *input, uint8_t *dest, int stride, int eob);
-  void (*itxm_add_y_block)(int16_t *q, uint8_t *dst, int stride,
-    struct macroblockd *xd);
-  void (*itxm_add_uv_block)(int16_t *q, uint8_t *dst, int stride,
-    uint16_t *eobs);
 
   struct subpix_fn_table  subpix;
 
--- a/vp9/common/vp9_rtcd_defs.sh
+++ b/vp9/common/vp9_rtcd_defs.sh
@@ -25,8 +25,6 @@
 #
 # Dequant
 #
-prototype void vp9_idct_add_y_block_8x8 "int16_t *q, uint8_t *dst, int stride, struct macroblockd *xd"
-specialize vp9_idct_add_y_block_8x8
 
 prototype void vp9_idct_add_16x16 "int16_t *input, uint8_t *dest, int stride, int eob"
 specialize vp9_idct_add_16x16
@@ -37,11 +35,7 @@
 prototype void vp9_idct_add "int16_t *input, uint8_t *dest, int stride, int eob"
 specialize vp9_idct_add
 
-prototype void vp9_idct_add_y_block "int16_t *q, uint8_t *dst, int stride, struct macroblockd *xd"
-specialize vp9_idct_add_y_block
 
-prototype void vp9_idct_add_uv_block "int16_t *q, uint8_t *dst, int stride, uint16_t *eobs"
-specialize vp9_idct_add_uv_block
 
 prototype void vp9_idct_add_32x32 "int16_t *q, uint8_t *dst, int stride, int eob"
 specialize vp9_idct_add_32x32
--- a/vp9/common/x86/vp9_loopfilter_intrin_mmx.c
+++ /dev/null
@@ -1,58 +1,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/common/vp9_loopfilter.h"
-
-prototype_loopfilter(vp9_loop_filter_vertical_edge_mmx);
-prototype_loopfilter(vp9_loop_filter_horizontal_edge_mmx);
-
-/* Horizontal MB filtering */
-void vp9_loop_filter_mbh_mmx(unsigned char *y_ptr,
-                             unsigned char *u_ptr, unsigned char *v_ptr,
-                             int y_stride, int uv_stride,
-                             struct loop_filter_info *lfi) {
-}
-
-/* Vertical MB Filtering */
-void vp9_loop_filter_mbv_mmx(unsigned char *y_ptr,
-                             unsigned char *u_ptr, unsigned char *v_ptr,
-                             int y_stride, int uv_stride,
-                             struct loop_filter_info *lfi) {
-}
-
-/* Horizontal B Filtering */
-void vp9_loop_filter_bh_mmx(unsigned char *y_ptr,
-                            unsigned char *u_ptr, unsigned char *v_ptr,
-                            int y_stride, int uv_stride,
-                            struct loop_filter_info *lfi) {
-
-}
-
-/* Vertical B Filtering */
-void vp9_loop_filter_bv_mmx(unsigned char *y_ptr,
-                            unsigned char *u_ptr, unsigned char *v_ptr,
-                            int y_stride, int uv_stride,
-                            struct loop_filter_info *lfi) {
-  vp9_loop_filter_vertical_edge_mmx(y_ptr + 4, y_stride,
-                                    lfi->blim, lfi->lim, lfi->hev_thr, 2);
-  vp9_loop_filter_vertical_edge_mmx(y_ptr + 8, y_stride,
-                                    lfi->blim, lfi->lim, lfi->hev_thr, 2);
-  vp9_loop_filter_vertical_edge_mmx(y_ptr + 12, y_stride,
-                                    lfi->blim, lfi->lim, lfi->hev_thr, 2);
-
-  if (u_ptr)
-    vp9_loop_filter_vertical_edge_mmx(u_ptr + 4, uv_stride,
-                                      lfi->blim, lfi->lim, lfi->hev_thr, 1);
-
-  if (v_ptr)
-    vp9_loop_filter_vertical_edge_mmx(v_ptr + 4, uv_stride,
-                                      lfi->blim, lfi->lim, lfi->hev_thr, 1);
-}
-
--- a/vp9/common/x86/vp9_loopfilter_intrin_sse2.c
+++ b/vp9/common/x86/vp9_loopfilter_intrin_sse2.c
@@ -1017,119 +1017,3 @@
   /* Transpose 16x8 */
   transpose(src, 16, dst, p, 2);
 }
-
-/* Horizontal MB filtering */
-void vp9_loop_filter_mbh_sse2(unsigned char *y_ptr,
-                              unsigned char *u_ptr, unsigned char *v_ptr,
-                              int y_stride, int uv_stride,
-                              struct loop_filter_info *lfi) {
-  vp9_mbloop_filter_horizontal_edge_sse2(y_ptr, y_stride, lfi->mblim,
-                                         lfi->lim, lfi->hev_thr);
-
-  /* u,v */
-  if (u_ptr)
-    vp9_mbloop_filter_horizontal_edge_uv_sse2(u_ptr, uv_stride, lfi->mblim,
-                                              lfi->lim, lfi->hev_thr, v_ptr);
-}
-
-
-void vp9_lpf_mbh_w_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
-                           unsigned char *v_ptr, int y_stride, int uv_stride,
-                           struct loop_filter_info *lfi) {
-  vp9_mb_lpf_horizontal_edge_w_sse2(y_ptr, y_stride,
-                                      lfi->mblim, lfi->lim, lfi->hev_thr);
-
-  /* u,v */
-  if (u_ptr)
-    vp9_mbloop_filter_horizontal_edge_uv_sse2(u_ptr, uv_stride, lfi->mblim,
-                                              lfi->lim, lfi->hev_thr, v_ptr);
-}
-
-
-void vp9_loop_filter_bh8x8_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
-                             unsigned char *v_ptr, int y_stride, int uv_stride,
-                             struct loop_filter_info *lfi) {
-  vp9_mbloop_filter_horizontal_edge_sse2(
-    y_ptr + 8 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr);
-
-  if (u_ptr)
-    vp9_loop_filter_horizontal_edge_uv_sse2(u_ptr + 4 * uv_stride, uv_stride,
-                                            lfi->blim, lfi->lim, lfi->hev_thr,
-                                            v_ptr + 4 * uv_stride);
-}
-
-/* Vertical MB Filtering */
-void vp9_loop_filter_mbv_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
-                              unsigned char *v_ptr, int y_stride, int uv_stride,
-                              struct loop_filter_info *lfi) {
-  vp9_mbloop_filter_vertical_edge_sse2(y_ptr, y_stride, lfi->mblim, lfi->lim,
-                                       lfi->hev_thr);
-
-  /* u,v */
-  if (u_ptr)
-    vp9_mbloop_filter_vertical_edge_uv_sse2(u_ptr, uv_stride, lfi->mblim,
-                                            lfi->lim, lfi->hev_thr, v_ptr);
-}
-
-
-void vp9_lpf_mbv_w_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
-                   unsigned char *v_ptr, int y_stride, int uv_stride,
-                   struct loop_filter_info *lfi) {
-  vp9_mb_lpf_vertical_edge_w_sse2(y_ptr, y_stride,
-                                    lfi->mblim, lfi->lim, lfi->hev_thr);
-
-  /* u,v */
-  if (u_ptr)
-    vp9_mbloop_filter_vertical_edge_uv_sse2(u_ptr, uv_stride, lfi->mblim,
-                                            lfi->lim, lfi->hev_thr, v_ptr);
-}
-
-
-void vp9_loop_filter_bv8x8_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
-                             unsigned char *v_ptr, int y_stride, int uv_stride,
-                             struct loop_filter_info *lfi) {
-  vp9_mbloop_filter_vertical_edge_sse2(
-    y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr);
-
-  if (u_ptr)
-    vp9_loop_filter_vertical_edge_uv_sse2(u_ptr + 4, uv_stride,
-                                          lfi->blim, lfi->lim, lfi->hev_thr,
-                                          v_ptr + 4);
-}
-
-/* Horizontal B Filtering */
-void vp9_loop_filter_bh_sse2(unsigned char *y_ptr,
-                             unsigned char *u_ptr, unsigned char *v_ptr,
-                             int y_stride, int uv_stride,
-                             struct loop_filter_info *lfi) {
-  vp9_loop_filter_horizontal_edge_sse2(y_ptr + 4 * y_stride, y_stride,
-                                       lfi->blim, lfi->lim, lfi->hev_thr, 2);
-  vp9_loop_filter_horizontal_edge_sse2(y_ptr + 8 * y_stride, y_stride,
-                                       lfi->blim, lfi->lim, lfi->hev_thr, 2);
-  vp9_loop_filter_horizontal_edge_sse2(y_ptr + 12 * y_stride, y_stride,
-                                       lfi->blim, lfi->lim, lfi->hev_thr, 2);
-
-  if (u_ptr)
-    vp9_loop_filter_horizontal_edge_uv_sse2(u_ptr + 4 * uv_stride, uv_stride,
-                                            lfi->blim, lfi->lim, lfi->hev_thr,
-                                            v_ptr + 4 * uv_stride);
-}
-
-/* Vertical B Filtering */
-void vp9_loop_filter_bv_sse2(unsigned char *y_ptr,
-                             unsigned char *u_ptr, unsigned char *v_ptr,
-                             int y_stride, int uv_stride,
-                             struct loop_filter_info *lfi) {
-  vp9_loop_filter_vertical_edge_sse2(y_ptr + 4, y_stride,
-                                     lfi->blim, lfi->lim, lfi->hev_thr, 2);
-  vp9_loop_filter_vertical_edge_sse2(y_ptr + 8, y_stride,
-                                     lfi->blim, lfi->lim, lfi->hev_thr, 2);
-  vp9_loop_filter_vertical_edge_sse2(y_ptr + 12, y_stride,
-                                     lfi->blim, lfi->lim, lfi->hev_thr, 2);
-
-  if (u_ptr)
-    vp9_loop_filter_vertical_edge_uv_sse2(u_ptr + 4, uv_stride,
-                                          lfi->blim, lfi->lim, lfi->hev_thr,
-                                          v_ptr + 4);
-}
-
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -717,12 +717,8 @@
                  cm->uv_ac_delta_q == 0;
   if (xd->lossless) {
     xd->itxm_add          = vp9_idct_add_lossless_c;
-    xd->itxm_add_y_block  = vp9_idct_add_y_block_lossless_c;
-    xd->itxm_add_uv_block = vp9_idct_add_uv_block_lossless_c;
   } else {
     xd->itxm_add          = vp9_idct_add;
-    xd->itxm_add_y_block  = vp9_idct_add_y_block;
-    xd->itxm_add_uv_block = vp9_idct_add_uv_block;
   }
 }
 
--- a/vp9/decoder/vp9_idct_blk.c
+++ b/vp9/decoder/vp9_idct_blk.c
@@ -12,78 +12,6 @@
 #include "vp9/common/vp9_blockd.h"
 #include "vp9/decoder/vp9_idct_blk.h"
 
-void vp9_idct_add_y_block_c(int16_t *q, uint8_t *dst, int stride,
-                            MACROBLOCKD *xd) {
-  int i, j;
-
-  for (i = 0; i < 4; i++) {
-    for (j = 0; j < 4; j++) {
-      vp9_idct_add(q, dst, stride, xd->plane[0].eobs[i * 4  + j]);
-      q   += 16;
-      dst += 4;
-    }
-
-    dst += 4 * stride - 16;
-  }
-}
-
-void vp9_idct_add_uv_block_c(int16_t *q, uint8_t *dst, int stride,
-                             uint16_t *eobs) {
-  int i, j;
-
-  for (i = 0; i < 2; i++) {
-    for (j = 0; j < 2; j++) {
-      vp9_idct_add(q, dst, stride, eobs[i * 2 + j]);
-      q   += 16;
-      dst += 4;
-    }
-
-    dst += 4 * stride - 8;
-  }
-}
-
-void vp9_idct_add_y_block_8x8_c(int16_t *q, uint8_t *dst, int stride,
-                                MACROBLOCKD *xd) {
-  uint8_t *origdest = dst;
-
-  vp9_idct_add_8x8_c(q, dst, stride, xd->plane[0].eobs[0]);
-  vp9_idct_add_8x8_c(&q[64], origdest + 8, stride, xd->plane[0].eobs[4]);
-  vp9_idct_add_8x8_c(&q[128], origdest + 8 * stride, stride,
-                     xd->plane[0].eobs[8]);
-  vp9_idct_add_8x8_c(&q[192], origdest + 8 * stride + 8, stride,
-                     xd->plane[0].eobs[12]);
-}
-
-void vp9_idct_add_y_block_lossless_c(int16_t *q, uint8_t *dst, int stride,
-                                     MACROBLOCKD *xd) {
-  int i, j;
-
-  for (i = 0; i < 4; i++) {
-    for (j = 0; j < 4; j++) {
-      vp9_idct_add_lossless_c(q, dst, stride, xd->plane[0].eobs[i * 4 + j]);
-      q   += 16;
-      dst += 4;
-    }
-
-    dst += 4 * stride - 16;
-  }
-}
-
-void vp9_idct_add_uv_block_lossless_c(int16_t *q, uint8_t *dst, int stride,
-                                      uint16_t *eobs) {
-  int i, j;
-
-  for (i = 0; i < 2; i++) {
-    for (j = 0; j < 2; j++) {
-      vp9_idct_add_lossless_c(q, dst, stride, eobs[i * 2 + j]);
-      q   += 16;
-      dst += 4;
-    }
-
-    dst += 4 * stride - 8;
-  }
-}
-
 static void add_constant_residual(const int16_t diff, uint8_t *dest, int stride,
                                   int width, int height) {
   int r, c;
--- a/vp9/decoder/vp9_idct_blk.h
+++ b/vp9/decoder/vp9_idct_blk.h
@@ -18,12 +18,6 @@
 void vp9_idct_add_lossless_c(int16_t *input, unsigned char *dest, int stride,
                              int eob);
 
-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);
 
--- a/vp9/vp9_common.mk
+++ b/vp9/vp9_common.mk
@@ -78,7 +78,6 @@
 VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_loopfilter_x86.h
 VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_postproc_x86.h
 VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_asm_stubs.c
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_loopfilter_intrin_mmx.c
 VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_loopfilter_intrin_sse2.c
 VP9_COMMON_SRCS-$(CONFIG_POSTPROC) += common/vp9_postproc.h
 VP9_COMMON_SRCS-$(CONFIG_POSTPROC) += common/vp9_postproc.c
--