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
cccac765
Commit
cccac765
authored
Jan 15, 2012
by
Carl Eugen Hoyos
Committed by
Vittorio Giovara
Mar 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
png: Support rgb48 and rgba64 encoding
parent
c598b569
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
pngenc.c
libavcodec/pngenc.c
+9
-1
No files found.
libavcodec/pngenc.c
View file @
cccac765
...
@@ -245,6 +245,14 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -245,6 +245,14 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
is_progressive
=
!!
(
avctx
->
flags
&
CODEC_FLAG_INTERLACED_DCT
);
is_progressive
=
!!
(
avctx
->
flags
&
CODEC_FLAG_INTERLACED_DCT
);
switch
(
avctx
->
pix_fmt
)
{
switch
(
avctx
->
pix_fmt
)
{
case
AV_PIX_FMT_RGBA64BE
:
bit_depth
=
16
;
color_type
=
PNG_COLOR_TYPE_RGB_ALPHA
;
break
;
case
AV_PIX_FMT_RGB48BE
:
bit_depth
=
16
;
color_type
=
PNG_COLOR_TYPE_RGB
;
break
;
case
AV_PIX_FMT_RGB32
:
case
AV_PIX_FMT_RGB32
:
bit_depth
=
8
;
bit_depth
=
8
;
color_type
=
PNG_COLOR_TYPE_RGB_ALPHA
;
color_type
=
PNG_COLOR_TYPE_RGB_ALPHA
;
...
@@ -482,7 +490,7 @@ AVCodec ff_png_encoder = {
...
@@ -482,7 +490,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_
RGBA64BE
,
AV_PIX_FMT_RGB48BE
,
AV_PIX_FMT_
GRAY16BE
,
AV_PIX_FMT_MONOBLACK
,
AV_PIX_FMT_NONE
AV_PIX_FMT_MONOBLACK
,
AV_PIX_FMT_NONE
},
},
};
};
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