什么是个体工商户| 蜜蜡和琥珀有什么区别| 什么是有氧运动和无氧运动| 减肥适合吃什么主食| 口腔脱皮是什么原因引起的| 什么是奇数什么是偶数| 6d是什么意思| 什么| 做蛋糕需要什么食材| 陈可以组什么词| 9月21日是什么星座| 甘油三酯低是什么原因| 病字旁加且念什么| 侃侃而谈什么意思| 自然卷的头发适合什么发型| 拔火罐起水泡是什么原因| 舌头边缘有齿痕是什么原因| 18号来月经什么时候是排卵期| 肚子长痘痘是什么原因| 真丝姆米是什么意思| 打嗝吃什么药好| 焦急的什么| 政治面貌是什么意思| 茉莉龙珠是什么茶| 林黛玉是个什么样的人| 鼠冲什么生肖| 痔疮是什么样子的图片大全| 千里走单骑是什么意思| 守夜是什么意思| carrera手表什么牌子| 月牙是什么| 护法是什么意思| 顶针什么意思| 钱是什么单位| 吃激素有什么副作用| 水浒传什么朝代| 螃蟹吃什么食物| 小孩喜欢趴着睡觉是什么原因| 地屈孕酮片什么时候吃| 早上起床眼睛浮肿是什么原因| 巧囊是什么原因形成的| 白介素是什么| olay是什么品牌| 马克华菲属于什么档次| r医学是什么意思| 酸菜鱼是什么地方的菜| 贵族是什么意思啊| 阴历三月是什么星座| 不完全性右束支传导阻滞是什么意思| 吩咐是什么意思| 亲亲抱抱举高高什么意思| 蒸桑拿是什么意思| 猪鬃为什么是战略物资| 专台号是什么意思| 细水长流是什么生肖| 呼吸音粗是什么原因| 甲状腺结节对身体有什么影响| 虎眼石五行属什么| fmp是什么意思| 阴道吹气是什么原因| 飞机杯长什么样| 粘胶是什么材质| 外痔疼痛用什么药最好| graff是什么牌子| 哼唧是什么意思| 总放屁是什么病的前兆| 血糖30多有什么危险| 大安是什么意思| 无花果和什么不能一起吃| wdf是什么意思| 紫微斗数是什么| 被蜜蜂蛰了有什么好处| 气血不足吃什么药最好| 梦见摘丝瓜有什么预兆| 沈腾和马丽是什么关系| 尿酸偏低是什么原因| 梦见自己和别人结婚是什么意思| 第一次查怀孕挂什么科| 我国的国花是什么花| 喉咙老是有白痰是什么原因| 瘦脱相是什么意思| 1996年出生属什么生肖| 禁的部首是什么| 猿人头是什么牌子| 女人做春梦预示着什么| 什么什么纸贵| 膝关节痛挂什么科| b族维生素什么时候吃效果最好| 什么品牌奶粉好消化| friend什么意思中文| 什么是肌无力| 六月飞雪是什么意思| 什么可以变白皮肤| 为什么会得子宫肌瘤| 人体的三道防线是什么| 医生说宝宝趴着在暗示着什么| 中秋吃什么| 丰衣足食是什么意思| 腋下发黑是什么原因| 两个吉念什么| 小便分叉是什么症状| 手指指尖发麻是什么原因| 公主什么意思| 聚乙烯醇是什么材料| 秀才指什么生肖| 印度尼西亚是什么人种| 卷柏属于什么植物| 2014属什么生肖| 什么病不能吃豆制品| 为什么不建议打水光针| Joyce什么意思| 玮五行属什么| 什么样的房子风水好| 绿豆可以和什么一起煮| 口腔溃疡需要补充什么维生素| 金蝉脱壳是什么意思| 医学美容技术学什么| 空调除湿是什么标志| 手机壳什么材质好| 斯德哥尔摩综合症是什么意思| 保花保果用什么药最好| 什么方法可以治打嗝| 海字五行属什么| 什么症状吃藿香清胃胶囊| 梦见背小孩是什么意思| ur是什么意思| 老年性阴道炎用什么药| 向日葵花语是什么| jojo是什么意思| 刘邦属什么生肖| 经血发黑是什么原因| 什么路不能走| 六合是什么意思| 脆皮鸭什么意思| 早上起来眼皮肿是什么原因| 谭咏麟属什么生肖| 口水臭什么原因| 镭射有什么危害| ec是什么意思| 七月十号是什么日子| 尿路结石吃什么药| 雌激素低吃什么药| 脑梗应该挂什么科| 8月23是什么星座| 以下是什么意思| collection什么牌子| 人工肝是什么意思| 头发掉是什么原因引起的| 太阳出来我爬山坡是什么歌| 卿本佳人什么意思| 吸气是什么意思| 什么是神经官能症| 冠状动脉钙化是什么意思| 祁是什么意思| 人参和什么泡酒能壮阳| 和尚代表什么生肖| 2044年是什么年| 什么水果含维生素d| 脂溢性脱发用什么洗发水好| 理疗师是做什么的| 双子座是什么星象| 银耳有什么作用| 天麻能治什么病| 耳朵有回音是什么原因| 沉住气是什么意思| 农历7月21日是什么星座| 转氨酶偏高是什么原因引起的| 身上起疙瘩是什么原因| 农历六月六是什么日子| 什么叫黑户| 乙肝45阳性什么意思| 买碗有什么讲究| 什么星座最厉害| 赖氨酸有什么作用| 阿莫西林是治什么的| 孕妇适合喝什么牛奶| 521是什么星座| 鲨鱼是什么动物| cor是什么意思| 酸梅汤什么人不能喝| 两岁宝宝不开口说话是什么原因| 三文鱼为什么可以生吃| 脆肉鲩是什么鱼| 唐僧是什么菩萨| 山根有痣代表什么| 面部神经挂什么科| 拍身份证照片穿什么颜色衣服好看| ch是什么| rh血型阴性是什么意思| 手筋痛是什么原因| nuxe是什么牌子| 一月七号是什么星座| 孕妇耻骨疼是什么原因| 老年人补什么钙效果最好| 什么地看| 处女男和什么星座最配| 罗汉果是什么| 挪车打什么电话| 很low是什么意思| 豆柏是什么| 华佗属什么生肖| 百步穿杨是什么意思| 张若昀原名叫什么| b超属于什么科室| 棉是什么面料| 山楂干泡水喝有什么功效| 大便硬是什么原因| 官印是什么意思| 苏铁是什么植物| 癫痫挂什么科| pic什么意思| 人老放屁是什么原因| 记忆力减退吃什么药| 10.14是什么星座| 舌苔厚吃什么药| 牙齿上有黄斑是什么原因| 1938年中国发生了什么| 红海为什么叫红海| 星期一右眼皮跳是什么预兆| 口干舌燥是什么原因| 真知灼见什么意思| 精神内科一般检查什么| 口腔异味挂什么科| 香椿是什么| 泛醇是什么| 多汗症看什么科| 西凤酒属于什么香型| 什么叫两会| 风湿性关节炎用什么药效果好| 7月属什么生肖| 象牙带身上有什么好处| 随访是什么意思| 霸王别姬讲的是什么故事| 胆囊壁结晶是什么意思| 密度单位是什么| 主观臆断是什么意思| 什么的成长| 什么是重力| 什么洗面奶好| 山楂不能和什么一起吃| 1.27是什么星座| 内什么外什么成语| 转氨酶高有什么危害| 吊是什么意思| 肠胃炎引起的发烧吃什么药| 什么长而去| 毛峰是什么茶| 左肾钙化灶什么意思| 细胞由什么组成| 孽债是什么意思| 脉压差小是什么原因| 大脖子病有什么症状| 水肿吃什么消肿最快| 世界最大的岛是什么岛| 结婚纪念日送什么花| 黄丫头是什么鱼| 释迦摩尼是什么意思| 舌头破了是什么原因| 什么是冷血动物| hov是什么意思| 阿司匹林什么时候吃| 点痣用什么方法最好| 备孕不能吃什么| 口臭喝什么茶效果最好| 百度

美国原油库存下降 国际油价21日上涨


Directory: ../../../ffmpeg/
File: src/libavcodec/vpx_rac.h
Date: 2025-08-04 00:43:16
Exec Total Coverage
Lines: 38 38 100.0%
Functions: 4 4 100.0%
Branches: 12 12 100.0%

Line Branch Exec Source
1 /*
2 * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org>
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (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 GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 /**
22 * @file
23 * Common VP5-VP9 range decoder stuff
24 */
25
26 #ifndef AVCODEC_VPX_RAC_H
27 #define AVCODEC_VPX_RAC_H
28
29 #include <stdint.h>
30
31 #include "config.h"
32 #include "libavutil/attributes.h"
33 #include "bytestream.h"
34
35 typedef struct VPXRangeCoder {
36 int high;
37 int bits; /* stored negated (i.e. negative "bits" is a positive number of
38 bits left) in order to eliminate a negate in cache refilling */
39 const uint8_t *buffer;
40 const uint8_t *end;
41 unsigned int code_word;
42 int end_reached;
43 } VPXRangeCoder;
44
45 extern const uint8_t ff_vpx_norm_shift[256];
46 int ff_vpx_init_range_decoder(VPXRangeCoder *c, const uint8_t *buf, int buf_size);
47
48 /**
49 * returns 1 if the end of the stream has been reached, 0 otherwise.
50 */
51 838133 static av_always_inline int vpx_rac_is_end(VPXRangeCoder *c)
52 {
53
4/4
✓ Branch 0 taken 32252 times.
✓ Branch 1 taken 805881 times.
✓ Branch 2 taken 11 times.
✓ Branch 3 taken 32241 times.
838133 if (c->end <= c->buffer && c->bits >= 0)
54 11 c->end_reached ++;
55 838133 return c->end_reached > 10;
56 }
57
58 100259306 static av_always_inline unsigned int vpx_rac_renorm(VPXRangeCoder *c)
59 {
60 100259306 int shift = ff_vpx_norm_shift[c->high];
61 100259306 int bits = c->bits;
62 100259306 unsigned int code_word = c->code_word;
63
64 100259306 c->high <<= shift;
65 100259306 code_word <<= shift;
66 100259306 bits += shift;
67
4/4
✓ Branch 0 taken 4338011 times.
✓ Branch 1 taken 95921295 times.
✓ Branch 2 taken 4337474 times.
✓ Branch 3 taken 537 times.
100259306 if(bits >= 0 && c->buffer < c->end) {
68 4337474 code_word |= bytestream_get_be16(&c->buffer) << bits;
69 4337474 bits -= 16;
70 }
71 100259306 c->bits = bits;
72 100259306 return code_word;
73 }
74
75 #if ARCH_ARM
76 #include "arm/vpx_arith.h"
77 #elif ARCH_X86
78 #include "x86/vpx_arith.h"
79 #endif
80
81 #ifndef vpx_rac_get_prob
82 #define vpx_rac_get_prob vpx_rac_get_prob
83 static av_always_inline int vpx_rac_get_prob(VPXRangeCoder *c, uint8_t prob)
84 {
85 unsigned int code_word = vpx_rac_renorm(c);
86 unsigned int low = 1 + (((c->high - 1) * prob) >> 8);
87 unsigned int low_shift = low << 16;
88 int bit = code_word >= low_shift;
89
90 c->high = bit ? c->high - low : low;
91 c->code_word = bit ? code_word - low_shift : code_word;
92
93 return bit;
94 }
95 #endif
96
97 #ifndef vpx_rac_get_prob_branchy
98 // branchy variant, to be used where there's a branch based on the bit decoded
99 68787132 static av_always_inline int vpx_rac_get_prob_branchy(VPXRangeCoder *c, int prob)
100 {
101 68787132 unsigned long code_word = vpx_rac_renorm(c);
102 68787132 unsigned low = 1 + (((c->high - 1) * prob) >> 8);
103 68787132 unsigned low_shift = low << 16;
104
105
2/2
✓ Branch 0 taken 31653697 times.
✓ Branch 1 taken 37133435 times.
68787132 if (code_word >= low_shift) {
106 31653697 c->high -= low;
107 31653697 c->code_word = code_word - low_shift;
108 31653697 return 1;
109 }
110
111 37133435 c->high = low;
112 37133435 c->code_word = code_word;
113 37133435 return 0;
114 }
115 #endif
116
117 1595111 static av_always_inline int vpx_rac_get(VPXRangeCoder *c)
118 {
119 1595111 unsigned int code_word = vpx_rac_renorm(c);
120 /* equiprobable */
121 1595111 int low = (c->high + 1) >> 1;
122 1595111 unsigned int low_shift = low << 16;
123 1595111 int bit = code_word >= low_shift;
124
2/2
✓ Branch 0 taken 800425 times.
✓ Branch 1 taken 794686 times.
1595111 if (bit) {
125 800425 c->high -= low;
126 800425 code_word -= low_shift;
127 } else {
128 794686 c->high = low;
129 }
130
131 1595111 c->code_word = code_word;
132 1595111 return bit;
133 }
134
135 #endif /* AVCODEC_VPX_RAC_H */
136

口腔疱疹用什么药 下面有异味是什么原因 文曲星下凡是什么意思 高瞻远瞩是什么生肖 hm是什么牌子
一直打嗝是什么原因引起的 微米是什么单位 煮玉米加盐有什么好处 guava是什么水果 痔疮是什么样子的图片大全
得济是什么意思 肝火旺吃什么好 镜花水月什么意思 避孕药叫什么 频繁做噩梦是什么原因
ash是什么牌子 奶嚼口是什么 孕期什么时候补钙 腊肉炒什么好吃 人体含量最多的元素是什么
胎儿右肾盂分离是什么意思hcv7jop4ns6r.cn 什么叫脑白质病变hcv7jop6ns9r.cn 马甲线是什么意思hcv9jop7ns3r.cn 相貌是什么意思hcv8jop9ns1r.cn 什么然而至hcv9jop5ns2r.cn
牙龈起泡是什么原因onlinewuye.com 射精什么意思hcv8jop6ns1r.cn 抓阄什么意思hcv7jop5ns6r.cn 什么叫刑事拘留bysq.com 凉烟都有什么牌子hcv8jop4ns2r.cn
什么是根管治疗牙齿zhongyiyatai.com 什么提示你怀了女宝宝zhongyiyatai.com 白芨有什么作用和功效hcv9jop5ns8r.cn 经常打哈欠是什么原因kuyehao.com 老学究什么意思hcv9jop5ns6r.cn
寮房是什么意思hcv9jop2ns7r.cn 五月七日是什么星座hcv9jop0ns5r.cn 大卡是什么意思hcv8jop2ns0r.cn 香港脚是什么症状图片hcv7jop9ns7r.cn 促狭一笑是什么意思hcv8jop3ns5r.cn
百度