肺结节挂什么科室| touch什么意思| 肺门不大是什么意思| ed50是什么意思| 永无止境是什么意思| 绕行是什么意思| 茂密的枝叶像什么| 早上八点是什么时辰| 尿失禁是什么症状| 果五行属什么| 血友病是什么| 来大姨妈吃什么好| 非萎缩性胃窦炎是什么意思| 白细胞低有什么危险| 梦见生女孩是什么征兆| 老打饱嗝是什么原因| 眼白发黄是什么原因| 11月16号是什么星座| 喉咙疼痛吃什么药| 简称是什么意思| 世界上笔画最多的字是什么| 山东都有什么大学| 父亲节要送什么礼物好| 牙龈萎缩吃什么药| 1210是什么星座| 亚麻酸是什么东西| 女人三十如狼四十如虎什么意思| 早上一杯温开水有什么好处| 嗓子沙哑是什么原因| 投桃报李是什么生肖| 属蛇男和什么属相最配| 过敏能吃什么| 吃什么东西可以减肥| 血脂高吃什么蔬菜好| force是什么牌子| 花生什么时候收| 人流后能吃什么水果| 乳头有点痒是什么原因| 下眼袋大是什么原因引起的| 幽会是什么意思| llbean是什么牌子| 舌头肥厚是什么原因| 三周年祭奠有什么讲究| 兔死什么悲| 麻烦是什么意思| 梅花什么时候开| 肠胃炎拉肚子吃什么药| 什么是正颌手术| 疤痕增生是什么| 梦见舅舅是什么意思| 重孙是什么意思| 女人的逼是什么意思| 脑部磁共振检查什么| 1999属什么| 助听器什么价位| 半套是什么意思| cvm是什么意思| 荞麦枕头有什么好处| 刮痧是什么原理| 自理是什么意思| 6月20是什么星座| 腰椎mri是什么检查| 染指是什么意思| 赤砂糖是什么糖| 舌裂吃什么药| 内分泌失调是什么原因引起的| 3人死亡属于什么事故| 男性腰疼挂什么科| 无感什么意思| 一把手是什么意思| 喝了藿香正气水不能吃什么| 地铁和高铁有什么区别| mono是什么意思| 虔婆是什么意思| 植物神经紊乱吃什么中成药| 奕字五行属什么| 后脑勺痛什么原因引起的| 金针菇不能和什么一起吃| 肌肉僵硬是什么原因引起的| 染色体由什么组成| 打鸟是什么意思| 为什么第一次进不去| 高血压吃什么药| 碳水化合物对人体有什么作用| hcr是什么意思| 什么是真心| 1964属什么| 龄字五行属什么| 史努比是什么意思| 发配是什么意思| 理疗师是做什么的| 朋友开业送什么礼物好| 胎囊是什么| 丧尽天良什么意思| 纾字五行属什么| 咽喉炎吃什么消炎药| 特朗普为什么叫川普| 月经9天了还没干净是什么原因| 九月生日是什么星座| 屏风是什么| 什么东西解酒最好最快| 不孕不育有什么症状| 体毛多是什么原因| 不以为然什么意思| 美业是什么行业| 龙凤胎是什么意思| 天津市市长是什么级别| 逍遥丸配什么治失眠| 吃什么有助于骨头愈合| sp是什么意思啊| 感同身受什么意思| 创意是什么意思| 岳云鹏什么学历| 煲蛇汤放什么材料好| 骨密度检查是查什么| 湿疹什么原因引起的| 丽江机场叫什么名字| 眼睛出血什么原因| 风度是什么意思| 5月28日什么星座| 33代表什么意思| 双侧卵巢多囊样改变是什么意思| 小孩手指头脱皮是什么原因| 珍珠粉加蜂蜜做面膜有什么作用| 地中海贫血是什么原因引起的| 低密度脂蛋白高吃什么药| 兵员预征是什么意思| 健身吃蛋白粉有什么好处和坏处| 绩效工资是什么意思| 梦见着大火了是什么征兆| 乳房胀痛吃什么药| 胃窦肠化是什么意思| 多囊是什么原因造成的| 甲状腺做什么检查最准确| aq什么意思| 挚爱和至爱有什么区别| 手不释卷的释是什么意思| 乾隆叫什么| ac疫苗是预防什么的| 舌苔黄厚吃什么药| 半路杀出个程咬金是什么意思| 乐得什么填词语| 心跳慢吃什么药| 四个又念什么| 万宝龙属于什么档次| 碉堡是什么意思啊| 二便是什么意思| 陈皮为什么越陈越好| 中古包是什么意思| 筷子买什么材质的好| 大体重减肥做什么运动| 含羞草为什么会害羞| 照影是什么意思| 什么填海| 早上6点半是什么时辰| 棕色搭配什么颜色好看| 小孩白头发是什么原因引起的| 马蜂窝能治什么病| 属虎生什么属相宝宝好| 头皮长痘痘是什么原因| c肽高说明什么| 藿香泡水喝有什么好处| 口我什么意思| 胃一阵一阵绞痛是什么原因| 陆代表什么生肖| 早上左眼跳是什么预兆| 射手座和什么星座最配| 把脉能看出什么隐私| 什么的雾霾| 清明节干什么| cpi是什么意思| 心有戚戚焉什么意思| 最好的烟是什么牌子| 肉燕是什么| 宫颈糜烂有什么症状和现象| 山竹有什么功效和作用| 脸上痣多是什么原因| 蜘蛛喜欢吃什么| 护理学是干什么的| 美国绿卡有什么好处| 右胳膊麻木是什么征兆| 咳喘是什么原因| 白癜风是什么原因引起的| 鼠妇是什么动物| 农历今天属什么生肖| 蚝油是什么做的| 兔子吃什么| 过氧化氢浓度阳性是什么意思| 白带有血是什么原因| 巨蟹座什么性格| lz什么意思| 1907年属什么生肖| 一什么枣| 经常吃豆腐有什么好处和坏处| 甘油是什么成分| 喝山楂水有什么功效与作用| 7月30号是什么星座| 属马的生什么属相的宝宝好| 小黄鱼是什么鱼| 手心发黄是什么原因| 尿频繁什么原因| 什么叫四维空间| 鞭尸是什么意思| 1月21日什么星座| 前列腺彩超能查出什么| 鞘是什么意思| 男孩长虎牙预示什么| 上吐下泻吃什么好| 尿酸高可以吃什么水果| 人中跳动是什么原因| 蒜气是什么病| 四面受敌是什么动物| 脚底发凉是什么原因| 舌根痛吃什么药好得快| 拔完牙不能吃什么| 卵泡期是什么意思| 尿白蛋白高是什么原因| 石斛有什么用| 灸石门为什么会不孕| 补锌吃什么药| 二聚体偏高是什么原因| 补肾吃什么药效果最好| 吃什么水果对肺好| 怀孕小肚子疼是什么原因| 喝中药不能吃什么食物| 内膜厚吃什么药掉内膜| 狗眼看人低是什么意思| 被cue是什么意思| 帝陀表什么档次| 血管瘤是什么引起的| 肺结节不能吃什么食物| 游走是什么意思| 祛斑产品什么好| 乳酸杆菌少或无是什么意思| 闪点什么意思| 什么是c刊| 家里什么东西止血最快| ua医学上是什么意思| 为什么水不会燃烧| 宝宝咳嗽流鼻涕吃什么药| 小肠换气什么症状| 一垒二垒三垒全垒打是什么意思| 蚂蚁喜欢吃什么食物| 龟头炎是什么症状| 竹心泡水喝有什么功效| 什么是保健品| a货翡翠是什么意思| 金银花泡水喝有什么功效| 腰疼吃点什么药| 手脚不协调是什么原因| 1983年出生是什么命| 无情无义什么意思| 血糖高一日三餐吃什么东西最适合| 树叶为什么是绿色的| 十万左右买什么车好| 小学生什么时候放假| 阴道细菌感染用什么药| 不停的出汗是什么原因| 盛夏什么意思| 孟子姓什么| 表述是什么意思| 落枕是什么原因| 铁锈是什么颜色的| 两小无猜是什么意思| 百度

塔塔粉是什么粉


Directory: ../../../ffmpeg/
File: src/tests/checkasm/hevc_sao.c
Date: 2025-08-05 11:35:17
Exec Total Coverage
Lines: 56 56 100.0%
Functions: 3 3 100.0%
Branches: 42 56 75.0%

Line Branch Exec Source
1 /*
2 * Copyright (c) 2018 Yingming Fan <yingmingfan@gmail.com>
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 #include <string.h>
22
23 #include "libavutil/intreadwrite.h"
24 #include "libavutil/mem_internal.h"
25
26 #include "libavcodec/hevc/dsp.h"
27
28 #include "checkasm.h"
29
30 static const uint32_t pixel_mask[3] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff };
31 static const uint32_t sao_size[5] = {8, 16, 32, 48, 64};
32
33 #define SIZEOF_PIXEL ((bit_depth + 7) / 8)
34 #define PIXEL_STRIDE (2*MAX_PB_SIZE + AV_INPUT_BUFFER_PADDING_SIZE) //same with sao_edge src_stride
35 #define BUF_SIZE (PIXEL_STRIDE * (64+2) * 2) //+2 for top and bottom row, *2 for high bit depth
36 #define OFFSET_THRESH (1 << (bit_depth - 5))
37 #define OFFSET_LENGTH 5
38
39 #define randomize_buffers(buf0, buf1, size) \
40 do { \
41 uint32_t mask = pixel_mask[(bit_depth - 8) >> 1]; \
42 int k; \
43 for (k = 0; k < size; k += 4) { \
44 uint32_t r = rnd() & mask; \
45 AV_WN32A(buf0 + k, r); \
46 AV_WN32A(buf1 + k, r); \
47 } \
48 } while (0)
49
50 #define randomize_buffers2(buf, size) \
51 do { \
52 uint32_t max_offset = OFFSET_THRESH; \
53 int k; \
54 if (bit_depth == 8) { \
55 for (k = 0; k < size; k++) { \
56 uint8_t r = rnd() % max_offset; \
57 buf[k] = r; \
58 } \
59 } else { \
60 for (k = 0; k < size; k++) { \
61 uint16_t r = rnd() % max_offset; \
62 buf[k] = r; \
63 } \
64 } \
65 } while (0)
66
67 39 static void check_sao_band(HEVCDSPContext *h, int bit_depth)
68 {
69 int i;
70 39 PIXEL_RECT(dst0, MAX_PB_SIZE, MAX_PB_SIZE);
71 39 PIXEL_RECT(dst1, MAX_PB_SIZE, MAX_PB_SIZE);
72 39 LOCAL_ALIGNED_32(uint8_t, src0, [BUF_SIZE]);
73 39 LOCAL_ALIGNED_32(uint8_t, src1, [BUF_SIZE]);
74 int16_t offset_val[OFFSET_LENGTH];
75 39 int left_class = rnd()%32;
76 39 const int walign = 16;
77
78
2/2
✓ Branch 0 taken 195 times.
✓ Branch 1 taken 39 times.
234 for (i = 0; i <= 4; i++) {
79 195 int block_size = sao_size[i];
80
2/2
✓ Branch 0 taken 156 times.
✓ Branch 1 taken 39 times.
195 int prev_size = i > 0 ? sao_size[i - 1] : 0;
81 195 ptrdiff_t stride = PIXEL_STRIDE*SIZEOF_PIXEL;
82 195 declare_func(void, uint8_t *dst, const uint8_t *src, ptrdiff_t dst_stride, ptrdiff_t src_stride,
83 const int16_t *sao_offset_val, int sao_left_class, int width, int height);
84
85
2/2
✓ Branch 3 taken 60 times.
✓ Branch 4 taken 135 times.
195 if (check_func(h->sao_band_filter[i], "hevc_sao_band_%d_%d", block_size, bit_depth)) {
86
87
2/2
✓ Branch 0 taken 192 times.
✓ Branch 1 taken 60 times.
252 for (int w = prev_size + 4; w <= block_size; w += 4) {
88
2/2
✓ Branch 1 taken 1216512 times.
✓ Branch 2 taken 192 times.
1216704 randomize_buffers(src0, src1, BUF_SIZE);
89
6/6
✓ Branch 0 taken 64 times.
✓ Branch 1 taken 128 times.
✓ Branch 3 taken 320 times.
✓ Branch 4 taken 64 times.
✓ Branch 6 taken 640 times.
✓ Branch 7 taken 128 times.
1152 randomize_buffers2(offset_val, OFFSET_LENGTH);
90 192 CLEAR_PIXEL_RECT(dst0);
91 192 CLEAR_PIXEL_RECT(dst1);
92
93 192 call_ref(dst0, src0, dst0_stride, stride, offset_val, left_class, w, block_size);
94 192 call_new(dst1, src1, dst1_stride, stride, offset_val, left_class, w, block_size);
95
2/2
✓ Branch 0 taken 128 times.
✓ Branch 1 taken 64 times.
192 checkasm_check_pixel_padded_align(dst0, dst0_stride, dst1, dst1_stride, w, block_size, "dst", walign, 1);
96 }
97
1/8
✗ Branch 1 not taken.
✓ Branch 2 taken 60 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
60 bench_new(dst1, src1, dst1_stride, stride, offset_val, left_class, block_size, block_size);
98 }
99 }
100 39 }
101
102 39 static void check_sao_edge(HEVCDSPContext *h, int bit_depth)
103 {
104 int i;
105 39 PIXEL_RECT(dst0, MAX_PB_SIZE, MAX_PB_SIZE);
106 39 PIXEL_RECT(dst1, MAX_PB_SIZE, MAX_PB_SIZE);
107 39 LOCAL_ALIGNED_32(uint8_t, src0, [BUF_SIZE]);
108 39 LOCAL_ALIGNED_32(uint8_t, src1, [BUF_SIZE]);
109 int16_t offset_val[OFFSET_LENGTH];
110 39 int eo = rnd()%4;
111 39 const int walign = 16;
112
113
2/2
✓ Branch 0 taken 195 times.
✓ Branch 1 taken 39 times.
234 for (i = 0; i <= 4; i++) {
114 195 int block_size = sao_size[i];
115
2/2
✓ Branch 0 taken 156 times.
✓ Branch 1 taken 39 times.
195 int prev_size = i > 0 ? sao_size[i - 1] : 0;
116 195 int offset = (AV_INPUT_BUFFER_PADDING_SIZE + PIXEL_STRIDE)*SIZEOF_PIXEL;
117 195 declare_func(void, uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst,
118 const int16_t *sao_offset_val, int eo, int width, int height);
119
120
2/2
✓ Branch 3 taken 43 times.
✓ Branch 4 taken 152 times.
195 if (check_func(h->sao_edge_filter[i], "hevc_sao_edge_%d_%d", block_size, bit_depth)) {
121
2/2
✓ Branch 0 taken 140 times.
✓ Branch 1 taken 43 times.
183 for (int w = prev_size + 4; w <= block_size; w += 4) {
122
2/2
✓ Branch 1 taken 887040 times.
✓ Branch 2 taken 140 times.
887180 randomize_buffers(src0, src1, BUF_SIZE);
123
6/6
✓ Branch 0 taken 44 times.
✓ Branch 1 taken 96 times.
✓ Branch 3 taken 220 times.
✓ Branch 4 taken 44 times.
✓ Branch 6 taken 480 times.
✓ Branch 7 taken 96 times.
840 randomize_buffers2(offset_val, OFFSET_LENGTH);
124 140 CLEAR_PIXEL_RECT(dst0);
125 140 CLEAR_PIXEL_RECT(dst1);
126
127 140 call_ref(dst0, src0 + offset, dst0_stride, offset_val, eo, w, block_size);
128 140 call_new(dst1, src1 + offset, dst1_stride, offset_val, eo, w, block_size);
129
2/2
✓ Branch 0 taken 96 times.
✓ Branch 1 taken 44 times.
140 checkasm_check_pixel_padded_align(dst0, dst0_stride, dst1, dst1_stride, w, block_size, "dst", walign, 1);
130 }
131
1/8
✗ Branch 1 not taken.
✓ Branch 2 taken 43 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
43 bench_new(dst1, src1 + offset, dst1_stride, offset_val, eo, block_size, block_size);
132 }
133 }
134 39 }
135
136 13 void checkasm_check_hevc_sao(void)
137 {
138 int bit_depth;
139
140
2/2
✓ Branch 0 taken 39 times.
✓ Branch 1 taken 13 times.
52 for (bit_depth = 8; bit_depth <= 12; bit_depth += 2) {
141 HEVCDSPContext h;
142
143 39 ff_hevc_dsp_init(&h, bit_depth);
144 39 check_sao_band(&h, bit_depth);
145 }
146 13 report("sao_band");
147
148
2/2
✓ Branch 0 taken 39 times.
✓ Branch 1 taken 13 times.
52 for (bit_depth = 8; bit_depth <= 12; bit_depth += 2) {
149 HEVCDSPContext h;
150
151 39 ff_hevc_dsp_init(&h, bit_depth);
152 39 check_sao_edge(&h, bit_depth);
153 }
154 13 report("sao_edge");
155 13 }
156

人的反义词是什么 港澳通行证签注是什么意思 prc是什么 成都市市长是什么级别 1992属什么生肖
随诊复查是什么意思 嗜什么意思 1962年属什么生肖 鹅肝为什么那么贵 遗传代谢病是什么意思
出单是什么意思 南红是什么 倾注是什么意思 为什么下雨会打雷 农田种什么最赚钱
菲林是什么 胆囊炎吃什么药好得快 翻来覆去的覆什么意思 冥冥中是什么意思 脱肛吃什么药
picc是什么hcv8jop4ns2r.cn 公安局跟派出所有什么区别hcv7jop6ns6r.cn 什么叫姑息治疗hcv9jop5ns4r.cn 脸浮肿是什么病的前兆hcv8jop0ns8r.cn 中图分类号是什么hcv8jop3ns1r.cn
莲蓬是什么bjhyzcsm.com 为什么叫印度三哥bjhyzcsm.com 喝红茶对身体有什么好处hcv8jop1ns5r.cn 清醒的反义词是什么hcv8jop8ns7r.cn 骨龄是什么意思hcv9jop6ns4r.cn
后生可畏是什么意思gysmod.com 什么叫肺纤维化hcv8jop3ns7r.cn 家里停电了打什么电话wuhaiwuya.com 脖子上有肿块挂什么科hcv8jop0ns9r.cn phe是什么氨基酸hcv8jop7ns8r.cn
故宫什么时候建的hcv9jop0ns3r.cn 清朝什么时候灭亡的hcv9jop6ns8r.cn 女方起诉离婚需要什么证件hcv9jop7ns9r.cn 樊胜美是什么电视剧hcv9jop2ns6r.cn 肌张力高对宝宝有什么影响hcv8jop9ns1r.cn
百度