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
e458b536
Commit
e458b536
authored
Jun 07, 2011
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: merge macros that are used only once.
This reduces source code size without affecting the binary.
parent
6e5a8d3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
swscale.c
libswscale/swscale.c
+4
-10
No files found.
libswscale/swscale.c
View file @
e458b536
...
@@ -381,7 +381,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter,
...
@@ -381,7 +381,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter,
}
}
}
}
#define YSCALE_YUV_2_PACKEDX_
NOCLIP_
C(type,alpha) \
#define YSCALE_YUV_2_PACKEDX_C(type,alpha) \
for (i=0; i<(dstW>>1); i++) {\
for (i=0; i<(dstW>>1); i++) {\
int j;\
int j;\
int Y1 = 1<<18;\
int Y1 = 1<<18;\
...
@@ -413,10 +413,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter,
...
@@ -413,10 +413,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter,
}\
}\
A1>>=19;\
A1>>=19;\
A2>>=19;\
A2>>=19;\
}
}\
#define YSCALE_YUV_2_PACKEDX_C(type,alpha) \
YSCALE_YUV_2_PACKEDX_NOCLIP_C(type,alpha)\
if ((Y1|Y2|U|V)&256) {\
if ((Y1|Y2|U|V)&256) {\
if (Y1>255) Y1=255; \
if (Y1>255) Y1=255; \
else if (Y1<0)Y1=0; \
else if (Y1<0)Y1=0; \
...
@@ -432,7 +429,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter,
...
@@ -432,7 +429,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter,
A2=av_clip_uint8(A2);\
A2=av_clip_uint8(A2);\
}
}
#define YSCALE_YUV_2_
PACKED
X_FULL_C(rnd,alpha) \
#define YSCALE_YUV_2_
RGB
X_FULL_C(rnd,alpha) \
for (i=0; i<dstW; i++) {\
for (i=0; i<dstW; i++) {\
int j;\
int j;\
int Y = 0;\
int Y = 0;\
...
@@ -458,10 +455,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter,
...
@@ -458,10 +455,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter,
A >>=19;\
A >>=19;\
if (A&256)\
if (A&256)\
A = av_clip_uint8(A);\
A = av_clip_uint8(A);\
}
}\
#define YSCALE_YUV_2_RGBX_FULL_C(rnd,alpha) \
YSCALE_YUV_2_PACKEDX_FULL_C(rnd>>3,alpha)\
Y-= c->yuv2rgb_y_offset;\
Y-= c->yuv2rgb_y_offset;\
Y*= c->yuv2rgb_y_coeff;\
Y*= c->yuv2rgb_y_coeff;\
Y+= rnd;\
Y+= rnd;\
...
...
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