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
1b3539d4
Commit
1b3539d4
authored
Jul 27, 2011
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsputil: move a bink-only function to binkdsp
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
cbd58a87
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
bink.c
libavcodec/bink.c
+1
-1
binkdsp.c
libavcodec/binkdsp.c
+17
-0
binkdsp.h
libavcodec/binkdsp.h
+1
-0
dsputil.c
libavcodec/dsputil.c
+0
-17
dsputil.h
libavcodec/dsputil.h
+0
-1
No files found.
libavcodec/bink.c
View file @
1b3539d4
...
@@ -1050,7 +1050,7 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
...
@@ -1050,7 +1050,7 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
return
-
1
;
return
-
1
;
}
}
if
(
blk
!=
FILL_BLOCK
)
if
(
blk
!=
FILL_BLOCK
)
c
->
dsp
.
scale_block
(
ublock
,
dst
,
stride
);
c
->
b
dsp
.
scale_block
(
ublock
,
dst
,
stride
);
bx
++
;
bx
++
;
dst
+=
8
;
dst
+=
8
;
prev
+=
8
;
prev
+=
8
;
...
...
libavcodec/binkdsp.c
View file @
1b3539d4
...
@@ -112,8 +112,25 @@ static void bink_idct_put_c(uint8_t *dest, int linesize, int32_t *block)
...
@@ -112,8 +112,25 @@ static void bink_idct_put_c(uint8_t *dest, int linesize, int32_t *block)
}
}
}
}
static
void
scale_block_c
(
const
uint8_t
src
[
64
]
/*align 8*/
,
uint8_t
*
dst
/*align 8*/
,
int
linesize
)
{
int
i
,
j
;
uint16_t
*
dst1
=
(
uint16_t
*
)
dst
;
uint16_t
*
dst2
=
(
uint16_t
*
)(
dst
+
linesize
);
for
(
j
=
0
;
j
<
8
;
j
++
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
dst1
[
i
]
=
dst2
[
i
]
=
src
[
i
]
*
0x0101
;
}
src
+=
8
;
dst1
+=
linesize
;
dst2
+=
linesize
;
}
}
void
ff_binkdsp_init
(
BinkDSPContext
*
c
)
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
;
}
}
libavcodec/binkdsp.h
View file @
1b3539d4
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
typedef
struct
BinkDSPContext
{
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
);
}
BinkDSPContext
;
}
BinkDSPContext
;
void
ff_binkdsp_init
(
BinkDSPContext
*
c
);
void
ff_binkdsp_init
(
BinkDSPContext
*
c
);
...
...
libavcodec/dsputil.c
View file @
1b3539d4
...
@@ -486,22 +486,6 @@ static void fill_block8_c(uint8_t *block, uint8_t value, int line_size, int h)
...
@@ -486,22 +486,6 @@ static void fill_block8_c(uint8_t *block, uint8_t value, int line_size, int h)
}
}
}
}
static
void
scale_block_c
(
const
uint8_t
src
[
64
]
/*align 8*/
,
uint8_t
*
dst
/*align 8*/
,
int
linesize
)
{
int
i
,
j
;
uint16_t
*
dst1
=
(
uint16_t
*
)
dst
;
uint16_t
*
dst2
=
(
uint16_t
*
)(
dst
+
linesize
);
for
(
j
=
0
;
j
<
8
;
j
++
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
dst1
[
i
]
=
dst2
[
i
]
=
src
[
i
]
*
0x0101
;
}
src
+=
8
;
dst1
+=
linesize
;
dst2
+=
linesize
;
}
}
#define avg2(a,b) ((a+b+1)>>1)
#define avg2(a,b) ((a+b+1)>>1)
#define avg4(a,b,c,d) ((a+b+c+d+2)>>2)
#define avg4(a,b,c,d) ((a+b+c+d+2)>>2)
...
@@ -2850,7 +2834,6 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
...
@@ -2850,7 +2834,6 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c
->
fill_block_tab
[
0
]
=
fill_block16_c
;
c
->
fill_block_tab
[
0
]
=
fill_block16_c
;
c
->
fill_block_tab
[
1
]
=
fill_block8_c
;
c
->
fill_block_tab
[
1
]
=
fill_block8_c
;
c
->
scale_block
=
scale_block_c
;
/* TODO [0] 16 [1] 8 */
/* TODO [0] 16 [1] 8 */
c
->
pix_abs
[
0
][
0
]
=
pix_abs16_c
;
c
->
pix_abs
[
0
][
0
]
=
pix_abs16_c
;
...
...
libavcodec/dsputil.h
View file @
1b3539d4
...
@@ -559,7 +559,6 @@ typedef struct DSPContext {
...
@@ -559,7 +559,6 @@ typedef struct DSPContext {
/* bink functions */
/* bink functions */
op_fill_func
fill_block_tab
[
2
];
op_fill_func
fill_block_tab
[
2
];
void
(
*
scale_block
)(
const
uint8_t
src
[
64
]
/*align 8*/
,
uint8_t
*
dst
/*align 8*/
,
int
linesize
);
}
DSPContext
;
}
DSPContext
;
void
dsputil_static_init
(
void
);
void
dsputil_static_init
(
void
);
...
...
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