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
46523897
Commit
46523897
authored
Mar 10, 2013
by
Ronald S. Bultje
Committed by
Michael Niedermayer
Mar 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svq1: use hpeldsp instead of dsputil for half-pel functions.
This makes svq1 independent of dsputil.
parent
cc5d17e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
configure
configure
+1
-1
svq1dec.c
libavcodec/svq1dec.c
+11
-11
No files found.
configure
View file @
46523897
...
...
@@ -1804,7 +1804,7 @@ snow_encoder_select="aandcttables dsputil dwt h264qpel error_resilience mpegvide
sonic_decoder_select
=
"golomb"
sonic_encoder_select
=
"golomb"
sonic_ls_encoder_select
=
"golomb"
svq1_decoder_select
=
"
dsputil mpegvideo
"
svq1_decoder_select
=
"
hpeldsp
"
svq1_encoder_select
=
"aandcttables dsputil mpegvideoenc"
svq3_decoder_select
=
"error_resilience golomb h264chroma h264dsp h264pred h264qpel mpegvideo videodsp"
svq3_decoder_suggest
=
"zlib"
...
...
libavcodec/svq1dec.c
View file @
46523897
...
...
@@ -33,8 +33,8 @@
*/
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
#include "hpeldsp.h"
#include "internal.h"
#include "mathops.h"
#include "svq1.h"
...
...
@@ -58,7 +58,7 @@ typedef struct svq1_pmv_s {
}
svq1_pmv
;
typedef
struct
SVQ1Context
{
DSPContext
dsp
;
HpelDSPContext
h
dsp
;
GetBitContext
gb
;
AVFrame
*
prev
;
int
width
;
...
...
@@ -319,7 +319,7 @@ static void svq1_skip_block(uint8_t *current, uint8_t *previous,
}
}
static
int
svq1_motion_inter_block
(
DSPContext
*
dsp
,
GetBitContext
*
bitbuf
,
static
int
svq1_motion_inter_block
(
HpelDSPContext
*
h
dsp
,
GetBitContext
*
bitbuf
,
uint8_t
*
current
,
uint8_t
*
previous
,
int
pitch
,
svq1_pmv
*
motion
,
int
x
,
int
y
)
{
...
...
@@ -358,12 +358,12 @@ static int svq1_motion_inter_block(DSPContext *dsp, GetBitContext *bitbuf,
src
=
&
previous
[(
x
+
(
mv
.
x
>>
1
))
+
(
y
+
(
mv
.
y
>>
1
))
*
pitch
];
dst
=
current
;
dsp
->
put_pixels_tab
[
0
][(
mv
.
y
&
1
)
<<
1
|
(
mv
.
x
&
1
)](
dst
,
src
,
pitch
,
16
);
h
dsp
->
put_pixels_tab
[
0
][(
mv
.
y
&
1
)
<<
1
|
(
mv
.
x
&
1
)](
dst
,
src
,
pitch
,
16
);
return
0
;
}
static
int
svq1_motion_inter_4v_block
(
DSPContext
*
dsp
,
GetBitContext
*
bitbuf
,
static
int
svq1_motion_inter_4v_block
(
HpelDSPContext
*
h
dsp
,
GetBitContext
*
bitbuf
,
uint8_t
*
current
,
uint8_t
*
previous
,
int
pitch
,
svq1_pmv
*
motion
,
int
x
,
int
y
)
{
...
...
@@ -429,7 +429,7 @@ static int svq1_motion_inter_4v_block(DSPContext *dsp, GetBitContext *bitbuf,
src
=
&
previous
[(
x
+
(
mvx
>>
1
))
+
(
y
+
(
mvy
>>
1
))
*
pitch
];
dst
=
current
;
dsp
->
put_pixels_tab
[
1
][((
mvy
&
1
)
<<
1
)
|
(
mvx
&
1
)](
dst
,
src
,
pitch
,
8
);
h
dsp
->
put_pixels_tab
[
1
][((
mvy
&
1
)
<<
1
)
|
(
mvx
&
1
)](
dst
,
src
,
pitch
,
8
);
/* select next block */
if
(
i
&
1
)
...
...
@@ -441,7 +441,7 @@ static int svq1_motion_inter_4v_block(DSPContext *dsp, GetBitContext *bitbuf,
return
0
;
}
static
int
svq1_decode_delta_block
(
AVCodecContext
*
avctx
,
DSPContext
*
dsp
,
static
int
svq1_decode_delta_block
(
AVCodecContext
*
avctx
,
HpelDSPContext
*
h
dsp
,
GetBitContext
*
bitbuf
,
uint8_t
*
current
,
uint8_t
*
previous
,
int
pitch
,
svq1_pmv
*
motion
,
int
x
,
int
y
)
...
...
@@ -468,7 +468,7 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, DSPContext *dsp,
break
;
case
SVQ1_BLOCK_INTER
:
result
=
svq1_motion_inter_block
(
dsp
,
bitbuf
,
current
,
previous
,
result
=
svq1_motion_inter_block
(
h
dsp
,
bitbuf
,
current
,
previous
,
pitch
,
motion
,
x
,
y
);
if
(
result
!=
0
)
{
...
...
@@ -479,7 +479,7 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, DSPContext *dsp,
break
;
case
SVQ1_BLOCK_INTER_4V
:
result
=
svq1_motion_inter_4v_block
(
dsp
,
bitbuf
,
current
,
previous
,
result
=
svq1_motion_inter_4v_block
(
h
dsp
,
bitbuf
,
current
,
previous
,
pitch
,
motion
,
x
,
y
);
if
(
result
!=
0
)
{
...
...
@@ -699,7 +699,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data,
for
(
y
=
0
;
y
<
height
;
y
+=
16
)
{
for
(
x
=
0
;
x
<
width
;
x
+=
16
)
{
result
=
svq1_decode_delta_block
(
avctx
,
&
s
->
dsp
,
result
=
svq1_decode_delta_block
(
avctx
,
&
s
->
h
dsp
,
&
s
->
gb
,
&
current
[
x
],
previous
,
linesize
,
pmv
,
x
,
y
);
...
...
@@ -748,7 +748,7 @@ static av_cold int svq1_decode_init(AVCodecContext *avctx)
s
->
height
=
avctx
->
height
+
3
&
~
3
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV410P
;
ff_
dsputil_init
(
&
s
->
dsp
,
avctx
);
ff_
hpeldsp_init
(
&
s
->
hdsp
,
avctx
->
flags
);
INIT_VLC_STATIC
(
&
svq1_block_type
,
2
,
4
,
&
ff_svq1_block_type_vlc
[
0
][
1
],
2
,
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