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
50a3867b
Commit
50a3867b
authored
Mar 22, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
png: make ff_png_pass_mask local to pngdec.
parent
abdcb491
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
png.c
libavcodec/png.c
+0
-5
png.h
libavcodec/png.h
+0
-3
pngdec.c
libavcodec/pngdec.c
+6
-1
No files found.
libavcodec/png.c
View file @
50a3867b
...
...
@@ -39,11 +39,6 @@ static const uint8_t ff_png_pass_xshift[NB_PASSES] = {
3
,
3
,
2
,
2
,
1
,
1
,
0
};
/* Mask to determine which pixels are valid in a pass */
const
uint8_t
ff_png_pass_mask
[
NB_PASSES
]
=
{
0x01
,
0x01
,
0x11
,
0x11
,
0x55
,
0x55
,
0xff
,
};
void
*
ff_png_zalloc
(
void
*
opaque
,
unsigned
int
items
,
unsigned
int
size
)
{
if
(
items
>=
UINT_MAX
/
size
)
...
...
libavcodec/png.h
View file @
50a3867b
...
...
@@ -55,9 +55,6 @@ extern const uint8_t ff_mngsig[8];
/* Mask to determine which y pixels are valid in a pass */
extern
const
uint8_t
ff_png_pass_ymask
[
NB_PASSES
];
/* Mask to determine which pixels are valid in a pass */
extern
const
uint8_t
ff_png_pass_mask
[
NB_PASSES
];
void
*
ff_png_zalloc
(
void
*
opaque
,
unsigned
int
items
,
unsigned
int
size
);
void
ff_png_zfree
(
void
*
opaque
,
void
*
ptr
);
...
...
libavcodec/pngdec.c
View file @
50a3867b
...
...
@@ -67,6 +67,11 @@ typedef struct PNGDecContext {
z_stream
zstream
;
}
PNGDecContext
;
/* Mask to determine which pixels are valid in a pass */
static
const
uint8_t
png_pass_mask
[
NB_PASSES
]
=
{
0x01
,
0x01
,
0x11
,
0x11
,
0x55
,
0x55
,
0xff
,
};
/* Mask to determine which y pixels can be written in a pass */
static
const
uint8_t
png_pass_dsp_ymask
[
NB_PASSES
]
=
{
0xff
,
0xff
,
0x0f
,
0xff
,
0x33
,
0xff
,
0x55
,
...
...
@@ -88,7 +93,7 @@ static void png_put_interlaced_row(uint8_t *dst, int width,
uint8_t
*
d
;
const
uint8_t
*
s
;
mask
=
ff_
png_pass_mask
[
pass
];
mask
=
png_pass_mask
[
pass
];
dsp_mask
=
png_pass_dsp_mask
[
pass
];
switch
(
bits_per_pixel
)
{
case
1
:
...
...
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