Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
cfc15dc6
Commit
cfc15dc6
authored
23 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
unsigned stuff
Originally committed as revision 2726 to
svn://svn.mplayerhq.hu/mplayer/trunk/postproc
parent
dabcdbc4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
postproc/rgb2rgb.c
+11
-4
11 additions, 4 deletions
postproc/rgb2rgb.c
postproc/rgb2rgb.h
+4
-2
4 additions, 2 deletions
postproc/rgb2rgb.h
postproc/rgb2rgb_template.c
+11
-4
11 additions, 4 deletions
postproc/rgb2rgb_template.c
with
26 additions
and
10 deletions
postproc/rgb2rgb.c
+
11
−
4
View file @
cfc15dc6
...
...
@@ -295,7 +295,8 @@ void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, cons
* problem for anyone then tell me, and ill fix it)
*/
void
yv12toyuy2
(
const
uint8_t
*
ysrc
,
const
uint8_t
*
usrc
,
const
uint8_t
*
vsrc
,
uint8_t
*
dst
,
int
width
,
int
height
,
int
lumStride
,
int
chromStride
,
int
dstStride
)
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
lumStride
,
unsigned
int
chromStride
,
unsigned
int
dstStride
)
{
int
y
;
const
int
chromWidth
=
width
>>
1
;
...
...
@@ -366,7 +367,8 @@ asm( EMMS" \n\t"
* problem for anyone then tell me, and ill fix it)
*/
void
yuy2toyv12
(
const
uint8_t
*
src
,
uint8_t
*
ydst
,
uint8_t
*
udst
,
uint8_t
*
vdst
,
int
width
,
int
height
,
int
lumStride
,
int
chromStride
,
int
srcStride
)
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
lumStride
,
unsigned
int
chromStride
,
unsigned
int
srcStride
)
{
int
y
;
const
int
chromWidth
=
width
>>
1
;
...
...
@@ -420,7 +422,12 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
"addl $8, %%eax
\n\t
"
"cmpl %4, %%eax
\n\t
"
" jb 1b
\n\t
"
::
"r"
(
src
),
"r"
(
ydst
),
"r"
(
udst
),
"r"
(
vdst
),
"r"
(
chromWidth
)
:
"memory"
,
"%eax"
);
asm
volatile
(
"xorl %%eax, %%eax
\n\t
"
"1:
\n\t
"
PREFETCH
" 64(%0, %%eax, 4)
\n\t
"
"movq (%0, %%eax, 4), %%mm0
\n\t
"
// YUYV YUYV(0)
...
...
@@ -438,10 +445,10 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
MOVNTQ
" %%mm2, 8(%1, %%eax, 2)
\n\t
"
"addl $8, %%eax
\n\t
"
"cmpl %
5
, %%eax
\n\t
"
"cmpl %
4
, %%eax
\n\t
"
" jb 1b
\n\t
"
::
"r"
(
src
),
"r"
(
ydst
),
"r"
(
udst
),
"r"
(
vdst
),
"r"
(
chromWidth
)
,
"m"
(
width
)
::
"r"
(
src
+
srcStride
),
"r"
(
ydst
+
lumStride
),
"r"
(
udst
),
"r"
(
vdst
),
"r"
(
chromWidth
)
:
"memory"
,
"%eax"
);
#else
...
...
This diff is collapsed.
Click to expand it.
postproc/rgb2rgb.h
+
4
−
2
View file @
cfc15dc6
...
...
@@ -22,8 +22,10 @@ extern void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixel
extern
void
palette8torgb24
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
unsigned
num_pixels
,
const
uint8_t
*
palette
);
extern
void
yv12toyuy2
(
const
uint8_t
*
ysrc
,
const
uint8_t
*
usrc
,
const
uint8_t
*
vsrc
,
uint8_t
*
dst
,
int
width
,
int
height
,
int
lumStride
,
int
chromStride
,
int
dstStride
);
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
lumStride
,
unsigned
int
chromStride
,
unsigned
int
dstStride
);
extern
void
yuy2toyv12
(
const
uint8_t
*
src
,
uint8_t
*
ydst
,
uint8_t
*
udst
,
uint8_t
*
vdst
,
int
width
,
int
height
,
int
lumStride
,
int
chromStride
,
int
srcStride
);
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
lumStride
,
unsigned
int
chromStride
,
unsigned
int
srcStride
);
#endif
This diff is collapsed.
Click to expand it.
postproc/rgb2rgb_template.c
+
11
−
4
View file @
cfc15dc6
...
...
@@ -295,7 +295,8 @@ void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, cons
* problem for anyone then tell me, and ill fix it)
*/
void
yv12toyuy2
(
const
uint8_t
*
ysrc
,
const
uint8_t
*
usrc
,
const
uint8_t
*
vsrc
,
uint8_t
*
dst
,
int
width
,
int
height
,
int
lumStride
,
int
chromStride
,
int
dstStride
)
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
lumStride
,
unsigned
int
chromStride
,
unsigned
int
dstStride
)
{
int
y
;
const
int
chromWidth
=
width
>>
1
;
...
...
@@ -366,7 +367,8 @@ asm( EMMS" \n\t"
* problem for anyone then tell me, and ill fix it)
*/
void
yuy2toyv12
(
const
uint8_t
*
src
,
uint8_t
*
ydst
,
uint8_t
*
udst
,
uint8_t
*
vdst
,
int
width
,
int
height
,
int
lumStride
,
int
chromStride
,
int
srcStride
)
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
lumStride
,
unsigned
int
chromStride
,
unsigned
int
srcStride
)
{
int
y
;
const
int
chromWidth
=
width
>>
1
;
...
...
@@ -420,7 +422,12 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
"addl $8, %%eax
\n\t
"
"cmpl %4, %%eax
\n\t
"
" jb 1b
\n\t
"
::
"r"
(
src
),
"r"
(
ydst
),
"r"
(
udst
),
"r"
(
vdst
),
"r"
(
chromWidth
)
:
"memory"
,
"%eax"
);
asm
volatile
(
"xorl %%eax, %%eax
\n\t
"
"1:
\n\t
"
PREFETCH
" 64(%0, %%eax, 4)
\n\t
"
"movq (%0, %%eax, 4), %%mm0
\n\t
"
// YUYV YUYV(0)
...
...
@@ -438,10 +445,10 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
MOVNTQ
" %%mm2, 8(%1, %%eax, 2)
\n\t
"
"addl $8, %%eax
\n\t
"
"cmpl %
5
, %%eax
\n\t
"
"cmpl %
4
, %%eax
\n\t
"
" jb 1b
\n\t
"
::
"r"
(
src
),
"r"
(
ydst
),
"r"
(
udst
),
"r"
(
vdst
),
"r"
(
chromWidth
)
,
"m"
(
width
)
::
"r"
(
src
+
srcStride
),
"r"
(
ydst
+
lumStride
),
"r"
(
udst
),
"r"
(
vdst
),
"r"
(
chromWidth
)
:
"memory"
,
"%eax"
);
#else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment