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
59cf08ce
Commit
59cf08ce
authored
Apr 20, 2003
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed static init
Originally committed as revision 1799 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
fab21997
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
dsputil.c
libavcodec/dsputil.c
+17
-15
dsputil.h
libavcodec/dsputil.h
+1
-0
utils.c
libavcodec/utils.c
+1
-1
No files found.
libavcodec/dsputil.c
View file @
59cf08ce
...
@@ -2489,26 +2489,28 @@ static void ff_jref_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
...
@@ -2489,26 +2489,28 @@ static void ff_jref_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
add_pixels_clamped_c
(
block
,
dest
,
line_size
);
add_pixels_clamped_c
(
block
,
dest
,
line_size
);
}
}
void
dsputil_init
(
DSPContext
*
c
,
AVCodecContext
*
avctx
)
/* init static data */
void
dsputil_static_init
(
void
)
{
{
static
int
init_done
=
0
;
int
i
;
int
i
;
if
(
!
init_done
)
{
for
(
i
=
0
;
i
<
256
;
i
++
)
cropTbl
[
i
+
MAX_NEG_CROP
]
=
i
;
for
(
i
=
0
;
i
<
256
;
i
++
)
cropTbl
[
i
+
MAX_NEG_CROP
]
=
i
;
for
(
i
=
0
;
i
<
MAX_NEG_CROP
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_NEG_CROP
;
i
++
)
{
cropTbl
[
i
]
=
0
;
cropTbl
[
i
]
=
0
;
cropTbl
[
i
+
MAX_NEG_CROP
+
256
]
=
255
;
cropTbl
[
i
+
MAX_NEG_CROP
+
256
]
=
255
;
}
}
for
(
i
=
0
;
i
<
512
;
i
++
)
{
for
(
i
=
0
;
i
<
512
;
i
++
)
{
squareTbl
[
i
]
=
(
i
-
256
)
*
(
i
-
256
);
squareTbl
[
i
]
=
(
i
-
256
)
*
(
i
-
256
);
}
}
for
(
i
=
0
;
i
<
64
;
i
++
)
inv_zigzag_direct16
[
ff_zigzag_direct
[
i
]]
=
i
+
1
;
}
for
(
i
=
0
;
i
<
64
;
i
++
)
inv_zigzag_direct16
[
ff_zigzag_direct
[
i
]]
=
i
+
1
;
init_done
=
1
;
void
dsputil_init
(
DSPContext
*
c
,
AVCodecContext
*
avctx
)
}
{
int
i
;
#ifdef CONFIG_ENCODERS
#ifdef CONFIG_ENCODERS
if
(
avctx
->
dct_algo
==
FF_DCT_FASTINT
)
if
(
avctx
->
dct_algo
==
FF_DCT_FASTINT
)
...
...
libavcodec/dsputil.h
View file @
59cf08ce
...
@@ -245,6 +245,7 @@ typedef struct DSPContext {
...
@@ -245,6 +245,7 @@ typedef struct DSPContext {
}
DSPContext
;
}
DSPContext
;
void
dsputil_static_init
(
void
);
void
dsputil_init
(
DSPContext
*
p
,
AVCodecContext
*
avctx
);
void
dsputil_init
(
DSPContext
*
p
,
AVCodecContext
*
avctx
);
/**
/**
...
...
libavcodec/utils.c
View file @
59cf08ce
...
@@ -555,7 +555,7 @@ void avcodec_init(void)
...
@@ -555,7 +555,7 @@ void avcodec_init(void)
return
;
return
;
inited
=
1
;
inited
=
1
;
//dsputil
_init();
dsputil_static
_init
();
}
}
/* this can be called after seeking and before trying to decode the next keyframe */
/* this can be called after seeking and before trying to decode the next keyframe */
...
...
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