Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
07a7145d
Commit
07a7145d
authored
Jan 26, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/iff: rgbn: fix decoding on big endian
Fixes #2193. Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
f9abeecd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
iff.c
libavcodec/iff.c
+4
-4
No files found.
libavcodec/iff.c
View file @
07a7145d
...
@@ -488,7 +488,7 @@ static int decode_byterun(uint8_t *dst, int dst_size,
...
@@ -488,7 +488,7 @@ static int decode_byterun(uint8_t *dst, int dst_size,
return
buf
-
buf_start
;
return
buf
-
buf_start
;
}
}
#define DECODE_RGBX_COMMON(
pixel_siz
e) \
#define DECODE_RGBX_COMMON(
typ
e) \
if (!length) { \
if (!length) { \
length = bytestream2_get_byte(gb); \
length = bytestream2_get_byte(gb); \
if (!length) { \
if (!length) { \
...
@@ -498,7 +498,7 @@ static int decode_byterun(uint8_t *dst, int dst_size,
...
@@ -498,7 +498,7 @@ static int decode_byterun(uint8_t *dst, int dst_size,
} \
} \
} \
} \
for (i = 0; i < length; i++) { \
for (i = 0; i < length; i++) { \
*(
uint32_t *)(dst + y*linesize + x * pixel_size
) = pixel; \
*(
type *)(dst + y*linesize + x * sizeof(type)
) = pixel; \
x += 1; \
x += 1; \
if (x >= width) { \
if (x >= width) { \
y += 1; \
y += 1; \
...
@@ -521,7 +521,7 @@ static void decode_rgb8(GetByteContext *gb, uint8_t *dst, int width, int height,
...
@@ -521,7 +521,7 @@ static void decode_rgb8(GetByteContext *gb, uint8_t *dst, int width, int height,
while
(
bytestream2_get_bytes_left
(
gb
)
>=
4
)
{
while
(
bytestream2_get_bytes_left
(
gb
)
>=
4
)
{
uint32_t
pixel
=
0xFF000000
|
bytestream2_get_be24
(
gb
);
uint32_t
pixel
=
0xFF000000
|
bytestream2_get_be24
(
gb
);
length
=
bytestream2_get_byte
(
gb
)
&
0x7F
;
length
=
bytestream2_get_byte
(
gb
)
&
0x7F
;
DECODE_RGBX_COMMON
(
4
)
DECODE_RGBX_COMMON
(
uint32_t
)
}
}
}
}
...
@@ -539,7 +539,7 @@ static void decode_rgbn(GetByteContext *gb, uint8_t *dst, int width, int height,
...
@@ -539,7 +539,7 @@ static void decode_rgbn(GetByteContext *gb, uint8_t *dst, int width, int height,
uint32_t
pixel
=
bytestream2_get_be16u
(
gb
);
uint32_t
pixel
=
bytestream2_get_be16u
(
gb
);
length
=
pixel
&
0x7
;
length
=
pixel
&
0x7
;
pixel
>>=
4
;
pixel
>>=
4
;
DECODE_RGBX_COMMON
(
2
)
DECODE_RGBX_COMMON
(
uint16_t
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment