顾里为什么和席城睡了| 血脂稠吃什么药| 禅师是什么意思| 咳嗽痰中带血是什么原因| hpv检查挂什么科| 丹毒不能吃什么| 女属猪的和什么属相最配| 7年之痒是什么意思| 如果你是什么就什么造句| 鼻血止不住是什么原因| 外科和内科有什么区别| 簋是什么意思| 2月出生是什么星座| 耻骨疼是什么原因| 犀牛吃什么| 木有什么意思| yy什么意思| 脑梗怎么形成的原因是什么| 弯刀裤适合什么人穿| a型血和o型血生的孩子是什么血型| cva医学上是什么意思| 什么的饰品| 每天早上起床口苦是什么原因| mds是什么意思| hay什么意思| 一个九一个鸟念什么| 鱼工念什么| 胎心停了会有什么症状| 查肺部挂什么科| 枯木逢春是什么生肖| 舌苔发白是什么情况| 圣大保罗属于什么档次| 潜规则是什么意思| 推是什么意思| 啤酒加味精有什么作用| 锻炼pc肌有什么好处| glu是什么氨基酸| 胃溃疡适合吃什么食物| 例假量多是什么原因| 八面玲珑代表什么生肖| 梦见酒是什么意思| 印记是什么意思| 哥斯拉是什么| 12.28是什么星座| 溺水是什么意思| 蜂蜜加柠檬有什么功效和作用| 什么地什么| jacquemus是什么牌子| 胆囊小是什么原因| 沉香茶属于什么茶| 办健康证需要带什么证件| 鳕鱼是什么鱼| 算命先生是什么生肖| 早上起来心慌是什么原因| 角逐是什么意思| 心跳太慢吃什么药| 阑尾炎不能吃什么| 画龙点睛是什么意思| 农村什么赚钱| 感冒头疼吃什么药好| 眼睛痒吃什么药| 梦见下雨是什么预兆| 抗核抗体阳性对怀孕有什么影响| 胆结石是什么原因造成的| 晕车吃什么药| 水痘是什么病毒| 戏是什么意思| 包皮发炎红肿用什么药| 什么人不能喝丹参| 吊膀子是什么意思| 大姨妈来了能吃什么水果| 嘴唇发麻是什么病兆| 农历七月初七是什么节日| 为什么感冒会流鼻涕| 獭读什么| 色素沉着有什么办法可以去除| 倒班什么意思| 痛风用什么药治疗最好| 儿童说话晚去医院挂什么科| abc是什么药| 1956年是什么年| 什么是碱性食物| 宝宝是什么意思| 是什么梗| 炒菜什么时候放盐最合适| 88年的龙是什么命| 梦见家里发大水了是什么征兆| 出家人是什么意思| cd是什么元素| 跳蚤最怕什么东西| 朋友梦到我怀孕了是什么意思| 给孩子测骨龄应该挂什么科| 梦见黑色的蛇是什么意思| 幼儿园什么时候报名| 小宇宙是什么意思| 1938年属什么生肖| 肾气不足吃什么药好| 完全性右束支阻滞是什么意思| 月经2个月没来是什么原因| 白细胞中性粒细胞高是什么原因| 儿童感冒吃什么药| mrd是什么| 水车是什么意思| puppies什么意思| 为什么精子射不出来| 脚旁边骨头突出叫什么| 睡觉磨牙是什么情况| 牛肉丸子配什么菜好吃| 月字旁的有什么字| 再生障碍性贫血是什么病| 4.23是什么星座| 血为什么是红色的| 疝气嵌顿是什么意思| 牙龈萎缩是什么原因引起的| cnb是什么意思| 头发容易断是什么原因| 心脏造影是什么| 阿米巴是什么意思| wc的完整形式是什么| 肚脐眼痒是什么原因| 气血不足吃什么调理| 淋巴细胞偏低是什么原因| 对虾是什么虾| 蜂蜜和柠檬一起喝有什么作用| 甲流吃什么药| 去澳门需要什么证件| 心电监护pr是什么意思| 老年痴呆症又叫什么名字| 奔走相告的走是什么意思| 木命人五行缺什么| 什么是厌氧菌感染| 嘴唇上长水泡是什么原因| 高压氧舱治疗什么效果| 睡觉为什么流口水| 女人右手中指有痣代表什么| 减肥喝什么茶| 佛家思想的核心是什么| 生物学父亲是什么意思| 小孩上火吃什么药| 轻度三尖瓣反流是什么| 世事无常什么意思| 为什么会阑尾炎| 清明节有什么习俗| esrd医学上是什么意思| 办理护照需要什么| copd是什么病| imax电影是什么意思| 心有余而力不足什么意思| 白内障什么原因造成的| 因果业力是什么意思| 电解质水是什么| 世界上最小的动物是什么| 米豆腐是什么做的| 缘是什么生肖| ia是什么意思| dr拍片是检查什么的| 慢性咽喉炎吃什么药好| 胸口痛吃什么药| 青蛙吃什么东西| 七月八号什么星座| 小狗感冒症状是什么样的| 保育是什么意思| 囊性病变是什么意思| 海啸是什么意思| 维生素b补什么| 谷氨酰基转移酶高是什么原因| 调教什么意思| 狼吞虎咽是什么意思| 胃溃疡是什么意思| 燕窝是什么| 阅人无数什么意思| 姜子牙为什么没有封神| 送哥们什么礼物好| 中国第一长洞是什么| 阴道瘙痒用什么药最好| 埃及法老是什么意思| 检查胆囊挂什么科| kcal是什么意思| instagram是什么| 香港为什么不用人民币| fhr是什么意思| 什么是籍贯| 心悸什么意思| 阑尾炎可以吃什么水果| 心衰是什么病| 经常做梦是什么原因| 处长什么级别| 胃反酸吃什么食物好| 苦瓜有什么作用| 一花一世界一叶一菩提是什么意思| 咸池是什么意思| 蚂蚁喜欢吃什么| 青春期指什么年龄段| 什么是bg| 穷的生肖指什么生肖| 什么东西能让皮肤变白| 为什么十个络腮九个帅| 苔菜是什么菜| cima是什么证书| 息斯敏又叫什么药名| 得性病有什么症状| 等闲变却故人心却道故人心易变什么意思| 受虐倾向是什么意思| 面瘫去医院挂什么科| 牛不吃草是什么原因| 同房时阴道疼痛是什么原因| 血压高不能吃什么食物| 为什么女的会流水怎么回事| 吃黄芪有什么好处| 喊6个1是什么意思| 检查甲状腺挂什么科| 胸闷吃什么药| 打喷嚏很臭是什么原因| 手指甲变黑是什么原因| 张字五行属什么| 喜欢放屁是什么原因| 燕窝是什么东西做的| 为什么拉屎是绿色的| otc属于什么药| 阴虱用什么药最有效| 复合是什么意思| 宝宝病毒感染吃什么药效果好| 感冒黄痰吃什么药| 梦见和死去的亲人说话是什么意思| 五行什么生木| 最短的季节是什么| 乙肝五项一五阳性什么意思| 梦到捡到钱是什么预兆| 云雾茶属于什么茶| 吃什么能让子宫瘤变小| 什么叫相向而行| 晚餐吃什么好| 空调睡眠是什么意思| ozark是什么牌子| 吃牛肉有什么好处| 血压低吃什么能补上来| 2月29日是什么星座| 湿热吃什么食物好| 赛治是什么药| 每天吃三颗红枣有什么好处| 殊荣是什么意思| 白癜风是什么| 积聚病什么意思| 梦见海龟是什么意思| 瘟疫是什么病| 排骨和什么一起炖好吃| 回声不均匀是什么意思| 为什么额头反复长痘痘| 什么是ct检查| 晒伤了涂什么药| 梦见别人开车翻车是什么预兆| 诸是什么意思| 急性尿路感染吃什么药| 钰字五行属什么| 花生不能和什么一起吃| 孕早期头疼是什么原因| 肾结石什么不能吃| 用纸可以折什么| 心脑供血不足吃什么药效果最好| 一直以来是什么意思| 脸色发红什么原因| 乙肝对身体有什么影响| 幽门螺杆菌阳性是什么意思| 菠萝蜜什么季节成熟| 百度

达州将开展“网络市场监管行动”重拳整治市场乱象


Directory: ../../../ffmpeg/
File: src/libavcodec/av1_parse.h
Date: 2025-08-04 00:43:16
Exec Total Coverage
Lines: 37 41 90.2%
Functions: 2 2 100.0%
Branches: 24 30 80.0%

Line Branch Exec Source
1 /*
2 * AV1 common parsing code
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 #ifndef AVCODEC_AV1_PARSE_H
22 #define AVCODEC_AV1_PARSE_H
23
24 #include <limits.h>
25 #include <stdint.h>
26
27 #include "libavutil/error.h"
28 #include "libavutil/intmath.h"
29 #include "libavutil/macros.h"
30
31 #include "av1.h"
32 #include "get_bits.h"
33 #include "leb.h"
34
35 // OBU header fields + max leb128 length
36 #define MAX_OBU_HEADER_SIZE (2 + 8)
37
38 typedef struct AV1OBU {
39 /** Size of payload */
40 int size;
41 const uint8_t *data;
42
43 /**
44 * Size, in bits, of just the data, excluding the trailing_one_bit and
45 * any trailing padding.
46 */
47 int size_bits;
48
49 /** Size of entire OBU, including header */
50 int raw_size;
51 const uint8_t *raw_data;
52
53 int type;
54
55 int temporal_id;
56 int spatial_id;
57 } AV1OBU;
58
59 /** An input packet split into OBUs */
60 typedef struct AV1Packet {
61 AV1OBU *obus;
62 int nb_obus;
63 int obus_allocated;
64 unsigned obus_allocated_size;
65 } AV1Packet;
66
67 /**
68 * Extract an OBU from a raw bitstream.
69 *
70 * @note This function does not copy or store any bitstream data. All
71 * the pointers in the AV1OBU structure will be valid as long
72 * as the input buffer also is.
73 */
74 int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length,
75 void *logctx);
76
77 /**
78 * Split an input packet into OBUs.
79 *
80 * @note This function does not copy or store any bitstream data. All
81 * the pointers in the AV1Packet structure will be valid as
82 * long as the input buffer also is.
83 */
84 int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length,
85 void *logctx);
86
87 /**
88 * Free all the allocated memory in the packet.
89 */
90 void ff_av1_packet_uninit(AV1Packet *pkt);
91
92 1553 static inline int parse_obu_header(const uint8_t *buf, int buf_size,
93 int64_t *obu_size, int *start_pos, int *type,
94 int *temporal_id, int *spatial_id)
95 {
96 GetBitContext gb;
97 int ret, extension_flag, has_size_flag;
98 int64_t size;
99
100 1553 ret = init_get_bits8(&gb, buf, FFMIN(buf_size, MAX_OBU_HEADER_SIZE));
101
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1553 times.
1553 if (ret < 0)
102 return ret;
103
104
2/2
✓ Branch 1 taken 33 times.
✓ Branch 2 taken 1520 times.
1553 if (get_bits1(&gb) != 0) // obu_forbidden_bit
105 33 return AVERROR_INVALIDDATA;
106
107 1520 *type = get_bits(&gb, 4);
108 1520 extension_flag = get_bits1(&gb);
109 1520 has_size_flag = get_bits1(&gb);
110 1520 skip_bits1(&gb); // obu_reserved_1bit
111
112
2/2
✓ Branch 0 taken 1087 times.
✓ Branch 1 taken 433 times.
1520 if (extension_flag) {
113 1087 *temporal_id = get_bits(&gb, 3);
114 1087 *spatial_id = get_bits(&gb, 2);
115 1087 skip_bits(&gb, 3); // extension_header_reserved_3bits
116 } else {
117 433 *temporal_id = *spatial_id = 0;
118 }
119
120 1349 *obu_size = has_size_flag ? get_leb128(&gb)
121
2/2
✓ Branch 0 taken 1349 times.
✓ Branch 1 taken 171 times.
1520 : buf_size - 1 - extension_flag;
122
123
2/2
✓ Branch 1 taken 42 times.
✓ Branch 2 taken 1478 times.
1520 if (get_bits_left(&gb) < 0)
124 42 return AVERROR_INVALIDDATA;
125
126 1478 *start_pos = get_bits_count(&gb) / 8;
127
128 1478 size = *obu_size + *start_pos;
129
130
2/2
✓ Branch 0 taken 666 times.
✓ Branch 1 taken 812 times.
1478 if (size > buf_size)
131 666 return AVERROR_INVALIDDATA;
132
133 812 return size;
134 }
135
136 141 static inline int get_obu_bit_length(const uint8_t *buf, int size, int type)
137 {
138 int v;
139
140 /* There are no trailing bits on these */
141
3/4
✓ Branch 0 taken 128 times.
✓ Branch 1 taken 13 times.
✓ Branch 2 taken 128 times.
✗ Branch 3 not taken.
141 if (type == AV1_OBU_TILE_GROUP ||
142
2/2
✓ Branch 0 taken 43 times.
✓ Branch 1 taken 85 times.
128 type == AV1_OBU_TILE_LIST ||
143 type == AV1_OBU_FRAME) {
144
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 56 times.
56 if (size > INT_MAX / 8)
145 return AVERROR(ERANGE);
146 else
147 56 return size * 8;
148 }
149
150
3/4
✓ Branch 0 taken 41 times.
✓ Branch 1 taken 44 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
85 while (size > 0 && buf[size - 1] == 0)
151 size--;
152
153
2/2
✓ Branch 0 taken 44 times.
✓ Branch 1 taken 41 times.
85 if (!size)
154 44 return 0;
155
156 41 v = buf[size - 1];
157
158
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 41 times.
41 if (size > INT_MAX / 8)
159 return AVERROR(ERANGE);
160 41 size *= 8;
161
162 /* Remove the trailing_one_bit and following trailing zeros */
163
1/2
✓ Branch 0 taken 41 times.
✗ Branch 1 not taken.
41 if (v)
164 41 size -= ff_ctz(v) + 1;
165
166 41 return size;
167 }
168
169 AVRational ff_av1_framerate(int64_t ticks_per_frame, int64_t units_per_tick,
170 int64_t time_scale);
171
172 #endif /* AVCODEC_AV1_PARSE_H */
173

什么惚惚 李讷为什么不姓毛 口腔苔藓用什么药 细菌性阴道病用什么药 白炽灯属于什么光源
全员加速中什么时候播 hcv是什么 上眼皮浮肿是什么原因 肺部结节灶是什么意思啊 高危型hpv52阳性是什么意思
幽门螺旋杆菌的症状是什么 外阴裂口用什么药 樱花什么时候开 沉鱼落雁闭月羞花什么意思 医学ns是什么意思
哀恸是什么意思 脐橙什么意思 狗脊是什么东西 血管炎症状表现是什么 常喝苦荞茶有什么好处
便宜的反义词是什么hcv8jop8ns8r.cn 婴儿八个月可以吃什么辅食wuhaiwuya.com 茱萸是什么东西hcv9jop4ns9r.cn 君子兰叶子发黄是什么原因hcv9jop0ns6r.cn 酸橙绿是什么颜色1949doufunao.com
豆角长什么样hcv8jop0ns2r.cn 西安吃什么hcv8jop3ns7r.cn 狗尾巴草有什么功效adwl56.com 腹股沟淋巴结肿大挂什么科hcv8jop3ns7r.cn 哺乳期发烧吃什么药sanhestory.com
止咳化痰吃什么药hcv9jop6ns6r.cn 吃开心果有什么好处和坏处hcv8jop8ns8r.cn 为什么会得淋巴肿瘤hcv8jop5ns3r.cn 凉拌菜用什么醋好hcv7jop7ns1r.cn 什么花花hcv8jop5ns2r.cn
脂溢性皮炎是什么引起的bjhyzcsm.com 笙是什么意思hcv7jop5ns2r.cn 公募基金是什么意思hcv8jop4ns5r.cn 搪塞什么意思hcv8jop8ns6r.cn 小姨的女儿叫什么96micro.com
百度