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
60ab6e24
Commit
60ab6e24
authored
Jun 11, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mpegvideo_enc: fix padding for odd dimensions and interlaced video
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c69defd4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
18 deletions
+23
-18
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+7
-2
vsynth3-mpeg2-422
tests/ref/vsynth/vsynth3-mpeg2-422
+4
-4
vsynth3-mpeg2-ilace
tests/ref/vsynth/vsynth3-mpeg2-ilace
+4
-4
vsynth3-mpeg2-thread
tests/ref/vsynth/vsynth3-mpeg2-thread
+4
-4
vsynth3-mpeg2-thread-ivlc
tests/ref/vsynth/vsynth3-mpeg2-thread-ivlc
+4
-4
No files found.
libavcodec/mpegvideo_enc.c
View file @
60ab6e24
...
...
@@ -1120,6 +1120,11 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
int
h
=
s
->
height
>>
v_shift
;
uint8_t
*
src
=
pic_arg
->
data
[
i
];
uint8_t
*
dst
=
pic
->
f
->
data
[
i
];
int
vpad
=
16
;
if
(
s
->
codec_id
==
AV_CODEC_ID_MPEG2VIDEO
&&
!
s
->
progressive_sequence
)
vpad
=
32
;
if
(
!
s
->
avctx
->
rc_buffer_size
)
dst
+=
INPLACE_OFFSET
;
...
...
@@ -1135,11 +1140,11 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
src
+=
src_stride
;
}
}
if
((
s
->
width
&
15
)
||
(
s
->
height
&
15
))
{
if
((
s
->
width
&
15
)
||
(
s
->
height
&
(
vpad
-
1
)
))
{
s
->
dsp
.
draw_edges
(
dst
,
dst_stride
,
w
,
h
,
16
>>
h_shift
,
16
>>
v_shift
,
vpad
>>
v_shift
,
EDGE_BOTTOM
);
}
}
...
...
tests/ref/vsynth/vsynth3-mpeg2-422
View file @
60ab6e24
6126aef5d72f25defd5ebf5154123fb2
*tests/data/fate/vsynth3-mpeg2-422.mpeg2video
68
916
tests/data/fate/vsynth3-mpeg2-422.mpeg2video
9b434cef28b4f418b20b7e3a09a7a082
*tests/data/fate/vsynth3-mpeg2-422.out.rawvideo
stddev: 4.0
1 PSNR: 36.06
MAXDIFF: 46 bytes: 86700/ 86700
4d108b861715f1fa010fd70baea91793
*tests/data/fate/vsynth3-mpeg2-422.mpeg2video
68
612
tests/data/fate/vsynth3-mpeg2-422.mpeg2video
73b16e906d07b6bbccf4b00d4a25302c
*tests/data/fate/vsynth3-mpeg2-422.out.rawvideo
stddev: 4.0
2 PSNR: 36.05
MAXDIFF: 46 bytes: 86700/ 86700
tests/ref/vsynth/vsynth3-mpeg2-ilace
View file @
60ab6e24
7aafb678757a42197e2da7061262b588
*tests/data/fate/vsynth3-mpeg2-ilace.mpeg2video
35
29
3 tests/data/fate/vsynth3-mpeg2-ilace.mpeg2video
3f9fa819daa94fd137db0e20325e9566
*tests/data/fate/vsynth3-mpeg2-ilace.out.rawvideo
stddev: 9.
09 PSNR: 28.95 MAXDIFF: 68
bytes: 86700/ 86700
c13776ac25a9a9553847abddabd41915
*tests/data/fate/vsynth3-mpeg2-ilace.mpeg2video
35
77
3 tests/data/fate/vsynth3-mpeg2-ilace.mpeg2video
78861ce7b0d433205e45960e1fadd911
*tests/data/fate/vsynth3-mpeg2-ilace.out.rawvideo
stddev: 9.
10 PSNR: 28.95 MAXDIFF: 62
bytes: 86700/ 86700
tests/ref/vsynth/vsynth3-mpeg2-thread
View file @
60ab6e24
45e63e4c71fd113fd70bb5e3d70e345f
*tests/data/fate/vsynth3-mpeg2-thread.mpeg2video
40
669
tests/data/fate/vsynth3-mpeg2-thread.mpeg2video
556b5626c8740332309c45f3371dcf82
*tests/data/fate/vsynth3-mpeg2-thread.out.rawvideo
stddev: 8.
82 PSNR: 29.22
MAXDIFF: 64 bytes: 86700/ 86700
adceaea1136d072c629d8be517f8d96d
*tests/data/fate/vsynth3-mpeg2-thread.mpeg2video
40
356
tests/data/fate/vsynth3-mpeg2-thread.mpeg2video
917f425ebc14d29783d184d90f493e86
*tests/data/fate/vsynth3-mpeg2-thread.out.rawvideo
stddev: 8.
93 PSNR: 29.11
MAXDIFF: 64 bytes: 86700/ 86700
tests/ref/vsynth/vsynth3-mpeg2-thread-ivlc
View file @
60ab6e24
652f090a82ee947ac48fcba27a29984f
*tests/data/fate/vsynth3-mpeg2-thread-ivlc.mpeg2video
40
433
tests/data/fate/vsynth3-mpeg2-thread-ivlc.mpeg2video
556b5626c8740332309c45f3371dcf82
*tests/data/fate/vsynth3-mpeg2-thread-ivlc.out.rawvideo
stddev: 8.
82 PSNR: 29.22
MAXDIFF: 64 bytes: 86700/ 86700
221231dae1cd87b8c51a8f4772be6632
*tests/data/fate/vsynth3-mpeg2-thread-ivlc.mpeg2video
40
091
tests/data/fate/vsynth3-mpeg2-thread-ivlc.mpeg2video
917f425ebc14d29783d184d90f493e86
*tests/data/fate/vsynth3-mpeg2-thread-ivlc.out.rawvideo
stddev: 8.
93 PSNR: 29.11
MAXDIFF: 64 bytes: 86700/ 86700
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