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
ba0e6999
Commit
ba0e6999
authored
12 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
sws/input: switch to av_assert
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
56ae5926
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libswscale/input.c
+12
-11
12 additions, 11 deletions
libswscale/input.c
with
12 additions
and
11 deletions
libswscale/input.c
+
12
−
11
View file @
ba0e6999
...
...
@@ -30,6 +30,7 @@
#include
"libavutil/intreadwrite.h"
#include
"libavutil/mathematics.h"
#include
"libavutil/pixdesc.h"
#include
"libavutil/avassert.h"
#include
"config.h"
#include
"rgb2rgb.h"
#include
"swscale.h"
...
...
@@ -71,7 +72,7 @@ rgb64ToUV_c_template(uint16_t *dstU, uint16_t *dstV,
int
width
,
enum
PixelFormat
origin
)
{
int
i
;
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
for
(
i
=
0
;
i
<
width
;
i
++
)
{
int
r_b
=
input_pixel
(
&
src1
[
i
*
4
+
0
]);
int
g
=
input_pixel
(
&
src1
[
i
*
4
+
1
]);
...
...
@@ -88,7 +89,7 @@ rgb64ToUV_half_c_template(uint16_t *dstU, uint16_t *dstV,
int
width
,
enum
PixelFormat
origin
)
{
int
i
;
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
for
(
i
=
0
;
i
<
width
;
i
++
)
{
int
r_b
=
(
input_pixel
(
&
src1
[
8
*
i
+
0
])
+
input_pixel
(
&
src1
[
8
*
i
+
4
])
+
1
)
>>
1
;
int
g
=
(
input_pixel
(
&
src1
[
8
*
i
+
1
])
+
input_pixel
(
&
src1
[
8
*
i
+
5
])
+
1
)
>>
1
;
...
...
@@ -153,7 +154,7 @@ static av_always_inline void rgb48ToUV_c_template(uint16_t *dstU,
enum
PixelFormat
origin
)
{
int
i
;
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
for
(
i
=
0
;
i
<
width
;
i
++
)
{
int
r_b
=
input_pixel
(
&
src1
[
i
*
3
+
0
]);
int
g
=
input_pixel
(
&
src1
[
i
*
3
+
1
]);
...
...
@@ -172,7 +173,7 @@ static av_always_inline void rgb48ToUV_half_c_template(uint16_t *dstU,
enum
PixelFormat
origin
)
{
int
i
;
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
for
(
i
=
0
;
i
<
width
;
i
++
)
{
int
r_b
=
(
input_pixel
(
&
src1
[
6
*
i
+
0
])
+
input_pixel
(
&
src1
[
6
*
i
+
3
])
+
1
)
>>
1
;
...
...
@@ -449,7 +450,7 @@ static void palToUV_c(uint16_t *dstU, int16_t *dstV,
int
width
,
uint32_t
*
pal
)
{
int
i
;
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
for
(
i
=
0
;
i
<
width
;
i
++
)
{
int
p
=
pal
[
src1
[
i
]];
...
...
@@ -506,7 +507,7 @@ static void yuy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, con
dstU
[
i
]
=
src1
[
4
*
i
+
1
];
dstV
[
i
]
=
src1
[
4
*
i
+
3
];
}
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
}
static
void
bswap16Y_c
(
uint8_t
*
_dst
,
const
uint8_t
*
_src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
...
...
@@ -550,7 +551,7 @@ static void uyvyToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, con
dstU
[
i
]
=
src1
[
4
*
i
+
0
];
dstV
[
i
]
=
src1
[
4
*
i
+
2
];
}
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
}
static
av_always_inline
void
nvXXtoUV_c
(
uint8_t
*
dst1
,
uint8_t
*
dst2
,
...
...
@@ -604,7 +605,7 @@ static void bgr24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, co
dstU
[
i
]
=
(
RU
*
r
+
GU
*
g
+
BU
*
b
+
(
256
<<
(
RGB2YUV_SHIFT
-
1
))
+
(
1
<<
(
RGB2YUV_SHIFT
-
7
)))
>>
(
RGB2YUV_SHIFT
-
6
);
dstV
[
i
]
=
(
RV
*
r
+
GV
*
g
+
BV
*
b
+
(
256
<<
(
RGB2YUV_SHIFT
-
1
))
+
(
1
<<
(
RGB2YUV_SHIFT
-
7
)))
>>
(
RGB2YUV_SHIFT
-
6
);
}
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
}
static
void
bgr24ToUV_half_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
...
...
@@ -619,7 +620,7 @@ static void bgr24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused
dstU
[
i
]
=
(
RU
*
r
+
GU
*
g
+
BU
*
b
+
(
256
<<
RGB2YUV_SHIFT
)
+
(
1
<<
(
RGB2YUV_SHIFT
-
6
)))
>>
(
RGB2YUV_SHIFT
-
5
);
dstV
[
i
]
=
(
RV
*
r
+
GV
*
g
+
BV
*
b
+
(
256
<<
RGB2YUV_SHIFT
)
+
(
1
<<
(
RGB2YUV_SHIFT
-
6
)))
>>
(
RGB2YUV_SHIFT
-
5
);
}
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
}
static
void
rgb24ToY_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
...
...
@@ -639,7 +640,7 @@ static void rgb24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, co
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
for
(
i
=
0
;
i
<
width
;
i
++
)
{
int
r
=
src1
[
3
*
i
+
0
];
int
g
=
src1
[
3
*
i
+
1
];
...
...
@@ -654,7 +655,7 @@ static void rgb24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
assert
(
src1
==
src2
);
av_
assert
1
(
src1
==
src2
);
for
(
i
=
0
;
i
<
width
;
i
++
)
{
int
r
=
src1
[
6
*
i
+
0
]
+
src1
[
6
*
i
+
3
];
int
g
=
src1
[
6
*
i
+
1
]
+
src1
[
6
*
i
+
4
];
...
...
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