Coverage Report

Created: 2026-09-14 06:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/avm/avm_dsp/blend_a64_vmask.c
Line
Count
Source
1
/*
2
 * Copyright (c) 2021, Alliance for Open Media. All rights reserved
3
 *
4
 * This source code is subject to the terms of the BSD 3-Clause Clear License
5
 * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear
6
 * License was not distributed with this source code in the LICENSE file, you
7
 * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/.  If the
8
 * Alliance for Open Media Patent License 1.0 was not distributed with this
9
 * source code in the PATENTS file, you can obtain it at
10
 * aomedia.org/license/patent-license/.
11
 */
12
13
#include <assert.h>
14
15
#include "avm/avm_integer.h"
16
#include "avm_ports/mem.h"
17
#include "avm_dsp/avm_dsp_common.h"
18
#include "avm_dsp/blend.h"
19
20
#include "config/avm_dsp_rtcd.h"
21
22
void avm_highbd_blend_a64_vmask_c(uint16_t *dst, uint32_t dst_stride,
23
                                  const uint16_t *src0, uint32_t src0_stride,
24
                                  const uint16_t *src1, uint32_t src1_stride,
25
0
                                  const uint8_t *mask, int w, int h, int bd) {
26
0
  int i, j;
27
0
  (void)bd;
28
29
0
  assert(IMPLIES(src0 == dst, src0_stride == dst_stride));
30
0
  assert(IMPLIES(src1 == dst, src1_stride == dst_stride));
31
32
0
  assert(h >= 1);
33
0
  assert(w >= 1);
34
0
  assert(IS_POWER_OF_TWO(h));
35
0
  assert(IS_POWER_OF_TWO(w));
36
37
0
  assert(bd == 8 || bd == 10 || bd == 12);
38
39
0
  for (i = 0; i < h; ++i) {
40
0
    const int m = mask[i];
41
0
    for (j = 0; j < w; ++j) {
42
0
      dst[i * dst_stride + j] = AVM_BLEND_A64(m, src0[i * src0_stride + j],
43
0
                                              src1[i * src1_stride + j]);
44
0
    }
45
0
  }
46
0
}