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
9c49ca0f
Commit
9c49ca0f
authored
May 09, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: factor shift out of DITHER_COPY().
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
300e497b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
swscale.c
libswscale/swscale.c
+10
-9
No files found.
libswscale/swscale.c
View file @
9c49ca0f
...
...
@@ -1859,19 +1859,20 @@ static int packedCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[
#define DITHER_COPY(dst, dstStride, src, srcStride)\
for (i = 0; i < height; i++) {\
int shift= src_depth-dst_depth;\
uint8_t *dither= dithers[src_depth-9][i&7];\
for (j = 0; j < length-7; j+=8){\
dst[j+0] = (src[j+0] + dither[0])>>
(src_depth-dst_depth)
;\
dst[j+1] = (src[j+1] + dither[1])>>
(src_depth-dst_depth)
;\
dst[j+2] = (src[j+2] + dither[2])>>
(src_depth-dst_depth)
;\
dst[j+3] = (src[j+3] + dither[3])>>
(src_depth-dst_depth)
;\
dst[j+4] = (src[j+4] + dither[4])>>
(src_depth-dst_depth)
;\
dst[j+5] = (src[j+5] + dither[5])>>
(src_depth-dst_depth)
;\
dst[j+6] = (src[j+6] + dither[6])>>
(src_depth-dst_depth)
;\
dst[j+7] = (src[j+7] + dither[7])>>
(src_depth-dst_depth)
;\
dst[j+0] = (src[j+0] + dither[0])>>
shift
;\
dst[j+1] = (src[j+1] + dither[1])>>
shift
;\
dst[j+2] = (src[j+2] + dither[2])>>
shift
;\
dst[j+3] = (src[j+3] + dither[3])>>
shift
;\
dst[j+4] = (src[j+4] + dither[4])>>
shift
;\
dst[j+5] = (src[j+5] + dither[5])>>
shift
;\
dst[j+6] = (src[j+6] + dither[6])>>
shift
;\
dst[j+7] = (src[j+7] + dither[7])>>
shift
;\
}\
for (; j < length; j++)\
dst[j] = (src[j] + dither[j&7])>>
(src_depth-dst_depth)
;\
dst[j] = (src[j] + dither[j&7])>>
shift
;\
dst += dstStride;\
src += srcStride;\
}
...
...
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