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
cb52a17c
Commit
cb52a17c
authored
Dec 29, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsputil: Move Bink-specific add_pixels8 to binkdsp
parent
054013a0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
24 deletions
+24
-24
bink.c
libavcodec/bink.c
+2
-2
binkdsp.c
libavcodec/binkdsp.c
+21
-0
binkdsp.h
libavcodec/binkdsp.h
+1
-0
dsputil.c
libavcodec/dsputil.c
+0
-21
dsputil.h
libavcodec/dsputil.h
+0
-1
No files found.
libavcodec/bink.c
View file @
cb52a17c
...
@@ -883,7 +883,7 @@ static int binkb_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
...
@@ -883,7 +883,7 @@ static int binkb_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
c
->
dsp
.
clear_block
(
block
);
c
->
dsp
.
clear_block
(
block
);
v
=
binkb_get_value
(
c
,
BINKB_SRC_INTER_COEFS
);
v
=
binkb_get_value
(
c
,
BINKB_SRC_INTER_COEFS
);
read_residue
(
gb
,
block
,
v
);
read_residue
(
gb
,
block
,
v
);
c
->
dsp
.
add_pixels8
(
dst
,
block
,
stride
);
c
->
b
dsp
.
add_pixels8
(
dst
,
block
,
stride
);
break
;
break
;
case
4
:
case
4
:
xoff
=
binkb_get_value
(
c
,
BINKB_SRC_X_OFF
);
xoff
=
binkb_get_value
(
c
,
BINKB_SRC_X_OFF
);
...
@@ -1120,7 +1120,7 @@ static int bink_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
...
@@ -1120,7 +1120,7 @@ static int bink_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
c
->
dsp
.
clear_block
(
block
);
c
->
dsp
.
clear_block
(
block
);
v
=
get_bits
(
gb
,
7
);
v
=
get_bits
(
gb
,
7
);
read_residue
(
gb
,
block
,
v
);
read_residue
(
gb
,
block
,
v
);
c
->
dsp
.
add_pixels8
(
dst
,
block
,
stride
);
c
->
b
dsp
.
add_pixels8
(
dst
,
block
,
stride
);
break
;
break
;
case
INTRA_BLOCK
:
case
INTRA_BLOCK
:
memset
(
dctblock
,
0
,
sizeof
(
*
dctblock
)
*
64
);
memset
(
dctblock
,
0
,
sizeof
(
*
dctblock
)
*
64
);
...
...
libavcodec/binkdsp.c
View file @
cb52a17c
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
* Bink DSP routines
* Bink DSP routines
*/
*/
#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/attributes.h"
#include "binkdsp.h"
#include "binkdsp.h"
...
@@ -128,9 +129,29 @@ static void scale_block_c(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align
...
@@ -128,9 +129,29 @@ static void scale_block_c(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align
}
}
}
}
static
void
add_pixels8_c
(
uint8_t
*
restrict
pixels
,
int16_t
*
block
,
int
line_size
)
{
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
pixels
[
0
]
+=
block
[
0
];
pixels
[
1
]
+=
block
[
1
];
pixels
[
2
]
+=
block
[
2
];
pixels
[
3
]
+=
block
[
3
];
pixels
[
4
]
+=
block
[
4
];
pixels
[
5
]
+=
block
[
5
];
pixels
[
6
]
+=
block
[
6
];
pixels
[
7
]
+=
block
[
7
];
pixels
+=
line_size
;
block
+=
8
;
}
}
av_cold
void
ff_binkdsp_init
(
BinkDSPContext
*
c
)
av_cold
void
ff_binkdsp_init
(
BinkDSPContext
*
c
)
{
{
c
->
idct_add
=
bink_idct_add_c
;
c
->
idct_add
=
bink_idct_add_c
;
c
->
idct_put
=
bink_idct_put_c
;
c
->
idct_put
=
bink_idct_put_c
;
c
->
scale_block
=
scale_block_c
;
c
->
scale_block
=
scale_block_c
;
c
->
add_pixels8
=
add_pixels8_c
;
}
}
libavcodec/binkdsp.h
View file @
cb52a17c
...
@@ -33,6 +33,7 @@ typedef struct BinkDSPContext {
...
@@ -33,6 +33,7 @@ typedef struct BinkDSPContext {
void
(
*
idct_put
)(
uint8_t
*
dest
/*align 8*/
,
int
line_size
,
int32_t
*
block
/*align 16*/
);
void
(
*
idct_put
)(
uint8_t
*
dest
/*align 8*/
,
int
line_size
,
int32_t
*
block
/*align 16*/
);
void
(
*
idct_add
)(
uint8_t
*
dest
/*align 8*/
,
int
line_size
,
int32_t
*
block
/*align 16*/
);
void
(
*
idct_add
)(
uint8_t
*
dest
/*align 8*/
,
int
line_size
,
int32_t
*
block
/*align 16*/
);
void
(
*
scale_block
)(
const
uint8_t
src
[
64
]
/*align 8*/
,
uint8_t
*
dst
/*align 8*/
,
int
linesize
);
void
(
*
scale_block
)(
const
uint8_t
src
[
64
]
/*align 8*/
,
uint8_t
*
dst
/*align 8*/
,
int
linesize
);
void
(
*
add_pixels8
)(
uint8_t
*
pixels
,
int16_t
*
block
,
int
line_size
);
}
BinkDSPContext
;
}
BinkDSPContext
;
void
ff_binkdsp_init
(
BinkDSPContext
*
c
);
void
ff_binkdsp_init
(
BinkDSPContext
*
c
);
...
...
libavcodec/dsputil.c
View file @
cb52a17c
...
@@ -347,25 +347,6 @@ static void put_signed_pixels_clamped_c(const int16_t *block,
...
@@ -347,25 +347,6 @@ static void put_signed_pixels_clamped_c(const int16_t *block,
}
}
}
}
static
void
add_pixels8_c
(
uint8_t
*
restrict
pixels
,
int16_t
*
block
,
int
line_size
)
{
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
pixels
[
0
]
+=
block
[
0
];
pixels
[
1
]
+=
block
[
1
];
pixels
[
2
]
+=
block
[
2
];
pixels
[
3
]
+=
block
[
3
];
pixels
[
4
]
+=
block
[
4
];
pixels
[
5
]
+=
block
[
5
];
pixels
[
6
]
+=
block
[
6
];
pixels
[
7
]
+=
block
[
7
];
pixels
+=
line_size
;
block
+=
8
;
}
}
static
void
add_pixels_clamped_c
(
const
int16_t
*
block
,
uint8_t
*
restrict
pixels
,
static
void
add_pixels_clamped_c
(
const
int16_t
*
block
,
uint8_t
*
restrict
pixels
,
int
line_size
)
int
line_size
)
{
{
...
@@ -2290,8 +2271,6 @@ av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx)
...
@@ -2290,8 +2271,6 @@ av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx)
c
->
shrink
[
2
]
=
ff_shrink44
;
c
->
shrink
[
2
]
=
ff_shrink44
;
c
->
shrink
[
3
]
=
ff_shrink88
;
c
->
shrink
[
3
]
=
ff_shrink88
;
c
->
add_pixels8
=
add_pixels8_c
;
c
->
draw_edges
=
draw_edges_8_c
;
c
->
draw_edges
=
draw_edges_8_c
;
c
->
clear_block
=
clear_block_8_c
;
c
->
clear_block
=
clear_block_8_c
;
...
...
libavcodec/dsputil.h
View file @
cb52a17c
...
@@ -136,7 +136,6 @@ typedef struct DSPContext {
...
@@ -136,7 +136,6 @@ typedef struct DSPContext {
void
(
*
add_pixels_clamped
)(
const
int16_t
*
block
/* align 16 */
,
void
(
*
add_pixels_clamped
)(
const
int16_t
*
block
/* align 16 */
,
uint8_t
*
pixels
/* align 8 */
,
uint8_t
*
pixels
/* align 8 */
,
int
line_size
);
int
line_size
);
void
(
*
add_pixels8
)(
uint8_t
*
pixels
,
int16_t
*
block
,
int
line_size
);
int
(
*
sum_abs_dctelem
)(
int16_t
*
block
/* align 16 */
);
int
(
*
sum_abs_dctelem
)(
int16_t
*
block
/* align 16 */
);
/**
/**
* translational global motion compensation.
* translational global motion compensation.
...
...
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