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
92ba9651
Commit
92ba9651
authored
Jan 07, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsputil: Move draw_edges and clear_block* out of dsputil_template
The functions are not used templatized.
parent
da5be235
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
40 deletions
+38
-40
dsputil.c
libavcodec/dsputil.c
+38
-0
dsputil_template.c
libavcodec/dsputil_template.c
+0
-40
No files found.
libavcodec/dsputil.c
View file @
92ba9651
...
...
@@ -2402,6 +2402,44 @@ static void jref_idct_add(uint8_t *dest, int line_size, int16_t *block)
add_pixels_clamped_c
(
block
,
dest
,
line_size
);
}
/* draw the edges of width 'w' of an image of size width, height */
// FIXME: Check that this is OK for MPEG-4 interlaced.
static
void
draw_edges_8_c
(
uint8_t
*
buf
,
int
wrap
,
int
width
,
int
height
,
int
w
,
int
h
,
int
sides
)
{
uint8_t
*
ptr
=
buf
,
*
last_line
;
int
i
;
/* left and right */
for
(
i
=
0
;
i
<
height
;
i
++
)
{
memset
(
ptr
-
w
,
ptr
[
0
],
w
);
memset
(
ptr
+
width
,
ptr
[
width
-
1
],
w
);
ptr
+=
wrap
;
}
/* top and bottom + corners */
buf
-=
w
;
last_line
=
buf
+
(
height
-
1
)
*
wrap
;
if
(
sides
&
EDGE_TOP
)
for
(
i
=
0
;
i
<
h
;
i
++
)
// top
memcpy
(
buf
-
(
i
+
1
)
*
wrap
,
buf
,
width
+
w
+
w
);
if
(
sides
&
EDGE_BOTTOM
)
for
(
i
=
0
;
i
<
h
;
i
++
)
// bottom
memcpy
(
last_line
+
(
i
+
1
)
*
wrap
,
last_line
,
width
+
w
+
w
);
}
static
void
clear_block_8_c
(
int16_t
*
block
)
{
memset
(
block
,
0
,
sizeof
(
int16_t
)
*
64
);
}
static
void
clear_blocks_8_c
(
int16_t
*
blocks
)
{
memset
(
blocks
,
0
,
sizeof
(
int16_t
)
*
6
*
64
);
}
/* init static data */
av_cold
void
ff_dsputil_static_init
(
void
)
{
...
...
libavcodec/dsputil_template.c
View file @
92ba9651
...
...
@@ -27,46 +27,6 @@
* DSP utils
*/
#include "pixels.h"
/* draw the edges of width 'w' of an image of size width, height */
// FIXME: Check that this is OK for MPEG-4 interlaced.
static
void
draw_edges_8_c
(
uint8_t
*
buf
,
int
wrap
,
int
width
,
int
height
,
int
w
,
int
h
,
int
sides
)
{
uint8_t
*
ptr
=
buf
,
*
last_line
;
int
i
;
/* left and right */
for
(
i
=
0
;
i
<
height
;
i
++
)
{
memset
(
ptr
-
w
,
ptr
[
0
],
w
);
memset
(
ptr
+
width
,
ptr
[
width
-
1
],
w
);
ptr
+=
wrap
;
}
/* top and bottom + corners */
buf
-=
w
;
last_line
=
buf
+
(
height
-
1
)
*
wrap
;
if
(
sides
&
EDGE_TOP
)
for
(
i
=
0
;
i
<
h
;
i
++
)
// top
memcpy
(
buf
-
(
i
+
1
)
*
wrap
,
buf
,
width
+
w
+
w
);
if
(
sides
&
EDGE_BOTTOM
)
for
(
i
=
0
;
i
<
h
;
i
++
)
// bottom
memcpy
(
last_line
+
(
i
+
1
)
*
wrap
,
last_line
,
width
+
w
+
w
);
}
static
void
clear_block_8_c
(
int16_t
*
block
)
{
memset
(
block
,
0
,
sizeof
(
int16_t
)
*
64
);
}
static
void
clear_blocks_8_c
(
int16_t
*
blocks
)
{
memset
(
blocks
,
0
,
sizeof
(
int16_t
)
*
6
*
64
);
}
#define PIXOP2(OPNAME, OP) \
static inline void OPNAME ## _no_rnd_pixels8_l2_8(uint8_t *dst, \
const uint8_t *src1, \
...
...
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