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
92a36a6b
Commit
92a36a6b
authored
Jul 31, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pngdec: correctly indent macros
parent
52269f48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
pngdec.c
libavcodec/pngdec.c
+17
-17
No files found.
libavcodec/pngdec.c
View file @
92a36a6b
...
@@ -159,7 +159,8 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top,
...
@@ -159,7 +159,8 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top,
}
}
}
}
#define UNROLL1(bpp, op) { \
#define UNROLL1(bpp, op) \
{ \
r = dst[0]; \
r = dst[0]; \
if (bpp >= 2) \
if (bpp >= 2) \
g = dst[1]; \
g = dst[1]; \
...
@@ -179,25 +180,24 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top,
...
@@ -179,25 +180,24 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top,
continue; \
continue; \
dst[i + 3] = a = op(a, src[i + 3], last[i + 3]); \
dst[i + 3] = a = op(a, src[i + 3], last[i + 3]); \
} \
} \
}
}
#define UNROLL_FILTER(op) \
#define UNROLL_FILTER(op) \
if (bpp == 1)
\
if (bpp == 1)
{
\
UNROLL1(1, op) \
UNROLL1(1, op) \
else if (bpp == 2) \
} else if (bpp == 2) { \
UNROLL1(2, op) \
UNROLL1(2, op) \
else if (bpp == 3) \
} else if (bpp == 3) { \
UNROLL1(3, op) \
UNROLL1(3, op) \
else if (bpp == 4) \
} else if (bpp == 4) { \
UNROLL1(4, op) \
UNROLL1(4, op) \
else { \
} else { \
for (; i < size; i += bpp) { \
for (; i < size; i += bpp) { \
int j; \
int j; \
for (j = 0; j < bpp; j++) \
for (j = 0; j < bpp; j++) \
dst[i + j] = op(dst[i + j - bpp], \
dst[i + j] = op(dst[i + j - bpp], src[i + j], last[i + j]); \
src[i + j], last[i + j]); \
} \
} \
}
}
/* NOTE: 'dst' can be equal to 'last' */
/* NOTE: 'dst' can be equal to 'last' */
static
void
png_filter_row
(
PNGDSPContext
*
dsp
,
uint8_t
*
dst
,
int
filter_type
,
static
void
png_filter_row
(
PNGDSPContext
*
dsp
,
uint8_t
*
dst
,
int
filter_type
,
...
...
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