LCOV - app.info - media/libvpx/vp8/decoder/x86/idct_blk_mmx.c

LCOV - code coverage report
| Current view: | directory - media/libvpx/vp8/decoder/x86 - idct_blk_mmx.c (source / functions) |  | Found | Hit | Coverage |
| Test: | app.info | Lines: | 71 | 0 | 0.0 %
| Date: | 2012-07-07 | Functions: | 3 | 0 | 0.0 %

           1                 : /*
           2                 :  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
           3                 :  *
           4                 :  *  Use of this source code is governed by a BSD-style license
           5                 :  *  that can be found in the LICENSE file in the root of the source
           6                 :  *  tree. An additional intellectual property rights grant can be found
           7                 :  *  in the file PATENTS.  All contributing project authors may
           8                 :  *  be found in the AUTHORS file in the root of the source tree.
           9                 :  */
          10                 :
          11                 : #include "vpx_ports/config.h"
          12                 : #include "vp8/common/idct.h"
          13                 : #include "vp8/decoder/dequantize.h"
          14                 :
          15               0 : void vp8_dequant_dc_idct_add_y_block_mmx
          16                 :             (short *q, short *dq, unsigned char *pre,
          17                 :              unsigned char *dst, int stride, char *eobs, short *dc)
          18                 : {
          19                 :     int i;
          20                 :
          21               0 :     for (i = 0; i < 4; i++)
          22                 :     {
          23               0 :         if (eobs[0] > 1)
          24               0 :             vp8_dequant_dc_idct_add_mmx (q, dq, pre, dst, 16, stride, dc[0]);
          25                 :         else
          26               0 :             vp8_dc_only_idct_add_mmx (dc[0], pre, dst, 16, stride);
          27                 :
          28               0 :         if (eobs[1] > 1)
          29               0 :             vp8_dequant_dc_idct_add_mmx (q+16, dq, pre+4, dst+4, 16, stride, dc[1]);
          30                 :         else
          31               0 :             vp8_dc_only_idct_add_mmx (dc[1], pre+4, dst+4, 16, stride);
          32                 :
          33               0 :         if (eobs[2] > 1)
          34               0 :             vp8_dequant_dc_idct_add_mmx (q+32, dq, pre+8, dst+8, 16, stride, dc[2]);
          35                 :         else
          36               0 :             vp8_dc_only_idct_add_mmx (dc[2], pre+8, dst+8, 16, stride);
          37                 :
          38               0 :         if (eobs[3] > 1)
          39               0 :             vp8_dequant_dc_idct_add_mmx (q+48, dq, pre+12, dst+12, 16, stride, dc[3]);
          40                 :         else
          41               0 :             vp8_dc_only_idct_add_mmx (dc[3], pre+12, dst+12, 16, stride);
          42                 :
          43               0 :         q    += 64;
          44               0 :         dc   += 4;
          45               0 :         pre  += 64;
          46               0 :         dst  += 4*stride;
          47               0 :         eobs += 4;
          48                 :     }
          49               0 : }
          50                 :
          51               0 : void vp8_dequant_idct_add_y_block_mmx
          52                 :             (short *q, short *dq, unsigned char *pre,
          53                 :              unsigned char *dst, int stride, char *eobs)
          54                 : {
          55                 :     int i;
          56                 :
          57               0 :     for (i = 0; i < 4; i++)
          58                 :     {
          59               0 :         if (eobs[0] > 1)
          60               0 :             vp8_dequant_idct_add_mmx (q, dq, pre, dst, 16, stride);
          61                 :         else
          62                 :         {
          63               0 :             vp8_dc_only_idct_add_mmx (q[0]*dq[0], pre, dst, 16, stride);
          64               0 :             ((int *)q)[0] = 0;
          65                 :         }
          66                 :
          67               0 :         if (eobs[1] > 1)
          68               0 :             vp8_dequant_idct_add_mmx (q+16, dq, pre+4, dst+4, 16, stride);
          69                 :         else
          70                 :         {
          71               0 :             vp8_dc_only_idct_add_mmx (q[16]*dq[0], pre+4, dst+4, 16, stride);
          72               0 :             ((int *)(q+16))[0] = 0;
          73                 :         }
          74                 :
          75               0 :         if (eobs[2] > 1)
          76               0 :             vp8_dequant_idct_add_mmx (q+32, dq, pre+8, dst+8, 16, stride);
          77                 :         else
          78                 :         {
          79               0 :             vp8_dc_only_idct_add_mmx (q[32]*dq[0], pre+8, dst+8, 16, stride);
          80               0 :             ((int *)(q+32))[0] = 0;
          81                 :         }
          82                 :
          83               0 :         if (eobs[3] > 1)
          84               0 :             vp8_dequant_idct_add_mmx (q+48, dq, pre+12, dst+12, 16, stride);
          85                 :         else
          86                 :         {
          87               0 :             vp8_dc_only_idct_add_mmx (q[48]*dq[0], pre+12, dst+12, 16, stride);
          88               0 :             ((int *)(q+48))[0] = 0;
          89                 :         }
          90                 :
          91               0 :         q    += 64;
          92               0 :         pre  += 64;
          93               0 :         dst  += 4*stride;
          94               0 :         eobs += 4;
          95                 :     }
          96               0 : }
          97                 :
          98               0 : void vp8_dequant_idct_add_uv_block_mmx
          99                 :             (short *q, short *dq, unsigned char *pre,
         100                 :              unsigned char *dstu, unsigned char *dstv, int stride, char *eobs)
         101                 : {
         102                 :     int i;
         103                 :
         104               0 :     for (i = 0; i < 2; i++)
         105                 :     {
         106               0 :         if (eobs[0] > 1)
         107               0 :             vp8_dequant_idct_add_mmx (q, dq, pre, dstu, 8, stride);
         108                 :         else
         109                 :         {
         110               0 :             vp8_dc_only_idct_add_mmx (q[0]*dq[0], pre, dstu, 8, stride);
         111               0 :             ((int *)q)[0] = 0;
         112                 :         }
         113                 :
         114               0 :         if (eobs[1] > 1)
         115               0 :             vp8_dequant_idct_add_mmx (q+16, dq, pre+4, dstu+4, 8, stride);
         116                 :         else
         117                 :         {
         118               0 :             vp8_dc_only_idct_add_mmx (q[16]*dq[0], pre+4, dstu+4, 8, stride);
         119               0 :             ((int *)(q+16))[0] = 0;
         120                 :         }
         121                 :
         122               0 :         q    += 32;
         123               0 :         pre  += 32;
         124               0 :         dstu += 4*stride;
         125               0 :         eobs += 2;
         126                 :     }
         127                 :
         128               0 :     for (i = 0; i < 2; i++)
         129                 :     {
         130               0 :         if (eobs[0] > 1)
         131               0 :             vp8_dequant_idct_add_mmx (q, dq, pre, dstv, 8, stride);
         132                 :         else
         133                 :         {
         134               0 :             vp8_dc_only_idct_add_mmx (q[0]*dq[0], pre, dstv, 8, stride);
         135               0 :             ((int *)q)[0] = 0;
         136                 :         }
         137                 :
         138               0 :         if (eobs[1] > 1)
         139               0 :             vp8_dequant_idct_add_mmx (q+16, dq, pre+4, dstv+4, 8, stride);
         140                 :         else
         141                 :         {
         142               0 :             vp8_dc_only_idct_add_mmx (q[16]*dq[0], pre+4, dstv+4, 8, stride);
         143               0 :             ((int *)(q+16))[0] = 0;
         144                 :         }
         145                 :
         146               0 :         q    += 32;
         147               0 :         pre  += 32;
         148               0 :         dstv += 4*stride;
         149               0 :         eobs += 2;
         150                 :     }
         151               0 : }

Generated by: LCOV version 1.7