指甲上白色月牙代表什么| 结婚送什么| lirs 是什么意思| 金银花有什么功效和作用| 莫西沙星片主治什么病| 6.22什么星座| 孕妇胆固醇高对胎儿有什么影响| 今天突然拉稀拉出血什么原因| 吃什么补钾最快最好| 念珠菌是什么病| 巨蟹跟什么星座最配| 隔离霜和bb霜有什么区别| 桎梏什么意思| 梦见吃豆腐是什么意思| 牙龈痛吃什么药| 用酒擦身体有什么好处| 海绵肾是什么意思| 尿频繁什么原因| 去医院看肛门挂什么科| 激素是什么东西| 梦到鬼是什么意思| 吃什么治便秘最有效| 肌炎是什么病| 孕妇贫血对胎儿有什么影响| 为什么印度叫阿三| 拜谢是什么意思| 甚嚣尘上什么意思| 乳腺增生不能吃什么| 脸肿挂什么科| 风团是什么| 心肾两虚吃什么中成药| 马拉色菌毛囊炎用什么药治疗最好| 处女什么意思| 1989年是什么蛇| 数字五行属什么| 由是什么意思| 一月10号是什么星座| 什么属相好| 蜘蛛的血是什么颜色的| 梦见朋友结婚是什么意思| 海参几头是什么意思| 什么叫盗汗| 大暑吃什么| 慢性宫颈炎是什么原因引起的| 湿气重吃什么药好| 二龙戏珠是什么意思| 什么是乙肝病毒携带者| 梦见好多鱼是什么意思| 二月九号是什么星座| 梦见自己洗澡是什么意思| 甲沟炎涂抹什么药膏最有效| 索条影是什么意思| 痰多吃什么药| 凌晨三四点是什么时辰| 吃韭菜有什么好处和坏处| 耳朵闷闷的堵住的感觉是什么原因| 浅表性胃炎用什么药| 脚底褪皮是什么原因| 节育环要什么时候取才是最佳时期| 狗狗发抖是什么原因| 筷子掉地上是什么征兆| 肺火吃什么药| 禾末念什么| 隐翅虫怕什么| 床咚是什么意思啊| 什么是手帐| 无期徒刑什么意思| 胃炎吃什么消炎药| 为什么孩子要跟爸爸姓| 素颜霜是什么| 蒸桑拿是什么意思| 什么白酒好喝| 痛风在医院挂什么科| 支气管发炎是什么原因引起的| 今日属相是什么生肖| 血糖高是什么症状| 金族念什么| 一个不一个好念什么| 石斛什么价格| 一什么黑暗| 金球奖什么时候颁发| 肝功能看什么科室| hpv阳性是什么病| 餐巾纸属于什么垃圾| 优势卵泡是什么意思| 女人银屑病一般都长什么地方| 千米的字母是什么| 闭日是什么意思| 什么猪没有嘴| 总是感觉有尿意是什么原因| gg 是什么意思| 造纸术是什么时候发明的| 脑萎缩是什么症状| 为什么空腹喝牛奶会拉肚子| 血沉是检查什么的| 二月十九是什么星座| 右冠优势型是什么意思| 有所作为的意思是什么| 佛灯火命是什么意思| 女人梦见烧纸什么预兆| 长期吃避孕药有什么危害| 吃什么食物可以降尿酸| 心肌缺血吃什么食物| 儿童掉头发什么原因| 九月份有什么节日| 1218是什么意思| 纺织娘是什么| 腰痛宁胶囊为什么要用黄酒送服| 办身份证穿什么颜色衣服| 有什么有什么的四字词语| 卯是什么生肖| 肚子胀气是什么原因引起的| 全身淋巴结肿大是什么原因| 身上臭是什么原因| 什么矿泉水最好| 洋辣子学名叫什么| 西南方向五行属什么| 下肢水肿挂什么科| 2006年出生的是什么命| 74年属什么| 生理曲度变直什么意思| 思钱想厚什么意思| hpa是什么病| 彩超是检查什么的| 吃什么补血最好最快| 富硒对人体有什么好处| 猩红热是什么| ccd是什么意思| 1月7号什么星座| 2d是什么意思| 舌苔厚有齿痕吃什么药| 农历4月14日是什么星座| 形单影只什么意思| 刘欢属什么生肖| 鸡眼和疣有什么区别| 白癜风的症状是什么| nbr是什么材质| 女性潮热是什么症状| 橙子什么季节成熟| 部分导联t波改变是什么意思| 吃什么营养神经| 梦见好多狗是什么预兆| 甘油三酯高吃什么食物好| 探病买什么水果| 梦见别人理发是什么意思| 三十六计第一计是什么| 歧路亡羊告诉我们什么道理| 皮重是什么意思| 妃嫔是什么意思| 猫腻是什么意思| 青筋明显是什么原因| 凌晨两点是什么时辰| 邵字五行属什么| 咳嗽不能吃什么食物| 头发掉得厉害是什么原因| 脾切除后有什么影响| 出来混迟早要还的什么意思| 什么爱心| 阚姓念什么| 痔疮挂什么科| 红米是什么米| 蚂蚁喜欢吃什么| 苍蝇为什么喜欢往人身上飞| 都有什么大学| 尚公主是什么意思| 40岁属什么| 什么叫做流年| 咽喉炎吃什么消炎药| 秋分节气的含义是什么| 乘的部首是什么| 造影手术是什么意思| 孕妇便秘吃什么药| sp是什么意思| 铁是什么颜色| 握手是什么意思| 2024是什么年生肖| 黄芪最佳搭配是什么| 纳氏囊肿是什么意思| 冰粉是什么做的| 翠绿的什么| 什么叫有个性的人| 牙疼吃什么止疼药见效快| 悦己是什么意思| 记忆力减退是什么原因造成的| 什么是泡沫尿| 熬粥用什么锅好| mlb是什么牌子| 韩墨池是什么电视剧| 胃低分化腺癌是什么意思| 手足口疫苗叫什么名字| 喝完酒早上吃什么好| 荔枝什么时候成熟| 刮宫和流产有什么区别| 六六无穷是什么意思| 中医讲肾主什么| aivei是什么品牌| 阑尾炎手术后吃什么| 泡沫是什么材料做的| 限用日期是什么意思| 眼睛痒流泪是什么原因| 老年人晚上夜尿多是什么原因| 水母吃什么食物| 女人为什么会得霉菌| burberry什么牌子| 大疱病是什么病| 调侃是什么意思| 血氧是什么| 茯苓泡水喝有什么功效| 蚝油是干什么用的| 兔子可以吃什么水果| 人生得意须尽欢什么意思| 孔子姓什么名什么| 胃火大吃什么药| 鲜黄花菜含有什么毒素| dyf是什么意思| 什么烟好抽| 为什么尿液一直是黄的| 炖牛骨头放什么调料| 一进大门看见什么最好| 什么水果对肝有好处| 溯溪是什么意思| 俺是什么意思| 肚脐眼为什么会有臭味| 芳华什么意思| 香港的别称是什么| 10月16日是什么星座| 传票是什么意思| barry什么意思| 女性长期缺维d会带来什么病| 红细胞阳性是什么意思| 恶心想吐胃不舒服是什么原因| 回归是什么意思| 做梦梦到已故的亲人是什么意思| 乌鸦叫预示什么| 女人肝火旺吃什么好| 组织部是干什么的| 赞赏是什么意思| 双腿酸软无力吃什么药| 怀孕吃火龙果对胎儿有什么好| 宜入宅是什么意思| 糖尿病吃什么| 9月3号是什么星座| 梦见苹果是什么意思| 过劳肥是什么意思| 不射精是什么原因| mb是什么意思| 干细胞能治什么病| 泌乳素过高女性会出现什么症状| cga是什么意思| 什么的被子| 什么纸| 308什么意思| 177是什么意思| 2.3什么星座| 心脏扩大吃什么药好| 三十而立四十不惑什么意思| olay是什么品牌| 左是什么结构| gl值是什么意思| 什么是音节什么是音序| 喉咙扁桃体发炎吃什么药| 吃什么长高| 斗智斗勇什么意思| 什么邮箱最好用最安全| 百度

享你未想 智创未来 北京现代服务品牌暨新名图


Directory: ../../../ffmpeg/
File: src/libavcodec/xwddec.c
Date: 2025-08-04 00:43:16
Exec Total Coverage
Lines: 95 141 67.4%
Functions: 1 1 100.0%
Branches: 80 160 50.0%

Line Branch Exec Source
1 /*
2 * XWD image format
3 *
4 * Copyright (c) 2012 Paul B Mahol
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 #include <inttypes.h>
24
25 #include "libavutil/imgutils.h"
26 #include "avcodec.h"
27 #include "bytestream.h"
28 #include "codec_internal.h"
29 #include "decode.h"
30 #include "xwd.h"
31
32 138 static int xwd_decode_frame(AVCodecContext *avctx, AVFrame *p,
33 int *got_frame, AVPacket *avpkt)
34 {
35 uint32_t version, header_size, vclass, ncolors;
36 uint32_t xoffset, be, bpp, lsize, rsize;
37 uint32_t pixformat, pixdepth, bunit, bitorder, bpad;
38 uint32_t rgb[3];
39 uint8_t *ptr;
40 int width, height;
41 GetByteContext gb;
42 int ret;
43
44
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (avpkt->size < XWD_HEADER_SIZE)
45 return AVERROR_INVALIDDATA;
46
47 138 bytestream2_init(&gb, avpkt->data, avpkt->size);
48 138 header_size = bytestream2_get_be32u(&gb);
49
50 138 version = bytestream2_get_be32u(&gb);
51
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (version != XWD_VERSION) {
52 av_log(avctx, AV_LOG_ERROR, "unsupported version\n");
53 return AVERROR_INVALIDDATA;
54 }
55
56
2/4
✓ Branch 0 taken 138 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 138 times.
138 if (avpkt->size < header_size || header_size < XWD_HEADER_SIZE) {
57 av_log(avctx, AV_LOG_ERROR, "invalid header size\n");
58 return AVERROR_INVALIDDATA;
59 }
60
61 138 pixformat = bytestream2_get_be32u(&gb);
62 138 pixdepth = bytestream2_get_be32u(&gb);
63 138 width = bytestream2_get_be32u(&gb);
64 138 height = bytestream2_get_be32u(&gb);
65 138 xoffset = bytestream2_get_be32u(&gb);
66 138 be = bytestream2_get_be32u(&gb);
67 138 bunit = bytestream2_get_be32u(&gb);
68 138 bitorder = bytestream2_get_be32u(&gb);
69 138 bpad = bytestream2_get_be32u(&gb);
70 138 bpp = bytestream2_get_be32u(&gb);
71 138 lsize = bytestream2_get_be32u(&gb);
72 138 vclass = bytestream2_get_be32u(&gb);
73 138 rgb[0] = bytestream2_get_be32u(&gb);
74 138 rgb[1] = bytestream2_get_be32u(&gb);
75 138 rgb[2] = bytestream2_get_be32u(&gb);
76 138 bytestream2_skipu(&gb, 8);
77 138 ncolors = bytestream2_get_be32u(&gb);
78 138 bytestream2_skipu(&gb, header_size - (XWD_HEADER_SIZE - 20));
79
80
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 138 times.
138 if ((ret = ff_set_dimensions(avctx, width, height)) < 0)
81 return ret;
82
83 138 av_log(avctx, AV_LOG_DEBUG,
84 "pixformat %"PRIu32", pixdepth %"PRIu32", bunit %"PRIu32", bitorder %"PRIu32", bpad %"PRIu32"\n",
85 pixformat, pixdepth, bunit, bitorder, bpad);
86 138 av_log(avctx, AV_LOG_DEBUG,
87 "vclass %"PRIu32", ncolors %"PRIu32", bpp %"PRIu32", be %"PRIu32", lsize %"PRIu32", xoffset %"PRIu32"\n",
88 vclass, ncolors, bpp, be, lsize, xoffset);
89 138 av_log(avctx, AV_LOG_DEBUG,
90 "red %0"PRIx32", green %0"PRIx32", blue %0"PRIx32"\n",
91 rgb[0], rgb[1], rgb[2]);
92
93
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (pixformat > XWD_Z_PIXMAP) {
94 av_log(avctx, AV_LOG_ERROR, "invalid pixmap format\n");
95 return AVERROR_INVALIDDATA;
96 }
97
98
2/4
✓ Branch 0 taken 138 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 138 times.
138 if (pixdepth == 0 || pixdepth > 32) {
99 av_log(avctx, AV_LOG_ERROR, "invalid pixmap depth\n");
100 return AVERROR_INVALIDDATA;
101 }
102
103
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (xoffset) {
104 avpriv_request_sample(avctx, "xoffset %"PRIu32"", xoffset);
105 return AVERROR_PATCHWELCOME;
106 }
107
108
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (be > 1) {
109 av_log(avctx, AV_LOG_ERROR, "invalid byte order\n");
110 return AVERROR_INVALIDDATA;
111 }
112
113
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (bitorder > 1) {
114 av_log(avctx, AV_LOG_ERROR, "invalid bitmap bit order\n");
115 return AVERROR_INVALIDDATA;
116 }
117
118
3/6
✓ Branch 0 taken 138 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 138 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✓ Branch 5 taken 138 times.
138 if (bunit != 8 && bunit != 16 && bunit != 32) {
119 av_log(avctx, AV_LOG_ERROR, "invalid bitmap unit\n");
120 return AVERROR_INVALIDDATA;
121 }
122
123
5/6
✓ Branch 0 taken 82 times.
✓ Branch 1 taken 56 times.
✓ Branch 2 taken 54 times.
✓ Branch 3 taken 28 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 54 times.
138 if (bpad != 8 && bpad != 16 && bpad != 32) {
124 av_log(avctx, AV_LOG_ERROR, "invalid bitmap scan-line pad\n");
125 return AVERROR_INVALIDDATA;
126 }
127
128
2/4
✓ Branch 0 taken 138 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 138 times.
138 if (bpp == 0 || bpp > 32) {
129 av_log(avctx, AV_LOG_ERROR, "invalid bits per pixel\n");
130 return AVERROR_INVALIDDATA;
131 }
132
133
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (ncolors > 256) {
134 av_log(avctx, AV_LOG_ERROR, "invalid number of entries in colormap\n");
135 return AVERROR_INVALIDDATA;
136 }
137
138
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 138 times.
138 if ((ret = av_image_check_size(avctx->width, avctx->height, 0, NULL)) < 0)
139 return ret;
140
141 138 rsize = FFALIGN(avctx->width * bpp, bpad) / 8;
142
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (lsize < rsize) {
143 av_log(avctx, AV_LOG_ERROR, "invalid bytes per scan-line\n");
144 return AVERROR_INVALIDDATA;
145 }
146
147
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 138 times.
138 if (bytestream2_get_bytes_left(&gb) < ncolors * XWD_CMAP_SIZE + (uint64_t)avctx->height * lsize) {
148 av_log(avctx, AV_LOG_ERROR, "input buffer too small\n");
149 return AVERROR_INVALIDDATA;
150 }
151
152
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (pixformat != XWD_Z_PIXMAP) {
153 avpriv_report_missing_feature(avctx, "Pixmap format %"PRIu32, pixformat);
154 return AVERROR_PATCHWELCOME;
155 }
156
157 138 avctx->pix_fmt = AV_PIX_FMT_NONE;
158
3/4
✓ Branch 0 taken 28 times.
✓ Branch 1 taken 28 times.
✓ Branch 2 taken 82 times.
✗ Branch 3 not taken.
138 switch (vclass) {
159 28 case XWD_STATIC_GRAY:
160 case XWD_GRAY_SCALE:
161
3/4
✓ Branch 0 taken 14 times.
✓ Branch 1 taken 14 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 14 times.
28 if (bpp != 1 && bpp != 8)
162 return AVERROR_INVALIDDATA;
163
3/4
✓ Branch 0 taken 14 times.
✓ Branch 1 taken 14 times.
✓ Branch 2 taken 14 times.
✗ Branch 3 not taken.
28 if (bpp == 1 && pixdepth == 1) {
164 14 avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
165
2/4
✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 3 not taken.
14 } else if (bpp == 8 && pixdepth == 8) {
166 14 avctx->pix_fmt = AV_PIX_FMT_GRAY8;
167 }
168 28 break;
169 28 case XWD_STATIC_COLOR:
170 case XWD_PSEUDO_COLOR:
171
1/2
✓ Branch 0 taken 28 times.
✗ Branch 1 not taken.
28 if (bpp == 8)
172 28 avctx->pix_fmt = AV_PIX_FMT_PAL8;
173 28 break;
174 82 case XWD_TRUE_COLOR:
175 case XWD_DIRECT_COLOR:
176
5/6
✓ Branch 0 taken 54 times.
✓ Branch 1 taken 28 times.
✓ Branch 2 taken 14 times.
✓ Branch 3 taken 40 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 14 times.
82 if (bpp != 16 && bpp != 24 && bpp != 32)
177 return AVERROR_INVALIDDATA;
178
4/4
✓ Branch 0 taken 28 times.
✓ Branch 1 taken 54 times.
✓ Branch 2 taken 14 times.
✓ Branch 3 taken 14 times.
82 if (bpp == 16 && pixdepth == 15) {
179
3/6
✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 14 times.
✗ Branch 5 not taken.
14 if (rgb[0] == 0x7C00 && rgb[1] == 0x3E0 && rgb[2] == 0x1F)
180
1/2
✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
14 avctx->pix_fmt = be ? AV_PIX_FMT_RGB555BE : AV_PIX_FMT_RGB555LE;
181 else if (rgb[0] == 0x1F && rgb[1] == 0x3E0 && rgb[2] == 0x7C00)
182 avctx->pix_fmt = be ? AV_PIX_FMT_BGR555BE : AV_PIX_FMT_BGR555LE;
183
3/4
✓ Branch 0 taken 14 times.
✓ Branch 1 taken 54 times.
✓ Branch 2 taken 14 times.
✗ Branch 3 not taken.
68 } else if (bpp == 16 && pixdepth == 16) {
184
3/6
✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 14 times.
✗ Branch 5 not taken.
14 if (rgb[0] == 0xF800 && rgb[1] == 0x7E0 && rgb[2] == 0x1F)
185
1/2
✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
14 avctx->pix_fmt = be ? AV_PIX_FMT_RGB565BE : AV_PIX_FMT_RGB565LE;
186 else if (rgb[0] == 0x1F && rgb[1] == 0x7E0 && rgb[2] == 0xF800)
187 avctx->pix_fmt = be ? AV_PIX_FMT_BGR565BE : AV_PIX_FMT_BGR565LE;
188
2/2
✓ Branch 0 taken 40 times.
✓ Branch 1 taken 14 times.
54 } else if (bpp == 24) {
189
3/6
✓ Branch 0 taken 40 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 40 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 40 times.
✗ Branch 5 not taken.
40 if (rgb[0] == 0xFF0000 && rgb[1] == 0xFF00 && rgb[2] == 0xFF)
190
1/2
✓ Branch 0 taken 40 times.
✗ Branch 1 not taken.
40 avctx->pix_fmt = be ? AV_PIX_FMT_RGB24 : AV_PIX_FMT_BGR24;
191 else if (rgb[0] == 0xFF && rgb[1] == 0xFF00 && rgb[2] == 0xFF0000)
192 avctx->pix_fmt = be ? AV_PIX_FMT_BGR24 : AV_PIX_FMT_RGB24;
193
1/2
✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
14 } else if (bpp == 32) {
194
1/6
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
14 if (rgb[0] == 0xFF0000 && rgb[1] == 0xFF00 && rgb[2] == 0xFF)
195 avctx->pix_fmt = be ? AV_PIX_FMT_ARGB : AV_PIX_FMT_BGRA;
196
3/6
✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 14 times.
✗ Branch 5 not taken.
14 else if (rgb[0] == 0xFF && rgb[1] == 0xFF00 && rgb[2] == 0xFF0000)
197
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
14 avctx->pix_fmt = be ? AV_PIX_FMT_ABGR : AV_PIX_FMT_RGBA;
198 }
199 82 bytestream2_skipu(&gb, ncolors * XWD_CMAP_SIZE);
200 82 break;
201 default:
202 av_log(avctx, AV_LOG_ERROR, "invalid visual class\n");
203 return AVERROR_INVALIDDATA;
204 }
205
206
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 138 times.
138 if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
207 avpriv_request_sample(avctx,
208 "Unknown file: bpp %"PRIu32", pixdepth %"PRIu32", vclass %"PRIu32"",
209 bpp, pixdepth, vclass);
210 return AVERROR_PATCHWELCOME;
211 }
212
213
2/2
✓ Branch 0 taken 9 times.
✓ Branch 1 taken 129 times.
138 if (avctx->skip_frame >= AVDISCARD_ALL)
214 9 return avpkt->size;
215
216
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 129 times.
129 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
217 return ret;
218
219
2/2
✓ Branch 0 taken 26 times.
✓ Branch 1 taken 103 times.
129 if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
220 26 uint32_t *dst = (uint32_t *)p->data[1];
221 uint8_t red, green, blue;
222
223
2/2
✓ Branch 0 taken 6656 times.
✓ Branch 1 taken 26 times.
6682 for (int i = 0; i < ncolors; i++) {
224 6656 bytestream2_skipu(&gb, 4); // skip colormap entry number
225 6656 red = bytestream2_get_byteu(&gb);
226 6656 bytestream2_skipu(&gb, 1);
227 6656 green = bytestream2_get_byteu(&gb);
228 6656 bytestream2_skipu(&gb, 1);
229 6656 blue = bytestream2_get_byteu(&gb);
230 6656 bytestream2_skipu(&gb, 3); // skip bitmask flag and padding
231
232 6656 dst[i] = 0xFFU << 24 | red << 16 | green << 8 | blue;
233 }
234 }
235
236 129 ptr = p->data[0];
237
2/2
✓ Branch 0 taken 37152 times.
✓ Branch 1 taken 129 times.
37281 for (int i = 0; i < avctx->height; i++) {
238 37152 bytestream2_get_bufferu(&gb, ptr, rsize);
239 37152 bytestream2_skipu(&gb, lsize - rsize);
240 37152 ptr += p->linesize[0];
241 }
242
243 129 *got_frame = 1;
244
245 129 return avpkt->size;
246 }
247
248 const FFCodec ff_xwd_decoder = {
249 .p.name = "xwd",
250 CODEC_LONG_NAME("XWD (X Window Dump) image"),
251 .p.type = AVMEDIA_TYPE_VIDEO,
252 .p.id = AV_CODEC_ID_XWD,
253 .p.capabilities = AV_CODEC_CAP_DR1,
254 .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
255 FF_CODEC_DECODE_CB(xwd_decode_frame),
256 };
257

无伤大雅是什么意思 bgo是什么意思 贴图是什么意思 7月6日是什么星座 93年鸡五行属什么
眼睛吹风就流泪是什么原因 毛是什么意思 肝脏钙化灶是什么意思 和什么细什么的成语 4月10日什么星座
不射精是什么原因 蜂蜜什么时候喝最好 氩气是什么气体 清水文是什么意思 肥大肾柱是什么意思
月子病是什么症状 怎么查自己五行缺什么 一个三点水一个及念什么 trace什么意思 da医学上是什么意思
肿脚是什么原因引起的hcv9jop2ns1r.cn 罗宾尼手表什么档次hcv9jop6ns4r.cn 孕妇梦见西瓜是什么意思beikeqingting.com 最大的狗是什么品种gangsutong.com 骨密度是什么意思hcv7jop4ns6r.cn
障碍是什么意思helloaicloud.com 有什么故事hcv8jop4ns8r.cn 辅食是什么意思hcv9jop1ns4r.cn 布尔乔亚什么意思hcv7jop5ns5r.cn 蛋白质偏高是什么原因hcv7jop4ns7r.cn
乌冬面为什么叫乌冬面hcv8jop7ns4r.cn 口腔溃疡是什么症状hcv7jop9ns9r.cn hpv52阳性有什么症状hcv9jop1ns2r.cn 癫痫属于什么科hcv9jop7ns2r.cn 看颈椎病挂什么科hcv8jop1ns8r.cn
飞蓬草有什么功效hcv9jop2ns2r.cn hpv16阳性有什么症状bjhyzcsm.com 女生排卵期在什么时候hcv9jop5ns6r.cn 什么是尿潴留hcv8jop3ns1r.cn 肺大泡吃什么药hcv8jop6ns2r.cn
百度