mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00:00
mpeg2 regression test
add mpeg2video_decoder, thats more consistant with the encoders, note, both mpeg1video and mpeg2video decoder will happily decode both mpeg1 and 2 Originally committed as revision 2166 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e4eadb4b44
commit
922bc38d55
@ -96,7 +96,8 @@ void avcodec_register_all(void)
|
||||
register_avcodec(&mpeg4aac_decoder);
|
||||
#endif
|
||||
#endif
|
||||
register_avcodec(&mpeg_decoder);
|
||||
register_avcodec(&mpeg1video_decoder);
|
||||
register_avcodec(&mpeg2video_decoder);
|
||||
#ifdef HAVE_XVMC
|
||||
register_avcodec(&mpeg_xvmc_decoder);
|
||||
#endif
|
||||
|
@ -1309,7 +1309,8 @@ extern AVCodec msmpeg4v2_decoder;
|
||||
extern AVCodec msmpeg4v3_decoder;
|
||||
extern AVCodec wmv1_decoder;
|
||||
extern AVCodec wmv2_decoder;
|
||||
extern AVCodec mpeg_decoder;
|
||||
extern AVCodec mpeg1video_decoder;
|
||||
extern AVCodec mpeg2video_decoder;
|
||||
extern AVCodec mpeg_xvmc_decoder;
|
||||
extern AVCodec h263i_decoder;
|
||||
extern AVCodec flv_decoder;
|
||||
|
@ -2496,8 +2496,8 @@ static int mpeg_decode_end(AVCodecContext *avctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
AVCodec mpeg_decoder = {
|
||||
"mpegvideo",
|
||||
AVCodec mpeg1video_decoder = {
|
||||
"mpeg1video",
|
||||
CODEC_TYPE_VIDEO,
|
||||
CODEC_ID_MPEG1VIDEO,
|
||||
sizeof(Mpeg1Context),
|
||||
@ -2509,6 +2509,19 @@ AVCodec mpeg_decoder = {
|
||||
.flush= ff_mpeg_flush,
|
||||
};
|
||||
|
||||
AVCodec mpeg2video_decoder = {
|
||||
"mpeg2video",
|
||||
CODEC_TYPE_VIDEO,
|
||||
CODEC_ID_MPEG2VIDEO,
|
||||
sizeof(Mpeg1Context),
|
||||
mpeg_decode_init,
|
||||
NULL,
|
||||
mpeg_decode_end,
|
||||
mpeg_decode_frame,
|
||||
CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED,
|
||||
.flush= ff_mpeg_flush,
|
||||
};
|
||||
|
||||
#ifdef HAVE_XVMC
|
||||
static int mpeg_mc_decode_init(AVCodecContext *avctx){
|
||||
Mpeg1Context *s;
|
||||
|
@ -2,6 +2,9 @@ ffmpeg regression test
|
||||
dda0ba041aef50a5101884291c06d4d9 *./data/a-mpeg1.mpg
|
||||
6713259d72260740bbddaea30631ea18 *./data/out.yuv
|
||||
stddev: 7.58 bytes:7299072
|
||||
17c66261cb5dc193793b5af9564c8592 *./data/a-mpeg2.vob
|
||||
9f5d85c6473b802a9d86cfc01a3ed046 *./data/out.yuv
|
||||
stddev: 7.66 bytes:7450624
|
||||
d0dc46dd831398237a690ebbeff18b64 *./data/a-msmpeg4v2.avi
|
||||
712aa6c959d1d90a78fe98657cbff19c *./data/out.yuv
|
||||
stddev: 8.11 bytes:7602176
|
||||
|
@ -32,6 +32,7 @@ elif [ "$1" = "libavtest" ] ; then
|
||||
outfile="$datadir/b-"
|
||||
else
|
||||
do_mpeg=y
|
||||
do_mpeg2=y
|
||||
do_msmpeg4v2=y
|
||||
do_msmpeg4=y
|
||||
do_wmv1=y
|
||||
@ -121,10 +122,16 @@ do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -f mpeg1video $file
|
||||
|
||||
# mpeg1 decoding
|
||||
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
|
||||
fi
|
||||
|
||||
###################################
|
||||
if [ -n "$do_mpeg2" ] ; then
|
||||
# mpeg2 encoding
|
||||
file=${outfile}mpeg2.vob
|
||||
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video $file
|
||||
|
||||
# mpeg2 decoding
|
||||
#do_ffmpeg /tmp/out-mpeg2.yuv -y -f mpegvideo -i a.vob \
|
||||
# -f rawvideo /tmp/out-mpeg2.yuv
|
||||
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
|
||||
fi
|
||||
|
||||
###################################
|
||||
|
@ -2,6 +2,9 @@ ffmpeg regression test
|
||||
1738d12380be0d8aa20d08e178349299 *./data/a-mpeg1.mpg
|
||||
0cf790edd0f4c5cf993c2d59211b9de2 *./data/out.yuv
|
||||
stddev: 4.91 bytes:7299072
|
||||
55cedcf0fb67e18718d6ed88da7784a4 *./data/a-mpeg2.vob
|
||||
f5436b327c38b66eb95f3428aff790f1 *./data/out.yuv
|
||||
stddev: 4.94 bytes:7450624
|
||||
14db391f167b52b21a983157b410affc *./data/a-msmpeg4v2.avi
|
||||
fc8881e0904af9491d5fa0163183954b *./data/out.yuv
|
||||
stddev: 5.29 bytes:7602176
|
||||
|
Loading…
Reference in New Issue
Block a user