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
f58f9023
Commit
f58f9023
authored
Oct 13, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pngenc: write sample aspect ratio
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
8288c2b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
pngenc.c
libavcodec/pngenc.c
+5
-0
png
tests/ref/lavf/png
+6
-6
No files found.
libavcodec/pngenc.c
View file @
f58f9023
...
...
@@ -335,6 +335,11 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
png_write_chunk
(
&
s
->
bytestream
,
MKTAG
(
'I'
,
'H'
,
'D'
,
'R'
),
s
->
buf
,
13
);
AV_WB32
(
s
->
buf
,
avctx
->
sample_aspect_ratio
.
num
);
AV_WB32
(
s
->
buf
+
4
,
avctx
->
sample_aspect_ratio
.
den
);
s
->
buf
[
8
]
=
0
;
/* unit specifier is unknown */
png_write_chunk
(
&
s
->
bytestream
,
MKTAG
(
'p'
,
'H'
,
'Y'
,
's'
),
s
->
buf
,
9
);
/* put the palette if needed */
if
(
color_type
==
PNG_COLOR_TYPE_PALETTE
)
{
int
has_alpha
,
alpha
,
i
;
...
...
tests/ref/lavf/png
View file @
f58f9023
c162094e51dc1a3203de43e496086dfd
*./tests/data/images/png/02.png
2af72da4468e61a37c220b25cb28618a
*./tests/data/images/png/02.png
./tests/data/images/png/%02d.png CRC=0x6da01946
2486
12
./tests/data/images/png/02.png
6
3805114b3723490833789277246276f
*./tests/data/images/png/02.png
2486
33
./tests/data/images/png/02.png
6
2b26c9582ba37dd37b76191338f3770
*./tests/data/images/png/02.png
./tests/data/images/png/%02d.png CRC=0x831a2963
416
66
./tests/data/images/png/02.png
b4
c1f0b706a296ba6e791d436757dc5
f *./tests/data/images/png/02.png
416
87
./tests/data/images/png/02.png
b4
e38244c97debe3f528e7d1adb283e
f *./tests/data/images/png/02.png
./tests/data/images/png/%02d.png CRC=0x5984c023
511
879
./tests/data/images/png/02.png
511
900
./tests/data/images/png/02.png
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