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
043bcdcd
Commit
043bcdcd
authored
Jun 13, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/svq1enc: fix encoding of small widths
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1df441ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
svq1enc.c
libavcodec/svq1enc.c
+4
-4
No files found.
libavcodec/svq1enc.c
View file @
043bcdcd
...
...
@@ -252,7 +252,7 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane,
int
block_width
,
block_height
;
int
level
;
int
threshold
[
6
];
uint8_t
*
src
=
s
->
scratchbuf
+
stride
*
16
;
uint8_t
*
src
=
s
->
scratchbuf
+
stride
*
32
;
const
int
lambda
=
(
f
->
quality
*
f
->
quality
)
>>
(
2
*
FF_LAMBDA_SHIFT
);
...
...
@@ -427,12 +427,12 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane,
dxy
=
(
mx
&
1
)
+
2
*
(
my
&
1
);
s
->
hdsp
.
put_pixels_tab
[
0
][
dxy
](
temp
+
16
,
s
->
hdsp
.
put_pixels_tab
[
0
][
dxy
](
temp
+
16
*
stride
,
ref
+
(
mx
>>
1
)
+
stride
*
(
my
>>
1
),
stride
,
16
);
score
[
1
]
+=
encode_block
(
s
,
src
+
16
*
x
,
temp
+
16
,
score
[
1
]
+=
encode_block
(
s
,
src
+
16
*
x
,
temp
+
16
*
stride
,
decoded
,
stride
,
5
,
64
,
lambda
,
0
);
best
=
score
[
1
]
<=
score
[
0
];
...
...
@@ -586,7 +586,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
(
ret
=
ff_get_buffer
(
avctx
,
s
->
last_picture
,
0
))
<
0
)
{
return
ret
;
}
s
->
scratchbuf
=
av_malloc
(
s
->
current_picture
->
linesize
[
0
]
*
16
*
2
);
s
->
scratchbuf
=
av_malloc
(
s
->
current_picture
->
linesize
[
0
]
*
16
*
3
);
}
FFSWAP
(
AVFrame
*
,
s
->
current_picture
,
s
->
last_picture
);
...
...
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