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
e2cbf24f
Commit
e2cbf24f
authored
Mar 04, 2019
by
James Darnley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/v210dec: move DSP function setting into dedicated function
Prepare for checkasm test.
parent
e427ba5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
v210dec.c
libavcodec/v210dec.c
+10
-6
v210dec.h
libavcodec/v210dec.h
+1
-0
No files found.
libavcodec/v210dec.c
View file @
e2cbf24f
...
...
@@ -50,6 +50,13 @@ static void v210_planar_unpack_c(const uint32_t *src, uint16_t *y, uint16_t *u,
}
}
av_cold
void
ff_v210dec_init
(
V210DecContext
*
s
)
{
s
->
unpack_frame
=
v210_planar_unpack_c
;
if
(
ARCH_X86
)
ff_v210_x86_init
(
s
);
}
static
av_cold
int
decode_init
(
AVCodecContext
*
avctx
)
{
V210DecContext
*
s
=
avctx
->
priv_data
;
...
...
@@ -57,10 +64,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P10
;
avctx
->
bits_per_raw_sample
=
10
;
s
->
unpack_frame
=
v210_planar_unpack_c
;
if
(
HAVE_MMX
)
ff_v210_x86_init
(
s
);
s
->
aligned_input
=
0
;
ff_v210dec_init
(
s
);
return
0
;
}
...
...
@@ -102,8 +107,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
aligned_input
=
!
((
uintptr_t
)
psrc
&
0xf
)
&&
!
(
stride
&
0xf
);
if
(
aligned_input
!=
s
->
aligned_input
)
{
s
->
aligned_input
=
aligned_input
;
if
(
HAVE_MMX
)
ff_v210_x86_init
(
s
);
ff_v210dec_init
(
s
);
}
if
((
ret
=
ff_get_buffer
(
avctx
,
pic
,
0
))
<
0
)
...
...
libavcodec/v210dec.h
View file @
e2cbf24f
...
...
@@ -31,6 +31,7 @@ typedef struct {
void
(
*
unpack_frame
)(
const
uint32_t
*
src
,
uint16_t
*
y
,
uint16_t
*
u
,
uint16_t
*
v
,
int
width
);
}
V210DecContext
;
void
ff_v210dec_init
(
V210DecContext
*
s
);
void
ff_v210_x86_init
(
V210DecContext
*
s
);
#endif
/* AVCODEC_V210DEC_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