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
de1f8ead
Commit
de1f8ead
authored
Nov 15, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hevcdsp_template: templatize transquant_bypass
parent
16c01fb4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
40 deletions
+13
-40
hevcdsp_template.c
libavcodec/hevcdsp_template.c
+13
-40
No files found.
libavcodec/hevcdsp_template.c
View file @
de1f8ead
...
...
@@ -40,16 +40,16 @@ static void FUNC(put_pcm)(uint8_t *_dst, ptrdiff_t stride, int size,
}
}
static
void
FUNC
(
transquant_bypass4x4
)(
uint8_t
*
_dst
,
int16_t
*
coeffs
,
ptrdiff_t
strid
e
)
static
av_always_inline
void
FUNC
(
transquant_bypass
)(
uint8_t
*
_dst
,
int16_t
*
coeffs
,
ptrdiff_t
stride
,
int
siz
e
)
{
int
x
,
y
;
pixel
*
dst
=
(
pixel
*
)
_dst
;
stride
/=
sizeof
(
pixel
);
for
(
y
=
0
;
y
<
4
;
y
++
)
{
for
(
x
=
0
;
x
<
4
;
x
++
)
{
for
(
y
=
0
;
y
<
size
;
y
++
)
{
for
(
x
=
0
;
x
<
size
;
x
++
)
{
dst
[
x
]
=
av_clip_pixel
(
dst
[
x
]
+
*
coeffs
);
coeffs
++
;
}
...
...
@@ -57,55 +57,28 @@ static void FUNC(transquant_bypass4x4)(uint8_t *_dst, int16_t *coeffs,
}
}
static
void
FUNC
(
transquant_bypass
8x8
)(
uint8_t
*
_dst
,
int16_t
*
coeffs
,
static
void
FUNC
(
transquant_bypass
4x4
)(
uint8_t
*
_dst
,
int16_t
*
coeffs
,
ptrdiff_t
stride
)
{
int
x
,
y
;
pixel
*
dst
=
(
pixel
*
)
_dst
;
stride
/=
sizeof
(
pixel
);
FUNC
(
transquant_bypass
)(
_dst
,
coeffs
,
stride
,
4
);
}
for
(
y
=
0
;
y
<
8
;
y
++
)
{
for
(
x
=
0
;
x
<
8
;
x
++
)
{
dst
[
x
]
=
av_clip_pixel
(
dst
[
x
]
+
*
coeffs
);
coeffs
++
;
}
dst
+=
stride
;
}
static
void
FUNC
(
transquant_bypass8x8
)(
uint8_t
*
_dst
,
int16_t
*
coeffs
,
ptrdiff_t
stride
)
{
FUNC
(
transquant_bypass
)(
_dst
,
coeffs
,
stride
,
8
);
}
static
void
FUNC
(
transquant_bypass16x16
)(
uint8_t
*
_dst
,
int16_t
*
coeffs
,
ptrdiff_t
stride
)
{
int
x
,
y
;
pixel
*
dst
=
(
pixel
*
)
_dst
;
stride
/=
sizeof
(
pixel
);
for
(
y
=
0
;
y
<
16
;
y
++
)
{
for
(
x
=
0
;
x
<
16
;
x
++
)
{
dst
[
x
]
=
av_clip_pixel
(
dst
[
x
]
+
*
coeffs
);
coeffs
++
;
}
dst
+=
stride
;
}
FUNC
(
transquant_bypass
)(
_dst
,
coeffs
,
stride
,
16
);
}
static
void
FUNC
(
transquant_bypass32x32
)(
uint8_t
*
_dst
,
int16_t
*
coeffs
,
ptrdiff_t
stride
)
{
int
x
,
y
;
pixel
*
dst
=
(
pixel
*
)
_dst
;
stride
/=
sizeof
(
pixel
);
for
(
y
=
0
;
y
<
32
;
y
++
)
{
for
(
x
=
0
;
x
<
32
;
x
++
)
{
dst
[
x
]
=
av_clip_pixel
(
dst
[
x
]
+
*
coeffs
);
coeffs
++
;
}
dst
+=
stride
;
}
FUNC
(
transquant_bypass
)(
_dst
,
coeffs
,
stride
,
32
);
}
static
void
FUNC
(
transform_skip
)(
uint8_t
*
_dst
,
int16_t
*
coeffs
,
...
...
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