Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
ffmpeg
Commits
438ea561
Commit
438ea561
authored
Jan 28, 2013
by
Diego Biurrun
Committed by
Luca Barbato
Jan 28, 2013
Browse files
bfin: Separate VP3 initialization code
parent
f550583c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
13 deletions
+14
-13
libavcodec/bfin/Makefile
libavcodec/bfin/Makefile
+2
-2
libavcodec/bfin/dsputil_bfin.c
libavcodec/bfin/dsputil_bfin.c
+1
-7
libavcodec/bfin/dsputil_bfin.h
libavcodec/bfin/dsputil_bfin.h
+0
-3
libavcodec/bfin/vp3_bfin.c
libavcodec/bfin/vp3_bfin.c
+8
-1
libavcodec/vp3dsp.c
libavcodec/vp3dsp.c
+2
-0
libavcodec/vp3dsp.h
libavcodec/vp3dsp.h
+1
-0
No files found.
libavcodec/bfin/Makefile
View file @
438ea561
...
...
@@ -2,7 +2,7 @@ OBJS += bfin/dsputil_bfin.o \
bfin/fdct_bfin.o
\
bfin/idct_bfin.o
\
bfin/pixels_bfin.o
\
bfin/vp3_bfin.o
\
bfin/vp3_idct_bfin.o
\
OBJS-$(CONFIG_MPEGVIDEOENC)
+=
bfin/mpegvideo_bfin.o
OBJS-$(CONFIG_VP3DSP)
+=
bfin/vp3_bfin.o
\
bfin/vp3_idct_bfin.o
libavcodec/bfin/dsputil_bfin.c
View file @
438ea561
...
...
@@ -257,13 +257,7 @@ void ff_dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
if
(
avctx
->
dct_algo
==
FF_DCT_AUTO
)
c
->
fdct
=
ff_bfin_fdct
;
// FIXME convert to VP3DSPContext
if
(
0
)
{
// avctx->idct_algo == FF_IDCT_VP3) {
c
->
idct_permutation_type
=
FF_NO_IDCT_PERM
;
c
->
idct
=
ff_bfin_vp3_idct
;
c
->
idct_add
=
ff_bfin_vp3_idct_add
;
c
->
idct_put
=
ff_bfin_vp3_idct_put
;
}
else
if
(
avctx
->
idct_algo
==
FF_IDCT_AUTO
)
{
if
(
avctx
->
idct_algo
==
FF_IDCT_AUTO
)
{
c
->
idct_permutation_type
=
FF_NO_IDCT_PERM
;
c
->
idct
=
ff_bfin_idct
;
c
->
idct_add
=
bfin_idct_add
;
...
...
libavcodec/bfin/dsputil_bfin.h
View file @
438ea561
...
...
@@ -38,9 +38,6 @@
void
ff_bfin_idct
(
int16_t
*
block
)
attribute_l1_text
;
void
ff_bfin_fdct
(
int16_t
*
block
)
attribute_l1_text
;
void
ff_bfin_vp3_idct
(
int16_t
*
block
);
void
ff_bfin_vp3_idct_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_bfin_vp3_idct_add
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
);
void
ff_bfin_add_pixels_clamped
(
const
int16_t
*
block
,
uint8_t
*
dest
,
int
line_size
)
attribute_l1_text
;
void
ff_bfin_put_pixels_clamped
(
const
int16_t
*
block
,
uint8_t
*
dest
,
int
line_size
)
attribute_l1_text
;
void
ff_bfin_diff_pixels
(
int16_t
*
block
,
const
uint8_t
*
s1
,
const
uint8_t
*
s2
,
int
stride
)
attribute_l1_text
;
...
...
libavcodec/bfin/vp3_bfin.c
View file @
438ea561
...
...
@@ -21,8 +21,9 @@
#include <string.h>
#include "libavcodec/avcodec.h"
#include "libavcodec/dsp
util
.h"
#include "libavcodec/
vp3
dsp.h"
#include "dsputil_bfin.h"
#include "vp3_bfin.h"
/* Intra iDCT offset 128 */
void
ff_bfin_vp3_idct_put
(
uint8_t
*
dest
,
int
line_size
,
int16_t
*
block
)
...
...
@@ -47,3 +48,9 @@ void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, int16_t *block)
memset
(
block
,
0
,
128
);
}
void
ff_vp3dsp_init_bfin
(
VP3DSPContext
*
c
,
int
flags
)
{
c
->
idct_add
=
ff_bfin_vp3_idct_add
;
c
->
idct_put
=
ff_bfin_vp3_idct_put
;
}
libavcodec/vp3dsp.c
View file @
438ea561
...
...
@@ -310,6 +310,8 @@ av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags)
if
(
ARCH_ARM
)
ff_vp3dsp_init_arm
(
c
,
flags
);
if
(
ARCH_BFIN
)
ff_vp3dsp_init_bfin
(
c
,
flags
);
if
(
ARCH_PPC
)
ff_vp3dsp_init_ppc
(
c
,
flags
);
if
(
ARCH_X86
)
...
...
libavcodec/vp3dsp.h
View file @
438ea561
...
...
@@ -49,6 +49,7 @@ typedef struct VP3DSPContext {
void
ff_vp3dsp_init
(
VP3DSPContext
*
c
,
int
flags
);
void
ff_vp3dsp_init_arm
(
VP3DSPContext
*
c
,
int
flags
);
void
ff_vp3dsp_init_bfin
(
VP3DSPContext
*
c
,
int
flags
);
void
ff_vp3dsp_init_ppc
(
VP3DSPContext
*
c
,
int
flags
);
void
ff_vp3dsp_init_x86
(
VP3DSPContext
*
c
,
int
flags
);
...
...
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