Coverage Report

Created: 2026-02-14 06:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/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
51.9M
                                       int stride, char *eobs) {
21
51.9M
  int i;
22
23
259M
  for (i = 0; i < 4; ++i) {
24
207M
    if (((short *)(eobs))[0]) {
25
146M
      if (((short *)(eobs))[0] & 0xfefe) {
26
53.1M
        vp8_idct_dequant_full_2x_sse2(q, dq, dst, stride);
27
92.9M
      } else {
28
92.9M
        vp8_idct_dequant_0_2x_sse2(q, dq, dst, stride);
29
92.9M
      }
30
146M
    }
31
207M
    if (((short *)(eobs))[1]) {
32
154M
      if (((short *)(eobs))[1] & 0xfefe) {
33
57.3M
        vp8_idct_dequant_full_2x_sse2(q + 32, dq, dst + 8, stride);
34
96.9M
      } else {
35
96.9M
        vp8_idct_dequant_0_2x_sse2(q + 32, dq, dst + 8, stride);
36
96.9M
      }
37
154M
    }
38
207M
    q += 64;
39
207M
    dst += stride * 4;
40
207M
    eobs += 4;
41
207M
  }
42
51.9M
}
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
385M
                                        char *eobs) {
48
385M
  if (((short *)(eobs))[0]) {
49
57.2M
    if (((short *)(eobs))[0] & 0xfefe) {
50
20.4M
      vp8_idct_dequant_full_2x_sse2(q, dq, dst_u, stride);
51
36.8M
    } else {
52
36.8M
      vp8_idct_dequant_0_2x_sse2(q, dq, dst_u, stride);
53
36.8M
    }
54
57.2M
  }
55
385M
  q += 32;
56
385M
  dst_u += stride * 4;
57
58
385M
  if (((short *)(eobs))[1]) {
59
52.0M
    if (((short *)(eobs))[1] & 0xfefe) {
60
22.4M
      vp8_idct_dequant_full_2x_sse2(q, dq, dst_u, stride);
61
29.5M
    } else {
62
29.5M
      vp8_idct_dequant_0_2x_sse2(q, dq, dst_u, stride);
63
29.5M
    }
64
52.0M
  }
65
385M
  q += 32;
66
67
385M
  if (((short *)(eobs))[2]) {
68
51.2M
    if (((short *)(eobs))[2] & 0xfefe) {
69
24.0M
      vp8_idct_dequant_full_2x_sse2(q, dq, dst_v, stride);
70
27.2M
    } else {
71
27.2M
      vp8_idct_dequant_0_2x_sse2(q, dq, dst_v, stride);
72
27.2M
    }
73
51.2M
  }
74
385M
  q += 32;
75
385M
  dst_v += stride * 4;
76
77
385M
  if (((short *)(eobs))[3]) {
78
55.8M
    if (((short *)(eobs))[3] & 0xfefe) {
79
25.1M
      vp8_idct_dequant_full_2x_sse2(q, dq, dst_v, stride);
80
30.6M
    } else {
81
30.6M
      vp8_idct_dequant_0_2x_sse2(q, dq, dst_v, stride);
82
30.6M
    }
83
55.8M
  }
84
385M
}