Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
external
ffmpeg
Commits
7ffaa195
Commit
7ffaa195
authored
Dec 01, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsputil: x86: Move ff_inv_zigzag_direct16 table init to mpegvideo
The table is MMX-specific and used nowhere else.
parent
7b05845b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
dsputil.c
libavcodec/dsputil.c
+0
-5
mpegvideoenc.c
libavcodec/x86/mpegvideoenc.c
+6
-1
mpegvideoenc_template.c
libavcodec/x86/mpegvideoenc_template.c
+2
-2
No files found.
libavcodec/dsputil.c
View file @
7ffaa195
...
...
@@ -68,9 +68,6 @@ const uint8_t ff_zigzag248_direct[64] = {
53
,
61
,
54
,
62
,
39
,
47
,
55
,
63
,
};
/* not permutated inverse zigzag_direct + 1 for MMX quantizer */
DECLARE_ALIGNED
(
16
,
uint16_t
,
ff_inv_zigzag_direct16
)[
64
];
const
uint8_t
ff_alternate_horizontal_scan
[
64
]
=
{
0
,
1
,
2
,
3
,
8
,
9
,
16
,
17
,
10
,
11
,
4
,
5
,
6
,
7
,
15
,
14
,
...
...
@@ -2431,8 +2428,6 @@ av_cold void ff_dsputil_static_init(void)
for
(
i
=
0
;
i
<
512
;
i
++
)
{
ff_squareTbl
[
i
]
=
(
i
-
256
)
*
(
i
-
256
);
}
for
(
i
=
0
;
i
<
64
;
i
++
)
ff_inv_zigzag_direct16
[
ff_zigzag_direct
[
i
]]
=
i
+
1
;
}
int
ff_check_alignment
(
void
){
...
...
libavcodec/x86/mpegvideoenc.c
View file @
7ffaa195
...
...
@@ -28,7 +28,8 @@
#include "libavcodec/mpegvideo.h"
#include "dsputil_x86.h"
extern
uint16_t
ff_inv_zigzag_direct16
[
64
];
/* not permutated inverse zigzag_direct + 1 for MMX quantizer */
DECLARE_ALIGNED
(
16
,
static
uint16_t
,
inv_zigzag_direct16
)[
64
];
#if HAVE_MMX_INLINE
#define COMPILE_TEMPLATE_MMXEXT 0
...
...
@@ -84,6 +85,10 @@ extern uint16_t ff_inv_zigzag_direct16[64];
av_cold
void
ff_MPV_encode_init_x86
(
MpegEncContext
*
s
)
{
const
int
dct_algo
=
s
->
avctx
->
dct_algo
;
int
i
;
for
(
i
=
0
;
i
<
64
;
i
++
)
inv_zigzag_direct16
[
ff_zigzag_direct
[
i
]]
=
i
+
1
;
if
(
dct_algo
==
FF_DCT_AUTO
||
dct_algo
==
FF_DCT_MMX
)
{
#if HAVE_MMX_INLINE
...
...
libavcodec/x86/mpegvideoenc_template.c
View file @
7ffaa195
...
...
@@ -168,7 +168,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
"movzb %%al, %%"
REG_a
"
\n\t
"
// last_non_zero_p1
:
"+a"
(
last_non_zero_p1
)
:
"r"
(
block
+
64
),
"r"
(
qmat
),
"r"
(
bias
),
"r"
(
ff_inv_zigzag_direct16
+
64
),
"r"
(
temp_block
+
64
)
"r"
(
inv_zigzag_direct16
+
64
),
"r"
(
temp_block
+
64
)
XMM_CLOBBERS_ONLY
(
"%xmm0"
,
"%xmm1"
,
"%xmm2"
,
"%xmm3"
,
"%xmm4"
,
"%xmm5"
,
"%xmm6"
,
"%xmm7"
)
);
...
...
@@ -202,7 +202,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
"movzb %%al, %%"
REG_a
"
\n\t
"
// last_non_zero_p1
:
"+a"
(
last_non_zero_p1
)
:
"r"
(
block
+
64
),
"r"
(
qmat
+
64
),
"r"
(
bias
+
64
),
"r"
(
ff_inv_zigzag_direct16
+
64
),
"r"
(
temp_block
+
64
)
"r"
(
inv_zigzag_direct16
+
64
),
"r"
(
temp_block
+
64
)
XMM_CLOBBERS_ONLY
(
"%xmm0"
,
"%xmm1"
,
"%xmm2"
,
"%xmm3"
,
"%xmm4"
,
"%xmm5"
,
"%xmm6"
,
"%xmm7"
)
);
...
...
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