Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
1277dc07
Commit
1277dc07
authored
12 years ago
by
Ronald S. Bultje
Committed by
Martin Storsjö
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
svq1enc: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
2f6bc5f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure
+1
-1
1 addition, 1 deletion
configure
libavcodec/svq1enc.c
+10
-6
10 additions, 6 deletions
libavcodec/svq1enc.c
with
11 additions
and
7 deletions
configure
+
1
−
1
View file @
1277dc07
...
@@ -1641,7 +1641,7 @@ shorten_decoder_select="golomb"
...
@@ -1641,7 +1641,7 @@ shorten_decoder_select="golomb"
sipr_decoder_select
=
"lsp"
sipr_decoder_select
=
"lsp"
sp5x_decoder_select
=
"dsputil"
sp5x_decoder_select
=
"dsputil"
svq1_decoder_select
=
"hpeldsp"
svq1_decoder_select
=
"hpeldsp"
svq1_encoder_select
=
"aandcttables dsputil mpegvideoenc"
svq1_encoder_select
=
"aandcttables dsputil
hpeldsp
mpegvideoenc"
svq3_decoder_select
=
"golomb h264chroma h264dsp h264pred h264qpel hpeldsp mpegvideo videodsp"
svq3_decoder_select
=
"golomb h264chroma h264dsp h264pred h264qpel hpeldsp mpegvideo videodsp"
svq3_decoder_suggest
=
"error_resilience zlib"
svq3_decoder_suggest
=
"error_resilience zlib"
tak_decoder_select
=
"dsputil"
tak_decoder_select
=
"dsputil"
...
...
This diff is collapsed.
Click to expand it.
libavcodec/svq1enc.c
+
10
−
6
View file @
1277dc07
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
*/
*/
#include
"avcodec.h"
#include
"avcodec.h"
#include
"dsputil.h"
#include
"hpeldsp.h"
#include
"mpegvideo.h"
#include
"mpegvideo.h"
#include
"h263.h"
#include
"h263.h"
#include
"internal.h"
#include
"internal.h"
...
@@ -43,6 +45,7 @@ typedef struct SVQ1Context {
...
@@ -43,6 +45,7 @@ typedef struct SVQ1Context {
MpegEncContext
m
;
MpegEncContext
m
;
AVCodecContext
*
avctx
;
AVCodecContext
*
avctx
;
DSPContext
dsp
;
DSPContext
dsp
;
HpelDSPContext
hdsp
;
AVFrame
picture
;
AVFrame
picture
;
AVFrame
current_picture
;
AVFrame
current_picture
;
AVFrame
last_picture
;
AVFrame
last_picture
;
...
@@ -444,10 +447,10 @@ static int svq1_encode_plane(SVQ1Context *s, int plane,
...
@@ -444,10 +447,10 @@ static int svq1_encode_plane(SVQ1Context *s, int plane,
dxy
=
(
mx
&
1
)
+
2
*
(
my
&
1
);
dxy
=
(
mx
&
1
)
+
2
*
(
my
&
1
);
s
->
dsp
.
put_pixels_tab
[
0
][
dxy
](
temp
+
16
,
s
->
h
dsp
.
put_pixels_tab
[
0
][
dxy
](
temp
+
16
,
ref
+
(
mx
>>
1
)
+
ref
+
(
mx
>>
1
)
+
stride
*
(
my
>>
1
),
stride
*
(
my
>>
1
),
stride
,
16
);
stride
,
16
);
score
[
1
]
+=
encode_block
(
s
,
src
+
16
*
x
,
temp
+
16
,
score
[
1
]
+=
encode_block
(
s
,
src
+
16
*
x
,
temp
+
16
,
decoded
,
stride
,
5
,
64
,
lambda
,
0
);
decoded
,
stride
,
5
,
64
,
lambda
,
0
);
...
@@ -459,7 +462,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane,
...
@@ -459,7 +462,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane,
score
[
2
]
+=
vlc
[
1
]
*
lambda
;
score
[
2
]
+=
vlc
[
1
]
*
lambda
;
if
(
score
[
2
]
<
score
[
best
]
&&
mx
==
0
&&
my
==
0
)
{
if
(
score
[
2
]
<
score
[
best
]
&&
mx
==
0
&&
my
==
0
)
{
best
=
2
;
best
=
2
;
s
->
dsp
.
put_pixels_tab
[
0
][
0
](
decoded
,
ref
,
stride
,
16
);
s
->
h
dsp
.
put_pixels_tab
[
0
][
0
](
decoded
,
ref
,
stride
,
16
);
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
6
;
i
++
)
count
[
2
][
i
]
=
0
;
count
[
2
][
i
]
=
0
;
put_bits
(
&
s
->
pb
,
vlc
[
1
],
vlc
[
0
]);
put_bits
(
&
s
->
pb
,
vlc
[
1
],
vlc
[
0
]);
...
@@ -489,7 +492,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane,
...
@@ -489,7 +492,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane,
avpriv_copy_bits
(
&
s
->
pb
,
reorder_buffer
[
best
][
i
],
avpriv_copy_bits
(
&
s
->
pb
,
reorder_buffer
[
best
][
i
],
count
[
best
][
i
]);
count
[
best
][
i
]);
if
(
best
==
0
)
if
(
best
==
0
)
s
->
dsp
.
put_pixels_tab
[
0
][
0
](
decoded
,
temp
,
stride
,
16
);
s
->
h
dsp
.
put_pixels_tab
[
0
][
0
](
decoded
,
temp
,
stride
,
16
);
}
}
s
->
m
.
first_slice_line
=
0
;
s
->
m
.
first_slice_line
=
0
;
}
}
...
@@ -501,6 +504,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx)
...
@@ -501,6 +504,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx)
SVQ1Context
*
const
s
=
avctx
->
priv_data
;
SVQ1Context
*
const
s
=
avctx
->
priv_data
;
ff_dsputil_init
(
&
s
->
dsp
,
avctx
);
ff_dsputil_init
(
&
s
->
dsp
,
avctx
);
ff_hpeldsp_init
(
&
s
->
hdsp
,
avctx
->
flags
);
avctx
->
coded_frame
=
&
s
->
picture
;
avctx
->
coded_frame
=
&
s
->
picture
;
s
->
frame_width
=
avctx
->
width
;
s
->
frame_width
=
avctx
->
width
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment