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
3ad7dd8c
Commit
3ad7dd8c
authored
Aug 17, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
big endian fix (untested)
Originally committed as revision 3397 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
da6c4573
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
huffyuv.c
libavcodec/huffyuv.c
+22
-12
No files found.
libavcodec/huffyuv.c
View file @
3ad7dd8c
...
@@ -32,6 +32,16 @@
...
@@ -32,6 +32,16 @@
#define VLC_BITS 11
#define VLC_BITS 11
#ifdef WORDS_BIGENDIAN
#define B 3
#define G 2
#define R 1
#else
#define B 0
#define G 1
#define R 2
#endif
typedef
enum
Predictor
{
typedef
enum
Predictor
{
LEFT
=
0
,
LEFT
=
0
,
PLANE
,
PLANE
,
...
@@ -157,13 +167,13 @@ static inline void add_left_prediction_bgr32(uint8_t *dst, uint8_t *src, int w,
...
@@ -157,13 +167,13 @@ static inline void add_left_prediction_bgr32(uint8_t *dst, uint8_t *src, int w,
b
=
*
blue
;
b
=
*
blue
;
for
(
i
=
0
;
i
<
w
;
i
++
){
for
(
i
=
0
;
i
<
w
;
i
++
){
b
+=
src
[
4
*
i
+
0
];
b
+=
src
[
4
*
i
+
B
];
g
+=
src
[
4
*
i
+
1
];
g
+=
src
[
4
*
i
+
G
];
r
+=
src
[
4
*
i
+
2
];
r
+=
src
[
4
*
i
+
R
];
dst
[
4
*
i
+
0
]
=
b
;
dst
[
4
*
i
+
B
]
=
b
;
dst
[
4
*
i
+
1
]
=
g
;
dst
[
4
*
i
+
G
]
=
g
;
dst
[
4
*
i
+
2
]
=
r
;
dst
[
4
*
i
+
R
]
=
r
;
}
}
*
red
=
r
;
*
red
=
r
;
...
@@ -619,9 +629,9 @@ static void decode_bgr_bitstream(HYuvContext *s, int count){
...
@@ -619,9 +629,9 @@ static void decode_bgr_bitstream(HYuvContext *s, int count){
}
}
}
else
{
}
else
{
for
(
i
=
0
;
i
<
count
;
i
++
){
for
(
i
=
0
;
i
<
count
;
i
++
){
s
->
temp
[
0
][
4
*
i
+
1
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
1
].
table
,
VLC_BITS
,
3
);
s
->
temp
[
0
][
4
*
i
+
G
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
1
].
table
,
VLC_BITS
,
3
);
s
->
temp
[
0
][
4
*
i
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
0
].
table
,
VLC_BITS
,
3
)
+
s
->
temp
[
0
][
4
*
i
+
1
];
s
->
temp
[
0
][
4
*
i
+
B
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
0
].
table
,
VLC_BITS
,
3
)
+
s
->
temp
[
0
][
4
*
i
+
G
];
s
->
temp
[
0
][
4
*
i
+
2
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
2
].
table
,
VLC_BITS
,
3
)
+
s
->
temp
[
0
][
4
*
i
+
1
];
s
->
temp
[
0
][
4
*
i
+
R
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
2
].
table
,
VLC_BITS
,
3
)
+
s
->
temp
[
0
][
4
*
i
+
G
];
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
2
].
table
,
VLC_BITS
,
3
);
//?!
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
2
].
table
,
VLC_BITS
,
3
);
//?!
}
}
}
}
...
@@ -634,9 +644,9 @@ static void decode_bgr_bitstream(HYuvContext *s, int count){
...
@@ -634,9 +644,9 @@ static void decode_bgr_bitstream(HYuvContext *s, int count){
}
}
}
else
{
}
else
{
for
(
i
=
0
;
i
<
count
;
i
++
){
for
(
i
=
0
;
i
<
count
;
i
++
){
s
->
temp
[
0
][
4
*
i
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
0
].
table
,
VLC_BITS
,
3
);
s
->
temp
[
0
][
4
*
i
+
B
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
0
].
table
,
VLC_BITS
,
3
);
s
->
temp
[
0
][
4
*
i
+
1
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
1
].
table
,
VLC_BITS
,
3
);
s
->
temp
[
0
][
4
*
i
+
G
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
1
].
table
,
VLC_BITS
,
3
);
s
->
temp
[
0
][
4
*
i
+
2
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
2
].
table
,
VLC_BITS
,
3
);
s
->
temp
[
0
][
4
*
i
+
R
]
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
2
].
table
,
VLC_BITS
,
3
);
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
2
].
table
,
VLC_BITS
,
3
);
//?!
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
2
].
table
,
VLC_BITS
,
3
);
//?!
}
}
}
}
...
...
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