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
3ba57bfe
Commit
3ba57bfe
authored
Feb 23, 2016
by
Mats Peterson
Committed by
Michael Niedermayer
Feb 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/riffenc: Handle AV_PIX_FMT_MONOBLACK
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
6eb4021d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
riffenc.c
libavformat/riffenc.c
+6
-1
No files found.
libavformat/riffenc.c
View file @
3ba57bfe
...
...
@@ -241,9 +241,14 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc,
avio_w8
(
pb
,
0
);
}
else
if
(
raw_pal_avi
)
{
int
i
;
enum
AVPixelFormat
pix_fmt
=
enc
->
pix_fmt
;
if
(
pix_fmt
==
AV_PIX_FMT_NONE
&&
enc
->
bits_per_coded_sample
==
1
)
pix_fmt
=
AV_PIX_FMT_MONOWHITE
;
for
(
i
=
0
;
i
<
1
<<
enc
->
bits_per_coded_sample
;
i
++
)
{
/* Initialize 1 bpp palette to black & white */
if
(
!
i
&&
enc
->
bits_per_coded_sample
==
1
)
if
(
i
==
0
&&
pix_fmt
==
AV_PIX_FMT_MONOWHITE
)
avio_wl32
(
pb
,
0xffffff
);
else
if
(
i
==
1
&&
pix_fmt
==
AV_PIX_FMT_MONOBLACK
)
avio_wl32
(
pb
,
0xffffff
);
else
avio_wl32
(
pb
,
0
);
...
...
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