Coverage Report

Created: 2024-09-06 07:53

/src/libvpx/vp8/common/x86/idct_blk_sse2.c
Line
Count
Source
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_config.h"
12
#include "vp8_rtcd.h"
13
14
void vp8_idct_dequant_0_2x_sse2(short *q, short *dq, unsigned char *dst,
15
                                int dst_stride);
16
void vp8_idct_dequant_full_2x_sse2(short *q, short *dq, unsigned char *dst,
17
                                   int dst_stride);
18
19
void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst,
20
1.36M
                                       int stride, char *eobs) {
21
1.36M
  int i;
22
23
6.82M
  for (i = 0; i < 4; ++i) {
24
5.46M
    if (((short *)(eobs))[0]) {
25
2.48M
      if (((short *)(eobs))[0] & 0xfefe) {
26
1.81M
        vp8_idct_dequant_full_2x_sse2(q, dq, dst, stride);
27
1.81M
      } else {
28
668k
        vp8_idct_dequant_0_2x_sse2(q, dq, dst, stride);
29
668k
      }
30
2.48M
    }
31
5.46M
    if (((short *)(eobs))[1]) {
32
2.48M
      if (((short *)(eobs))[1] & 0xfefe) {
33
1.81M
        vp8_idct_dequant_full_2x_sse2(q + 32, dq, dst + 8, stride);
34
1.81M
      } else {
35
674k
        vp8_idct_dequant_0_2x_sse2(q + 32, dq, dst + 8, stride);
36
674k
      }
37
2.48M
    }
38
5.46M
    q += 64;
39
5.46M
    dst += stride * 4;
40
5.46M
    eobs += 4;
41
5.46M
  }
42
1.36M
}
43
44
void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq,
45
                                        unsigned char *dst_u,
46
                                        unsigned char *dst_v, int stride,
47
2.15M
                                        char *eobs) {
48
2.15M
  if (((short *)(eobs))[0]) {
49
1.18M
    if (((short *)(eobs))[0] & 0xfefe) {
50
1.11M
      vp8_idct_dequant_full_2x_sse2(q, dq, dst_u, stride);
51
1.11M
    } else {
52
72.6k
      vp8_idct_dequant_0_2x_sse2(q, dq, dst_u, stride);
53
72.6k
    }
54
1.18M
  }
55
2.15M
  q += 32;
56
2.15M
  dst_u += stride * 4;
57
58
2.15M
  if (((short *)(eobs))[1]) {
59
1.18M
    if (((short *)(eobs))[1] & 0xfefe) {
60
1.09M
      vp8_idct_dequant_full_2x_sse2(q, dq, dst_u, stride);
61
1.09M
    } else {
62
86.0k
      vp8_idct_dequant_0_2x_sse2(q, dq, dst_u, stride);
63
86.0k
    }
64
1.18M
  }
65
2.15M
  q += 32;
66
67
2.15M
  if (((short *)(eobs))[2]) {
68
1.16M
    if (((short *)(eobs))[2] & 0xfefe) {
69
1.09M
      vp8_idct_dequant_full_2x_sse2(q, dq, dst_v, stride);
70
1.09M
    } else {
71
71.4k
      vp8_idct_dequant_0_2x_sse2(q, dq, dst_v, stride);
72
71.4k
    }
73
1.16M
  }
74
2.15M
  q += 32;
75
2.15M
  dst_v += stride * 4;
76
77
2.15M
  if (((short *)(eobs))[3]) {
78
1.16M
    if (((short *)(eobs))[3] & 0xfefe) {
79
1.08M
      vp8_idct_dequant_full_2x_sse2(q, dq, dst_v, stride);
80
1.08M
    } else {
81
84.5k
      vp8_idct_dequant_0_2x_sse2(q, dq, dst_v, stride);
82
84.5k
    }
83
1.16M
  }
84
2.15M
}