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
2d6caade
Commit
2d6caade
authored
Oct 11, 2012
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsputil: split out mlp dsp function
parent
25dc79bc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
20 deletions
+9
-20
dsputil.c
libavcodec/dsputil.c
+0
-4
dsputil.h
libavcodec/dsputil.h
+0
-8
mlpdec.c
libavcodec/mlpdec.c
+3
-3
mlpdsp.c
libavcodec/mlpdsp.c
+4
-3
mlpdsp.c
libavcodec/x86/mlpdsp.c
+2
-2
No files found.
libavcodec/dsputil.c
View file @
2d6caade
...
...
@@ -2793,10 +2793,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
#undef dspfunc
#if CONFIG_MLP_DECODER || CONFIG_TRUEHD_DECODER
ff_mlp_init
(
c
,
avctx
);
#endif
c
->
put_mspel_pixels_tab
[
0
]
=
ff_put_pixels8x8_c
;
c
->
put_mspel_pixels_tab
[
1
]
=
put_mspel8_mc10_c
;
c
->
put_mspel_pixels_tab
[
2
]
=
put_mspel8_mc20_c
;
...
...
libavcodec/dsputil.h
View file @
2d6caade
...
...
@@ -479,12 +479,6 @@ typedef struct DSPContext {
void
(
*
shrink
[
4
])(
uint8_t
*
dst
,
int
dst_wrap
,
const
uint8_t
*
src
,
int
src_wrap
,
int
width
,
int
height
);
/* mlp/truehd functions */
void
(
*
mlp_filter_channel
)(
int32_t
*
state
,
const
int32_t
*
coeff
,
int
firorder
,
int
iirorder
,
unsigned
int
filter_shift
,
int32_t
mask
,
int
blocksize
,
int32_t
*
sample_buffer
);
/**
* Calculate scalar product of two vectors.
* @param len length of vectors, should be multiple of 16
...
...
@@ -612,8 +606,6 @@ void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
void
ff_dsputil_init_vis
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_dsputil_init_dwt
(
DSPContext
*
c
);
void
ff_mlp_init
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_mlp_init_x86
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
#if (ARCH_ARM && HAVE_NEON) || ARCH_PPC || HAVE_MMI || HAVE_MMX
# define STRIDE_ALIGN 16
...
...
libavcodec/mlpdec.c
View file @
2d6caade
...
...
@@ -27,12 +27,12 @@
#include <stdint.h>
#include "avcodec.h"
#include "dsputil.h"
#include "libavutil/intreadwrite.h"
#include "get_bits.h"
#include "libavutil/crc.h"
#include "parser.h"
#include "mlp_parser.h"
#include "mlpdsp.h"
#include "mlp.h"
/** number of bits used for VLC lookup - longest Huffman code is 9 */
...
...
@@ -142,7 +142,7 @@ typedef struct MLPDecodeContext {
int8_t
bypassed_lsbs
[
MAX_BLOCKSIZE
][
MAX_CHANNELS
];
int32_t
sample_buffer
[
MAX_BLOCKSIZE
][
MAX_CHANNELS
];
DSPContext
dsp
;
MLPDSPContext
dsp
;
}
MLPDecodeContext
;
static
VLC
huff_vlc
[
3
];
...
...
@@ -232,7 +232,7 @@ static av_cold int mlp_decode_init(AVCodecContext *avctx)
m
->
avctx
=
avctx
;
for
(
substr
=
0
;
substr
<
MAX_SUBSTREAMS
;
substr
++
)
m
->
substream
[
substr
].
lossless_check_data
=
0xffffffff
;
ff_
dsputil_init
(
&
m
->
dsp
,
avctx
);
ff_
mlpdsp_init
(
&
m
->
dsp
);
avcodec_get_frame_defaults
(
&
m
->
frame
);
avctx
->
coded_frame
=
&
m
->
frame
;
...
...
libavcodec/mlpdsp.c
View file @
2d6caade
...
...
@@ -19,7 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "dsputil.h"
#include "config.h"
#include "mlpdsp.h"
#include "mlp.h"
static
void
ff_mlp_filter_channel
(
int32_t
*
state
,
const
int32_t
*
coeff
,
...
...
@@ -55,9 +56,9 @@ static void ff_mlp_filter_channel(int32_t *state, const int32_t *coeff,
}
}
void
ff_mlp
_init
(
DSPContext
*
c
,
AVCodecContext
*
avctx
)
void
ff_mlp
dsp_init
(
MLPDSPContext
*
c
)
{
c
->
mlp_filter_channel
=
ff_mlp_filter_channel
;
if
(
ARCH_X86
)
ff_mlp
_init_x86
(
c
,
avctx
);
ff_mlp
dsp_init_x86
(
c
);
}
libavcodec/x86/mlpdsp.c
View file @
2d6caade
...
...
@@ -21,7 +21,7 @@
#include "libavutil/internal.h"
#include "libavutil/x86/asm.h"
#include "libavcodec/
dsputil
.h"
#include "libavcodec/
mlpdsp
.h"
#include "libavcodec/mlp.h"
#if HAVE_7REGS && HAVE_INLINE_ASM
...
...
@@ -174,7 +174,7 @@ static void mlp_filter_channel_x86(int32_t *state, const int32_t *coeff,
#endif
/* HAVE_7REGS && HAVE_INLINE_ASM */
void
ff_mlp
_init_x86
(
DSPContext
*
c
,
AVCodecContext
*
avctx
)
void
ff_mlp
dsp_init_x86
(
MLPDSPContext
*
c
)
{
#if HAVE_7REGS && HAVE_INLINE_ASM
c
->
mlp_filter_channel
=
mlp_filter_channel_x86
;
...
...
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