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
92e598a5
Commit
92e598a5
authored
Feb 27, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prores: Drop DSP infrastructure for prores encoder bits
None of the encoder bits are arch-optimized.
parent
d6acefe0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
36 deletions
+26
-36
Makefile
libavcodec/Makefile
+1
-1
proresdsp.c
libavcodec/proresdsp.c
+1
-23
proresdsp.h
libavcodec/proresdsp.h
+0
-1
proresenc.c
libavcodec/proresenc.c
+24
-11
No files found.
libavcodec/Makefile
View file @
92e598a5
...
...
@@ -291,7 +291,7 @@ OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
OBJS-$(CONFIG_PPM_DECODER)
+=
pnmdec.o
pnm.o
OBJS-$(CONFIG_PPM_ENCODER)
+=
pnmenc.o
OBJS-$(CONFIG_PRORES_DECODER)
+=
proresdec.o
proresdata.o
proresdsp.o
OBJS-$(CONFIG_PRORES_ENCODER)
+=
proresenc.o
proresdata.o
proresdsp.o
OBJS-$(CONFIG_PRORES_ENCODER)
+=
proresenc.o
proresdata.o
OBJS-$(CONFIG_PTX_DECODER)
+=
ptx.o
OBJS-$(CONFIG_QCELP_DECODER)
+=
qcelpdec.o
\
celp_filters.o
acelp_vectors.o
\
...
...
libavcodec/proresdsp.c
View file @
92e598a5
...
...
@@ -20,9 +20,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "dct.h"
#include "dsputil.h"
#include "proresdsp.h"
#include "simple_idct.h"
...
...
@@ -33,7 +33,6 @@
#define CLIP_AND_BIAS(x) (av_clip((x) + BIAS, CLIP_MIN, CLIP_MAX))
#if CONFIG_PRORES_DECODER
/**
* Add bias value, clamp and output pixels of a slice
*/
...
...
@@ -55,26 +54,9 @@ static void prores_idct_put_c(uint16_t *out, int linesize, int16_t *block, const
ff_prores_idct
(
block
,
qmat
);
put_pixels
(
out
,
linesize
>>
1
,
block
);
}
#endif
#if CONFIG_PRORES_ENCODER
static
void
prores_fdct_c
(
const
uint16_t
*
src
,
int
linesize
,
int16_t
*
block
)
{
int
x
,
y
;
const
uint16_t
*
tsrc
=
src
;
for
(
y
=
0
;
y
<
8
;
y
++
)
{
for
(
x
=
0
;
x
<
8
;
x
++
)
block
[
y
*
8
+
x
]
=
tsrc
[
x
];
tsrc
+=
linesize
>>
1
;
}
ff_jpeg_fdct_islow_10
(
block
);
}
#endif
av_cold
void
ff_proresdsp_init
(
ProresDSPContext
*
dsp
)
{
#if CONFIG_PRORES_DECODER
dsp
->
idct_put
=
prores_idct_put_c
;
dsp
->
idct_permutation_type
=
FF_NO_IDCT_PERM
;
...
...
@@ -83,8 +65,4 @@ av_cold void ff_proresdsp_init(ProresDSPContext *dsp)
ff_init_scantable_permutation
(
dsp
->
idct_permutation
,
dsp
->
idct_permutation_type
);
#endif
#if CONFIG_PRORES_ENCODER
dsp
->
fdct
=
prores_fdct_c
;
#endif
}
libavcodec/proresdsp.h
View file @
92e598a5
...
...
@@ -31,7 +31,6 @@ typedef struct ProresDSPContext {
int
idct_permutation_type
;
uint8_t
idct_permutation
[
64
];
void
(
*
idct_put
)
(
uint16_t
*
out
,
int
linesize
,
int16_t
*
block
,
const
int16_t
*
qmat
);
void
(
*
fdct
)
(
const
uint16_t
*
src
,
int
linesize
,
int16_t
*
block
);
}
ProresDSPContext
;
void
ff_proresdsp_init
(
ProresDSPContext
*
dsp
);
...
...
libavcodec/proresenc.c
View file @
92e598a5
...
...
@@ -23,11 +23,11 @@
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "dct.h"
#include "dsputil.h"
#include "put_bits.h"
#include "bytestream.h"
#include "internal.h"
#include "proresdsp.h"
#include "proresdata.h"
#define CFACTOR_Y422 2
...
...
@@ -192,7 +192,7 @@ typedef struct ProresContext {
const
uint8_t
*
quant_mat
;
const
uint8_t
*
scantable
;
ProresDSPContext
dsp
;
void
(
*
fdct
)
(
const
uint16_t
*
src
,
int
linesize
,
int16_t
*
block
)
;
int
mb_width
,
mb_height
;
int
mbs_per_slice
;
...
...
@@ -261,27 +261,27 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src,
mb_width
*
sizeof
(
*
emu_buf
));
}
if
(
!
is_chroma
)
{
ctx
->
dsp
.
fdct
(
esrc
,
elinesize
,
blocks
);
ctx
->
fdct
(
esrc
,
elinesize
,
blocks
);
blocks
+=
64
;
if
(
blocks_per_mb
>
2
)
{
ctx
->
dsp
.
fdct
(
esrc
+
8
,
elinesize
,
blocks
);
ctx
->
fdct
(
esrc
+
8
,
elinesize
,
blocks
);
blocks
+=
64
;
}
ctx
->
dsp
.
fdct
(
esrc
+
elinesize
*
4
,
elinesize
,
blocks
);
ctx
->
fdct
(
esrc
+
elinesize
*
4
,
elinesize
,
blocks
);
blocks
+=
64
;
if
(
blocks_per_mb
>
2
)
{
ctx
->
dsp
.
fdct
(
esrc
+
elinesize
*
4
+
8
,
elinesize
,
blocks
);
ctx
->
fdct
(
esrc
+
elinesize
*
4
+
8
,
elinesize
,
blocks
);
blocks
+=
64
;
}
}
else
{
ctx
->
dsp
.
fdct
(
esrc
,
elinesize
,
blocks
);
ctx
->
fdct
(
esrc
,
elinesize
,
blocks
);
blocks
+=
64
;
ctx
->
dsp
.
fdct
(
esrc
+
elinesize
*
4
,
elinesize
,
blocks
);
ctx
->
fdct
(
esrc
+
elinesize
*
4
,
elinesize
,
blocks
);
blocks
+=
64
;
if
(
blocks_per_mb
>
2
)
{
ctx
->
dsp
.
fdct
(
esrc
+
8
,
elinesize
,
blocks
);
ctx
->
fdct
(
esrc
+
8
,
elinesize
,
blocks
);
blocks
+=
64
;
ctx
->
dsp
.
fdct
(
esrc
+
elinesize
*
4
+
8
,
elinesize
,
blocks
);
ctx
->
fdct
(
esrc
+
elinesize
*
4
+
8
,
elinesize
,
blocks
);
blocks
+=
64
;
}
}
...
...
@@ -1066,6 +1066,19 @@ static av_cold int encode_close(AVCodecContext *avctx)
return
0
;
}
static
void
prores_fdct
(
const
uint16_t
*
src
,
int
linesize
,
int16_t
*
block
)
{
int
x
,
y
;
const
uint16_t
*
tsrc
=
src
;
for
(
y
=
0
;
y
<
8
;
y
++
)
{
for
(
x
=
0
;
x
<
8
;
x
++
)
block
[
y
*
8
+
x
]
=
tsrc
[
x
];
tsrc
+=
linesize
>>
1
;
}
ff_jpeg_fdct_islow_10
(
block
);
}
static
av_cold
int
encode_init
(
AVCodecContext
*
avctx
)
{
ProresContext
*
ctx
=
avctx
->
priv_data
;
...
...
@@ -1079,7 +1092,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
ff_proresdsp_init
(
&
ctx
->
dsp
)
;
ctx
->
fdct
=
prores_fdct
;
ctx
->
scantable
=
interlaced
?
ff_prores_interlaced_scan
:
ff_prores_progressive_scan
;
...
...
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