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
46dee21a
Commit
46dee21a
authored
Aug 13, 2013
by
Ian Taylor
Committed by
Luca Barbato
Aug 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
png: allow encoding 16-bit grayscale
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
3ca5df36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
pngenc.c
libavcodec/pngenc.c
+5
-0
No files found.
libavcodec/pngenc.c
View file @
46dee21a
...
@@ -255,6 +255,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -255,6 +255,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bit_depth
=
8
;
bit_depth
=
8
;
color_type
=
PNG_COLOR_TYPE_RGB
;
color_type
=
PNG_COLOR_TYPE_RGB
;
break
;
break
;
case
AV_PIX_FMT_GRAY16BE
:
bit_depth
=
16
;
color_type
=
PNG_COLOR_TYPE_GRAY
;
break
;
case
AV_PIX_FMT_GRAY8
:
case
AV_PIX_FMT_GRAY8
:
bit_depth
=
8
;
bit_depth
=
8
;
color_type
=
PNG_COLOR_TYPE_GRAY
;
color_type
=
PNG_COLOR_TYPE_GRAY
;
...
@@ -460,6 +464,7 @@ AVCodec ff_png_encoder = {
...
@@ -460,6 +464,7 @@ AVCodec ff_png_encoder = {
.
encode2
=
encode_frame
,
.
encode2
=
encode_frame
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_RGB24
,
AV_PIX_FMT_RGB32
,
AV_PIX_FMT_PAL8
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_RGB24
,
AV_PIX_FMT_RGB32
,
AV_PIX_FMT_PAL8
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_GRAY16BE
,
AV_PIX_FMT_MONOBLACK
,
AV_PIX_FMT_NONE
AV_PIX_FMT_MONOBLACK
,
AV_PIX_FMT_NONE
},
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"PNG (Portable Network Graphics) image"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"PNG (Portable Network Graphics) image"
),
...
...
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