Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
dcb7c868
Commit
dcb7c868
authored
Aug 27, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics: Make naming scheme of Xvid IDCT consistent with other IDCTs
parent
1f156af4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
56 additions
and
52 deletions
+56
-52
mpeg4videodec.c
libavcodec/mpeg4videodec.c
+2
-2
Makefile
libavcodec/x86/Makefile
+2
-2
dct-test.c
libavcodec/x86/dct-test.c
+4
-4
xvididct.h
libavcodec/x86/xvididct.h
+12
-12
xvididct_init.c
libavcodec/x86/xvididct_init.c
+12
-11
xvididct_mmx.c
libavcodec/x86/xvididct_mmx.c
+13
-11
xvididct_sse2.c
libavcodec/x86/xvididct_sse2.c
+7
-6
xvididct.c
libavcodec/xvididct.c
+2
-2
xvididct.h
libavcodec/xvididct.h
+2
-2
No files found.
libavcodec/mpeg4videodec.c
View file @
dcb7c868
...
...
@@ -2068,7 +2068,7 @@ static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb)
}
if
(
CONFIG_MPEG4_DECODER
&&
ctx
->
xvid_build
>=
0
)
ff_xvididct_init
(
&
s
->
idsp
,
s
->
avctx
);
ff_xvid
_
idct_init
(
&
s
->
idsp
,
s
->
avctx
);
return
0
;
}
...
...
@@ -2547,7 +2547,7 @@ static int mpeg4_update_thread_context(AVCodecContext *dst,
return
ret
;
if
(
CONFIG_MPEG4_DECODER
&&
!
init
&&
s1
->
xvid_build
>=
0
)
ff_xvididct_init
(
&
s
->
m
.
idsp
,
dst
);
ff_xvid
_
idct_init
(
&
s
->
m
.
idsp
,
dst
);
s
->
shape
=
s1
->
shape
;
s
->
time_increment_bits
=
s1
->
time_increment_bits
;
...
...
libavcodec/x86/Makefile
View file @
dcb7c868
...
...
@@ -66,8 +66,8 @@ MMX-OBJS-$(CONFIG_IDCTDSP) += x86/idctdsp_mmx.o \
MMX-OBJS-$(CONFIG_QPELDSP)
+=
x86/fpel_mmx.o
# decoders/encoders
MMX-OBJS-$(CONFIG_MPEG4_DECODER)
+=
x86/
idct_mmx_xvid.o
\
x86/
idct_sse2_xvid
.o
MMX-OBJS-$(CONFIG_MPEG4_DECODER)
+=
x86/
xvididct_mmx.o
\
x86/
xvididct_sse2
.o
MMX-OBJS-$(CONFIG_VC1_DECODER)
+=
x86/vc1dsp_mmx.o
...
...
libavcodec/x86/dct-test.c
View file @
dcb7c868
...
...
@@ -19,7 +19,7 @@
#include "config.h"
#include "fdct.h"
#include "
idct_xvid
.h"
#include "
xvididct
.h"
#include "simple_idct.h"
static
const
struct
algo
fdct_tab_arch
[]
=
{
...
...
@@ -41,13 +41,13 @@ static const struct algo idct_tab_arch[] = {
#endif
#if CONFIG_MPEG4_DECODER
#if HAVE_MMX_INLINE
{
"XVID-MMX"
,
ff_
idct_xvid
_mmx
,
FF_IDCT_PERM_NONE
,
AV_CPU_FLAG_MMX
,
1
},
{
"XVID-MMX"
,
ff_
xvid_idct
_mmx
,
FF_IDCT_PERM_NONE
,
AV_CPU_FLAG_MMX
,
1
},
#endif
#if HAVE_MMXEXT_INLINE
{
"XVID-MMXEXT"
,
ff_
idct_xvid
_mmxext
,
FF_IDCT_PERM_NONE
,
AV_CPU_FLAG_MMXEXT
,
1
},
{
"XVID-MMXEXT"
,
ff_
xvid_idct
_mmxext
,
FF_IDCT_PERM_NONE
,
AV_CPU_FLAG_MMXEXT
,
1
},
#endif
#if HAVE_SSE2_INLINE
{
"XVID-SSE2"
,
ff_
idct_xvid
_sse2
,
FF_IDCT_PERM_SSE2
,
AV_CPU_FLAG_SSE2
,
1
},
{
"XVID-SSE2"
,
ff_
xvid_idct
_sse2
,
FF_IDCT_PERM_SSE2
,
AV_CPU_FLAG_SSE2
,
1
},
#endif
#endif
/* CONFIG_MPEG4_DECODER */
{
0
}
...
...
libavcodec/x86/
idct_xvid
.h
→
libavcodec/x86/
xvididct
.h
View file @
dcb7c868
...
...
@@ -23,21 +23,21 @@
* header for Xvid IDCT functions
*/
#ifndef AVCODEC_X86_
IDCT_XVID
_H
#define AVCODEC_X86_
IDCT_XVID
_H
#ifndef AVCODEC_X86_
XVIDIDCT
_H
#define AVCODEC_X86_
XVIDIDCT
_H
#include <stdint.h>
void
ff_
idct_xvid
_mmx
(
short
*
block
);
void
ff_
idct_xvid
_mmx_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_
idct_xvid
_mmx_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_
xvid_idct
_mmx
(
short
*
block
);
void
ff_
xvid_idct
_mmx_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_
xvid_idct
_mmx_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_
idct_xvid
_mmxext
(
short
*
block
);
void
ff_
idct_xvid
_mmxext_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_
idct_xvid
_mmxext_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_
xvid_idct
_mmxext
(
short
*
block
);
void
ff_
xvid_idct
_mmxext_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_
xvid_idct
_mmxext_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_
idct_xvid
_sse2
(
short
*
block
);
void
ff_
idct_xvid
_sse2_put
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
);
void
ff_
idct_xvid
_sse2_add
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
);
void
ff_
xvid_idct
_sse2
(
short
*
block
);
void
ff_
xvid_idct
_sse2_put
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
);
void
ff_
xvid_idct
_sse2_add
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
);
#endif
/* AVCODEC_X86_
IDCT_XVID
_H */
#endif
/* AVCODEC_X86_
XVIDIDCT
_H */
libavcodec/x86/xvididct_init.c
View file @
dcb7c868
...
...
@@ -22,31 +22,32 @@
#include "libavutil/x86/cpu.h"
#include "libavcodec/idctdsp.h"
#include "libavcodec/xvididct.h"
#include "idct_xvid.h"
#include "idctdsp.h"
#include "xvididct.h"
av_cold
void
ff_xvididct_init_x86
(
IDCTDSPContext
*
c
)
av_cold
void
ff_xvid
_
idct_init_x86
(
IDCTDSPContext
*
c
)
{
int
cpu_flags
=
av_get_cpu_flags
();
if
(
INLINE_MMX
(
cpu_flags
))
{
c
->
idct_put
=
ff_
idct_xvid
_mmx_put
;
c
->
idct_add
=
ff_
idct_xvid
_mmx_add
;
c
->
idct
=
ff_
idct_xvid
_mmx
;
c
->
idct_put
=
ff_
xvid_idct
_mmx_put
;
c
->
idct_add
=
ff_
xvid_idct
_mmx_add
;
c
->
idct
=
ff_
xvid_idct
_mmx
;
c
->
perm_type
=
FF_IDCT_PERM_NONE
;
}
if
(
INLINE_MMXEXT
(
cpu_flags
))
{
c
->
idct_put
=
ff_
idct_xvid
_mmxext_put
;
c
->
idct_add
=
ff_
idct_xvid
_mmxext_add
;
c
->
idct
=
ff_
idct_xvid
_mmxext
;
c
->
idct_put
=
ff_
xvid_idct
_mmxext_put
;
c
->
idct_add
=
ff_
xvid_idct
_mmxext_add
;
c
->
idct
=
ff_
xvid_idct
_mmxext
;
c
->
perm_type
=
FF_IDCT_PERM_NONE
;
}
if
(
INLINE_SSE2
(
cpu_flags
))
{
c
->
idct_put
=
ff_
idct_xvid
_sse2_put
;
c
->
idct_add
=
ff_
idct_xvid
_sse2_add
;
c
->
idct
=
ff_
idct_xvid
_sse2
;
c
->
idct_put
=
ff_
xvid_idct
_sse2_put
;
c
->
idct_add
=
ff_
xvid_idct
_sse2_add
;
c
->
idct
=
ff_
xvid_idct
_sse2
;
c
->
perm_type
=
FF_IDCT_PERM_SSE2
;
}
}
libavcodec/x86/
idct_mmx_xvid
.c
→
libavcodec/x86/
xvididct_mmx
.c
View file @
dcb7c868
...
...
@@ -44,8 +44,9 @@
#include "config.h"
#include "libavcodec/avcodec.h"
#include "libavutil/mem.h"
#include "idct_xvid.h"
#include "idctdsp.h"
#include "xvididct.h"
#if HAVE_MMX_INLINE
...
...
@@ -472,7 +473,8 @@ DECLARE_ALIGNED(8, static const int16_t, tab_i_04_xmm)[32*4] = {
//-----------------------------------------------------------------------------
void
ff_idct_xvid_mmx
(
short
*
block
){
void
ff_xvid_idct_mmx
(
short
*
block
)
{
__asm__
volatile
(
//# Process each row
DCT_8_INV_ROW_MMX
(
0
*
16
(
%
0
),
0
*
16
(
%
0
),
64
*
0
(
%
2
),
8
*
0
(
%
1
))
...
...
@@ -490,15 +492,15 @@ __asm__ volatile(
::
"r"
(
block
),
"r"
(
rounder_0
),
"r"
(
tab_i_04_mmx
),
"r"
(
tg_1_16
));
}
void
ff_
idct_xvid
_mmx_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
void
ff_
xvid_idct
_mmx_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
{
ff_
idct_xvid
_mmx
(
block
);
ff_
xvid_idct
_mmx
(
block
);
ff_put_pixels_clamped_mmx
(
block
,
dest
,
line_size
);
}
void
ff_
idct_xvid
_mmx_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
void
ff_
xvid_idct
_mmx_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
{
ff_
idct_xvid
_mmx
(
block
);
ff_
xvid_idct
_mmx
(
block
);
ff_add_pixels_clamped_mmx
(
block
,
dest
,
line_size
);
}
...
...
@@ -511,7 +513,7 @@ void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block)
//-----------------------------------------------------------------------------
void
ff_
idct_xvid
_mmxext
(
short
*
block
)
void
ff_
xvid_idct
_mmxext
(
short
*
block
)
{
__asm__
volatile
(
//# Process each row
...
...
@@ -530,15 +532,15 @@ __asm__ volatile(
::
"r"
(
block
),
"r"
(
rounder_0
),
"r"
(
tab_i_04_xmm
),
"r"
(
tg_1_16
));
}
void
ff_
idct_xvid
_mmxext_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
void
ff_
xvid_idct
_mmxext_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
{
ff_
idct_xvid
_mmxext
(
block
);
ff_
xvid_idct
_mmxext
(
block
);
ff_put_pixels_clamped_mmx
(
block
,
dest
,
line_size
);
}
void
ff_
idct_xvid
_mmxext_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
void
ff_
xvid_idct
_mmxext_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
{
ff_
idct_xvid
_mmxext
(
block
);
ff_
xvid_idct
_mmxext
(
block
);
ff_add_pixels_clamped_mmx
(
block
,
dest
,
line_size
);
}
...
...
libavcodec/x86/
idct_sse2_xvid
.c
→
libavcodec/x86/
xvididct_sse2
.c
View file @
dcb7c868
...
...
@@ -41,8 +41,9 @@
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/x86/asm.h"
#include "idct_xvid.h"
#include "idctdsp.h"
#include "xvididct.h"
#if HAVE_SSE2_INLINE
...
...
@@ -341,7 +342,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = {
"movdqa %%xmm6, 4*16("dct") \n\t" \
"movdqa "SREG2", 7*16("dct") \n\t"
inline
void
ff_
idct_xvid
_sse2
(
short
*
block
)
inline
void
ff_
xvid_idct
_sse2
(
short
*
block
)
{
__asm__
volatile
(
"movq "
MANGLE
(
m127
)
", %%mm0
\n\t
"
...
...
@@ -390,15 +391,15 @@ inline void ff_idct_xvid_sse2(short *block)
);
}
void
ff_
idct_xvid
_sse2_put
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
)
void
ff_
xvid_idct
_sse2_put
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
)
{
ff_
idct_xvid
_sse2
(
block
);
ff_
xvid_idct
_sse2
(
block
);
ff_put_pixels_clamped_mmx
(
block
,
dest
,
line_size
);
}
void
ff_
idct_xvid
_sse2_add
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
)
void
ff_
xvid_idct
_sse2_add
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
)
{
ff_
idct_xvid
_sse2
(
block
);
ff_
xvid_idct
_sse2
(
block
);
ff_add_pixels_clamped_mmx
(
block
,
dest
,
line_size
);
}
...
...
libavcodec/xvididct.c
View file @
dcb7c868
...
...
@@ -22,7 +22,7 @@
#include "idctdsp.h"
#include "xvididct.h"
av_cold
void
ff_xvididct_init
(
IDCTDSPContext
*
c
,
AVCodecContext
*
avctx
)
av_cold
void
ff_xvid
_
idct_init
(
IDCTDSPContext
*
c
,
AVCodecContext
*
avctx
)
{
const
unsigned
high_bit_depth
=
avctx
->
bits_per_raw_sample
>
8
;
...
...
@@ -32,7 +32,7 @@ av_cold void ff_xvididct_init(IDCTDSPContext *c, AVCodecContext *avctx)
return
;
if
(
ARCH_X86
)
ff_xvididct_init_x86
(
c
);
ff_xvid
_
idct_init_x86
(
c
);
ff_init_scantable_permutation
(
c
->
idct_permutation
,
c
->
perm_type
);
}
libavcodec/xvididct.h
View file @
dcb7c868
...
...
@@ -22,8 +22,8 @@
#include "avcodec.h"
#include "idctdsp.h"
void
ff_xvididct_init
(
IDCTDSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_xvid
_
idct_init
(
IDCTDSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_xvididct_init_x86
(
IDCTDSPContext
*
c
);
void
ff_xvid
_
idct_init_x86
(
IDCTDSPContext
*
c
);
#endif
/* AVCODEC_XVIDIDCT_H */
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