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
a55546f4
Commit
a55546f4
authored
Feb 27, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proresenc: Reuse proper dsputil infrastructure for FDCT
parent
92e598a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
proresenc.c
libavcodec/proresenc.c
+15
-11
No files found.
libavcodec/proresenc.c
View file @
a55546f4
...
...
@@ -192,7 +192,9 @@ typedef struct ProresContext {
const
uint8_t
*
quant_mat
;
const
uint8_t
*
scantable
;
void
(
*
fdct
)
(
const
uint16_t
*
src
,
int
linesize
,
int16_t
*
block
);
void
(
*
fdct
)(
DSPContext
*
dsp
,
const
uint16_t
*
src
,
int
linesize
,
int16_t
*
block
);
DSPContext
dsp
;
int
mb_width
,
mb_height
;
int
mbs_per_slice
;
...
...
@@ -261,27 +263,27 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src,
mb_width
*
sizeof
(
*
emu_buf
));
}
if
(
!
is_chroma
)
{
ctx
->
fdct
(
esrc
,
elinesize
,
blocks
);
ctx
->
fdct
(
&
ctx
->
dsp
,
esrc
,
elinesize
,
blocks
);
blocks
+=
64
;
if
(
blocks_per_mb
>
2
)
{
ctx
->
fdct
(
esrc
+
8
,
elinesize
,
blocks
);
ctx
->
fdct
(
&
ctx
->
dsp
,
esrc
+
8
,
elinesize
,
blocks
);
blocks
+=
64
;
}
ctx
->
fdct
(
esrc
+
elinesize
*
4
,
elinesize
,
blocks
);
ctx
->
fdct
(
&
ctx
->
dsp
,
esrc
+
elinesize
*
4
,
elinesize
,
blocks
);
blocks
+=
64
;
if
(
blocks_per_mb
>
2
)
{
ctx
->
fdct
(
esrc
+
elinesize
*
4
+
8
,
elinesize
,
blocks
);
ctx
->
fdct
(
&
ctx
->
dsp
,
esrc
+
elinesize
*
4
+
8
,
elinesize
,
blocks
);
blocks
+=
64
;
}
}
else
{
ctx
->
fdct
(
esrc
,
elinesize
,
blocks
);
ctx
->
fdct
(
&
ctx
->
dsp
,
esrc
,
elinesize
,
blocks
);
blocks
+=
64
;
ctx
->
fdct
(
esrc
+
elinesize
*
4
,
elinesize
,
blocks
);
ctx
->
fdct
(
&
ctx
->
dsp
,
esrc
+
elinesize
*
4
,
elinesize
,
blocks
);
blocks
+=
64
;
if
(
blocks_per_mb
>
2
)
{
ctx
->
fdct
(
esrc
+
8
,
elinesize
,
blocks
);
ctx
->
fdct
(
&
ctx
->
dsp
,
esrc
+
8
,
elinesize
,
blocks
);
blocks
+=
64
;
ctx
->
fdct
(
esrc
+
elinesize
*
4
+
8
,
elinesize
,
blocks
);
ctx
->
fdct
(
&
ctx
->
dsp
,
esrc
+
elinesize
*
4
+
8
,
elinesize
,
blocks
);
blocks
+=
64
;
}
}
...
...
@@ -1066,7 +1068,8 @@ static av_cold int encode_close(AVCodecContext *avctx)
return
0
;
}
static
void
prores_fdct
(
const
uint16_t
*
src
,
int
linesize
,
int16_t
*
block
)
static
void
prores_fdct
(
DSPContext
*
dsp
,
const
uint16_t
*
src
,
int
linesize
,
int16_t
*
block
)
{
int
x
,
y
;
const
uint16_t
*
tsrc
=
src
;
...
...
@@ -1076,7 +1079,7 @@ static void prores_fdct(const uint16_t *src, int linesize, int16_t *block)
block
[
y
*
8
+
x
]
=
tsrc
[
x
];
tsrc
+=
linesize
>>
1
;
}
ff_jpeg_fdct_islow_10
(
block
);
dsp
->
fdct
(
block
);
}
static
av_cold
int
encode_init
(
AVCodecContext
*
avctx
)
...
...
@@ -1095,6 +1098,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
ctx
->
fdct
=
prores_fdct
;
ctx
->
scantable
=
interlaced
?
ff_prores_interlaced_scan
:
ff_prores_progressive_scan
;
ff_dsputil_init
(
&
ctx
->
dsp
,
avctx
);
mps
=
ctx
->
mbs_per_slice
;
if
(
mps
&
(
mps
-
1
))
{
...
...
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