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
534a8947
Commit
534a8947
authored
Jan 13, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/huffyuv: add a field that represents the number of symbols
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8173d1ff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
huffyuv.h
libavcodec/huffyuv.h
+1
-0
huffyuvdec.c
libavcodec/huffyuvdec.c
+2
-0
huffyuvenc.c
libavcodec/huffyuvenc.c
+1
-0
No files found.
libavcodec/huffyuv.h
View file @
534a8947
...
...
@@ -68,6 +68,7 @@ typedef struct HYuvContext {
int
yuy2
;
//use yuy2 instead of 422P
int
bgr32
;
//use bgr32 instead of bgr24
int
bps
;
int
n
;
// 1<<bps
int
alpha
;
int
chroma
;
int
yuv
;
...
...
libavcodec/huffyuvdec.c
View file @
534a8947
...
...
@@ -278,6 +278,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s
->
version
=
0
;
s
->
bps
=
8
;
s
->
n
=
1
<<
s
->
bps
;
s
->
chroma
=
1
;
if
(
s
->
version
>=
2
)
{
int
method
,
interlace
;
...
...
@@ -294,6 +295,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s
->
bitstream_bpp
=
avctx
->
bits_per_coded_sample
&
~
7
;
}
else
{
s
->
bps
=
(
avctx
->
extradata
[
1
]
>>
4
)
+
1
;
s
->
n
=
1
<<
s
->
bps
;
s
->
chroma_h_shift
=
avctx
->
extradata
[
1
]
&
3
;
s
->
chroma_v_shift
=
(
avctx
->
extradata
[
1
]
>>
2
)
&
3
;
s
->
yuv
=
!!
(((
uint8_t
*
)
avctx
->
extradata
)[
2
]
&
1
);
...
...
libavcodec/huffyuvenc.c
View file @
534a8947
...
...
@@ -228,6 +228,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
av_log
(
avctx
,
AV_LOG_ERROR
,
"format not supported
\n
"
);
return
AVERROR
(
EINVAL
);
}
s
->
n
=
1
<<
s
->
bps
;
avctx
->
bits_per_coded_sample
=
s
->
bitstream_bpp
;
s
->
decorrelate
=
s
->
bitstream_bpp
>=
24
&&
!
s
->
yuv
&&
avctx
->
pix_fmt
!=
AV_PIX_FMT_GBRP
;
...
...
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