Coverage Report

Created: 2026-05-16 06:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/svt-av1/Source/Lib/Codec/mv.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
3
 *
4
 * This source code is subject to the terms of the BSD 2 Clause License and
5
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6
 * was not distributed with this source code in the LICENSE file, you can
7
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8
 * Media Patent License 1.0 was not distributed with this source code in the
9
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10
 */
11
12
#ifndef AOM_AV1_COMMON_MV_H_
13
#define AOM_AV1_COMMON_MV_H_
14
15
#include "definitions.h"
16
17
#ifdef __cplusplus
18
extern "C" {
19
#endif
20
21
0
#define INVALID_MV 0x80008000
22
0
#define CHECK_MV_EQUAL(mv1, mv2) (((mv1).y == (mv2).y) && ((mv1).x == (mv2).x))
23
24
// The mv limit for fullpel mvs
25
typedef struct {
26
    int col_min;
27
    int col_max;
28
    int row_min;
29
    int row_max;
30
} FullMvLimits;
31
32
// The mv limit for subpel mvs
33
typedef struct {
34
    int col_min;
35
    int col_max;
36
    int row_min;
37
    int row_max;
38
} SubpelMvLimits;
39
40
#pragma pack(push, 1)
41
42
typedef union Mv {
43
    struct {
44
        int16_t x;
45
        int16_t y;
46
    };
47
48
    uint32_t as_int; /* facilitates faster equality tests and copies */
49
} Mv;
50
51
#pragma pack(pop)
52
53
typedef struct CandidateMv {
54
    Mv      this_mv;
55
    Mv      comp_mv;
56
    int32_t weight;
57
} CandidateMv;
58
59
0
#define GET_MV_RAWPEL(x) (((x) + 3 + ((x) >= 0)) >> 3)
60
1.01M
#define GET_MV_SUBPEL(x) ((x) * 8)
61
62
0
static AOM_INLINE Mv get_fullmv_from_mv(const Mv* subpel_mv) {
63
0
    const Mv full_mv = {{(int16_t)GET_MV_RAWPEL(subpel_mv->x), (int16_t)GET_MV_RAWPEL(subpel_mv->y)}};
64
0
    return full_mv;
65
0
}
Unexecuted instantiation: enc_handle.c:get_fullmv_from_mv
Unexecuted instantiation: enc_settings.c:get_fullmv_from_mv
Unexecuted instantiation: av1me.c:get_fullmv_from_mv
Unexecuted instantiation: cdef_process.c:get_fullmv_from_mv
Unexecuted instantiation: common_utils.c:get_fullmv_from_mv
Unexecuted instantiation: deblocking_common.c:get_fullmv_from_mv
Unexecuted instantiation: dlf_process.c:get_fullmv_from_mv
Unexecuted instantiation: enc_cdef.c:get_fullmv_from_mv
Unexecuted instantiation: enc_dec_process.c:get_fullmv_from_mv
Unexecuted instantiation: enc_inter_prediction.c:get_fullmv_from_mv
Unexecuted instantiation: enc_intra_prediction.c:get_fullmv_from_mv
Unexecuted instantiation: enc_mode_config.c:get_fullmv_from_mv
Unexecuted instantiation: entropy_coding.c:get_fullmv_from_mv
Unexecuted instantiation: ec_process.c:get_fullmv_from_mv
Unexecuted instantiation: full_loop.c:get_fullmv_from_mv
Unexecuted instantiation: initial_rc_process.c:get_fullmv_from_mv
Unexecuted instantiation: inter_prediction.c:get_fullmv_from_mv
Unexecuted instantiation: intra_prediction.c:get_fullmv_from_mv
Unexecuted instantiation: inv_transforms.c:get_fullmv_from_mv
Unexecuted instantiation: md_rate_estimation.c:get_fullmv_from_mv
Unexecuted instantiation: mode_decision.c:get_fullmv_from_mv
Unexecuted instantiation: md_config_process.c:get_fullmv_from_mv
Unexecuted instantiation: md_process.c:get_fullmv_from_mv
Unexecuted instantiation: motion_estimation.c:get_fullmv_from_mv
Unexecuted instantiation: me_process.c:get_fullmv_from_mv
Unexecuted instantiation: noise_model.c:get_fullmv_from_mv
Unexecuted instantiation: packetization_process.c:get_fullmv_from_mv
Unexecuted instantiation: pic_analysis_process.c:get_fullmv_from_mv
Unexecuted instantiation: pcs.c:get_fullmv_from_mv
Unexecuted instantiation: pd_process.c:get_fullmv_from_mv
Unexecuted instantiation: pd_results.c:get_fullmv_from_mv
Unexecuted instantiation: pic_manager_process.c:get_fullmv_from_mv
Unexecuted instantiation: pic_operators.c:get_fullmv_from_mv
Unexecuted instantiation: pred_structure.c:get_fullmv_from_mv
Unexecuted instantiation: product_coding_loop.c:get_fullmv_from_mv
Unexecuted instantiation: ac_bias.c:get_fullmv_from_mv
Unexecuted instantiation: rc_aq.c:get_fullmv_from_mv
Unexecuted instantiation: rc_process.c:get_fullmv_from_mv
Unexecuted instantiation: rc_rtc_cbr.c:get_fullmv_from_mv
Unexecuted instantiation: rc_vbr_cbr.c:get_fullmv_from_mv
Unexecuted instantiation: rd_cost.c:get_fullmv_from_mv
Unexecuted instantiation: reference_object.c:get_fullmv_from_mv
Unexecuted instantiation: resource_coordination_process.c:get_fullmv_from_mv
Unexecuted instantiation: rest_process.c:get_fullmv_from_mv
Unexecuted instantiation: restoration_pick.c:get_fullmv_from_mv
Unexecuted instantiation: sequence_control_set.c:get_fullmv_from_mv
Unexecuted instantiation: src_ops_process.c:get_fullmv_from_mv
Unexecuted instantiation: super_res.c:get_fullmv_from_mv
Unexecuted instantiation: svt_psnr.c:get_fullmv_from_mv
Unexecuted instantiation: kernel_dispatch.c:get_fullmv_from_mv
Unexecuted instantiation: temporal_filtering.c:get_fullmv_from_mv
Unexecuted instantiation: transforms.c:get_fullmv_from_mv
Unexecuted instantiation: utility.c:get_fullmv_from_mv
Unexecuted instantiation: encode_txb_ref_c.c:get_fullmv_from_mv
Unexecuted instantiation: filterintra_c.c:get_fullmv_from_mv
Unexecuted instantiation: adaptive_mv_pred.c:get_fullmv_from_mv
Unexecuted instantiation: block_structures.c:get_fullmv_from_mv
Unexecuted instantiation: coding_loop.c:get_fullmv_from_mv
Unexecuted instantiation: coding_unit.c:get_fullmv_from_mv
Unexecuted instantiation: deblocking_filter.c:get_fullmv_from_mv
Unexecuted instantiation: encode_context.c:get_fullmv_from_mv
Unexecuted instantiation: global_me.c:get_fullmv_from_mv
Unexecuted instantiation: global_me_cost.c:get_fullmv_from_mv
Unexecuted instantiation: me_context.c:get_fullmv_from_mv
Unexecuted instantiation: rc_crf_cqp.c:get_fullmv_from_mv
Unexecuted instantiation: enc_warped_motion.c:get_fullmv_from_mv
66
67
0
static AOM_INLINE Mv get_mv_from_fullmv(const Mv* full_mv) {
68
0
    const Mv subpel_mv = {{(int16_t)GET_MV_SUBPEL(full_mv->x), (int16_t)GET_MV_SUBPEL(full_mv->y)}};
69
0
    return subpel_mv;
70
0
}
Unexecuted instantiation: enc_handle.c:get_mv_from_fullmv
Unexecuted instantiation: enc_settings.c:get_mv_from_fullmv
Unexecuted instantiation: av1me.c:get_mv_from_fullmv
Unexecuted instantiation: cdef_process.c:get_mv_from_fullmv
Unexecuted instantiation: common_utils.c:get_mv_from_fullmv
Unexecuted instantiation: deblocking_common.c:get_mv_from_fullmv
Unexecuted instantiation: dlf_process.c:get_mv_from_fullmv
Unexecuted instantiation: enc_cdef.c:get_mv_from_fullmv
Unexecuted instantiation: enc_dec_process.c:get_mv_from_fullmv
Unexecuted instantiation: enc_inter_prediction.c:get_mv_from_fullmv
Unexecuted instantiation: enc_intra_prediction.c:get_mv_from_fullmv
Unexecuted instantiation: enc_mode_config.c:get_mv_from_fullmv
Unexecuted instantiation: entropy_coding.c:get_mv_from_fullmv
Unexecuted instantiation: ec_process.c:get_mv_from_fullmv
Unexecuted instantiation: full_loop.c:get_mv_from_fullmv
Unexecuted instantiation: initial_rc_process.c:get_mv_from_fullmv
Unexecuted instantiation: inter_prediction.c:get_mv_from_fullmv
Unexecuted instantiation: intra_prediction.c:get_mv_from_fullmv
Unexecuted instantiation: inv_transforms.c:get_mv_from_fullmv
Unexecuted instantiation: md_rate_estimation.c:get_mv_from_fullmv
Unexecuted instantiation: mode_decision.c:get_mv_from_fullmv
Unexecuted instantiation: md_config_process.c:get_mv_from_fullmv
Unexecuted instantiation: md_process.c:get_mv_from_fullmv
Unexecuted instantiation: motion_estimation.c:get_mv_from_fullmv
Unexecuted instantiation: me_process.c:get_mv_from_fullmv
Unexecuted instantiation: noise_model.c:get_mv_from_fullmv
Unexecuted instantiation: packetization_process.c:get_mv_from_fullmv
Unexecuted instantiation: pic_analysis_process.c:get_mv_from_fullmv
Unexecuted instantiation: pcs.c:get_mv_from_fullmv
Unexecuted instantiation: pd_process.c:get_mv_from_fullmv
Unexecuted instantiation: pd_results.c:get_mv_from_fullmv
Unexecuted instantiation: pic_manager_process.c:get_mv_from_fullmv
Unexecuted instantiation: pic_operators.c:get_mv_from_fullmv
Unexecuted instantiation: pred_structure.c:get_mv_from_fullmv
Unexecuted instantiation: product_coding_loop.c:get_mv_from_fullmv
Unexecuted instantiation: ac_bias.c:get_mv_from_fullmv
Unexecuted instantiation: rc_aq.c:get_mv_from_fullmv
Unexecuted instantiation: rc_process.c:get_mv_from_fullmv
Unexecuted instantiation: rc_rtc_cbr.c:get_mv_from_fullmv
Unexecuted instantiation: rc_vbr_cbr.c:get_mv_from_fullmv
Unexecuted instantiation: rd_cost.c:get_mv_from_fullmv
Unexecuted instantiation: reference_object.c:get_mv_from_fullmv
Unexecuted instantiation: resource_coordination_process.c:get_mv_from_fullmv
Unexecuted instantiation: rest_process.c:get_mv_from_fullmv
Unexecuted instantiation: restoration_pick.c:get_mv_from_fullmv
Unexecuted instantiation: sequence_control_set.c:get_mv_from_fullmv
Unexecuted instantiation: src_ops_process.c:get_mv_from_fullmv
Unexecuted instantiation: super_res.c:get_mv_from_fullmv
Unexecuted instantiation: svt_psnr.c:get_mv_from_fullmv
Unexecuted instantiation: kernel_dispatch.c:get_mv_from_fullmv
Unexecuted instantiation: temporal_filtering.c:get_mv_from_fullmv
Unexecuted instantiation: transforms.c:get_mv_from_fullmv
Unexecuted instantiation: utility.c:get_mv_from_fullmv
Unexecuted instantiation: encode_txb_ref_c.c:get_mv_from_fullmv
Unexecuted instantiation: filterintra_c.c:get_mv_from_fullmv
Unexecuted instantiation: adaptive_mv_pred.c:get_mv_from_fullmv
Unexecuted instantiation: block_structures.c:get_mv_from_fullmv
Unexecuted instantiation: coding_loop.c:get_mv_from_fullmv
Unexecuted instantiation: coding_unit.c:get_mv_from_fullmv
Unexecuted instantiation: deblocking_filter.c:get_mv_from_fullmv
Unexecuted instantiation: encode_context.c:get_mv_from_fullmv
Unexecuted instantiation: global_me.c:get_mv_from_fullmv
Unexecuted instantiation: global_me_cost.c:get_mv_from_fullmv
Unexecuted instantiation: me_context.c:get_mv_from_fullmv
Unexecuted instantiation: rc_crf_cqp.c:get_mv_from_fullmv
Unexecuted instantiation: enc_warped_motion.c:get_mv_from_fullmv
71
72
0
static INLINE void clamp_mv(Mv* mv, int32_t min_col, int32_t max_col, int32_t min_row, int32_t max_row) {
73
0
    mv->x = (int16_t)clamp(mv->x, min_col, max_col);
74
0
    mv->y = (int16_t)clamp(mv->y, min_row, max_row);
75
0
}
Unexecuted instantiation: enc_handle.c:clamp_mv
Unexecuted instantiation: enc_settings.c:clamp_mv
Unexecuted instantiation: av1me.c:clamp_mv
Unexecuted instantiation: cdef_process.c:clamp_mv
Unexecuted instantiation: common_utils.c:clamp_mv
Unexecuted instantiation: deblocking_common.c:clamp_mv
Unexecuted instantiation: dlf_process.c:clamp_mv
Unexecuted instantiation: enc_cdef.c:clamp_mv
Unexecuted instantiation: enc_dec_process.c:clamp_mv
Unexecuted instantiation: enc_inter_prediction.c:clamp_mv
Unexecuted instantiation: enc_intra_prediction.c:clamp_mv
Unexecuted instantiation: enc_mode_config.c:clamp_mv
Unexecuted instantiation: entropy_coding.c:clamp_mv
Unexecuted instantiation: ec_process.c:clamp_mv
Unexecuted instantiation: full_loop.c:clamp_mv
Unexecuted instantiation: initial_rc_process.c:clamp_mv
Unexecuted instantiation: inter_prediction.c:clamp_mv
Unexecuted instantiation: intra_prediction.c:clamp_mv
Unexecuted instantiation: inv_transforms.c:clamp_mv
Unexecuted instantiation: md_rate_estimation.c:clamp_mv
Unexecuted instantiation: mode_decision.c:clamp_mv
Unexecuted instantiation: md_config_process.c:clamp_mv
Unexecuted instantiation: md_process.c:clamp_mv
Unexecuted instantiation: motion_estimation.c:clamp_mv
Unexecuted instantiation: me_process.c:clamp_mv
Unexecuted instantiation: noise_model.c:clamp_mv
Unexecuted instantiation: packetization_process.c:clamp_mv
Unexecuted instantiation: pic_analysis_process.c:clamp_mv
Unexecuted instantiation: pcs.c:clamp_mv
Unexecuted instantiation: pd_process.c:clamp_mv
Unexecuted instantiation: pd_results.c:clamp_mv
Unexecuted instantiation: pic_manager_process.c:clamp_mv
Unexecuted instantiation: pic_operators.c:clamp_mv
Unexecuted instantiation: pred_structure.c:clamp_mv
Unexecuted instantiation: product_coding_loop.c:clamp_mv
Unexecuted instantiation: ac_bias.c:clamp_mv
Unexecuted instantiation: rc_aq.c:clamp_mv
Unexecuted instantiation: rc_process.c:clamp_mv
Unexecuted instantiation: rc_rtc_cbr.c:clamp_mv
Unexecuted instantiation: rc_vbr_cbr.c:clamp_mv
Unexecuted instantiation: rd_cost.c:clamp_mv
Unexecuted instantiation: reference_object.c:clamp_mv
Unexecuted instantiation: resource_coordination_process.c:clamp_mv
Unexecuted instantiation: rest_process.c:clamp_mv
Unexecuted instantiation: restoration_pick.c:clamp_mv
Unexecuted instantiation: sequence_control_set.c:clamp_mv
Unexecuted instantiation: src_ops_process.c:clamp_mv
Unexecuted instantiation: super_res.c:clamp_mv
Unexecuted instantiation: svt_psnr.c:clamp_mv
Unexecuted instantiation: kernel_dispatch.c:clamp_mv
Unexecuted instantiation: temporal_filtering.c:clamp_mv
Unexecuted instantiation: transforms.c:clamp_mv
Unexecuted instantiation: utility.c:clamp_mv
Unexecuted instantiation: encode_txb_ref_c.c:clamp_mv
Unexecuted instantiation: filterintra_c.c:clamp_mv
Unexecuted instantiation: adaptive_mv_pred.c:clamp_mv
Unexecuted instantiation: block_structures.c:clamp_mv
Unexecuted instantiation: coding_loop.c:clamp_mv
Unexecuted instantiation: coding_unit.c:clamp_mv
Unexecuted instantiation: deblocking_filter.c:clamp_mv
Unexecuted instantiation: encode_context.c:clamp_mv
Unexecuted instantiation: global_me.c:clamp_mv
Unexecuted instantiation: global_me_cost.c:clamp_mv
Unexecuted instantiation: me_context.c:clamp_mv
Unexecuted instantiation: rc_crf_cqp.c:clamp_mv
Unexecuted instantiation: enc_warped_motion.c:clamp_mv
76
#ifdef __cplusplus
77
} // extern "C"
78
#endif
79
80
#endif // AOM_AV1_COMMON_MV_H_