mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
regression test for ratecontrol & adv mpeg4 stuff
Originally committed as revision 962 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
084c726ba3
commit
1dbb6d9026
17
ffmpeg.c
17
ffmpeg.c
@ -117,6 +117,8 @@ static int do_deinterlace = 0;
|
||||
static int workaround_bugs = 0;
|
||||
static int error_resilience = 0;
|
||||
static int dct_algo = 0;
|
||||
static int use_part = 0;
|
||||
static int packet_size = 0;
|
||||
|
||||
static int gop_size = 12;
|
||||
static int intra_only = 0;
|
||||
@ -1570,6 +1572,11 @@ void opt_i_qoffset(const char *arg)
|
||||
video_i_qoffset = atof(arg);
|
||||
}
|
||||
|
||||
void opt_packet_size(const char *arg)
|
||||
{
|
||||
packet_size= atoi(arg);
|
||||
}
|
||||
|
||||
void opt_audio_bitrate(const char *arg)
|
||||
{
|
||||
audio_bit_rate = atoi(arg) * 1000;
|
||||
@ -1886,6 +1893,10 @@ void opt_output_file(const char *filename)
|
||||
video_enc->flags |= CODEC_FLAG_4MV;
|
||||
}
|
||||
|
||||
if(use_part)
|
||||
video_enc->flags |= CODEC_FLAG_PART;
|
||||
|
||||
|
||||
if (b_frames) {
|
||||
if (codec_id != CODEC_ID_MPEG4) {
|
||||
fprintf(stderr, "\nB frames encoding only supported by MPEG-4.\n");
|
||||
@ -1911,6 +1922,10 @@ void opt_output_file(const char *filename)
|
||||
video_enc->i_quant_offset = video_i_qoffset;
|
||||
video_enc->b_quant_offset = video_b_qoffset;
|
||||
video_enc->dct_algo = dct_algo;
|
||||
if(packet_size){
|
||||
video_enc->rtp_mode= 1;
|
||||
video_enc->rtp_payload_size= packet_size;
|
||||
}
|
||||
|
||||
if (do_psnr)
|
||||
video_enc->get_psnr = 1;
|
||||
@ -2276,7 +2291,9 @@ const OptionDef options[] = {
|
||||
{ "bf", HAS_ARG | OPT_EXPERT, {(void*)opt_b_frames}, "use 'frames' B frames (only MPEG-4)", "frames" },
|
||||
{ "hq", OPT_BOOL | OPT_EXPERT, {(void*)&use_hq}, "activate high quality settings" },
|
||||
{ "4mv", OPT_BOOL | OPT_EXPERT, {(void*)&use_4mv}, "use four motion vector by macroblock (only MPEG-4)" },
|
||||
{ "part", OPT_BOOL | OPT_EXPERT, {(void*)&use_part}, "use data partitioning (only MPEG-4)" },
|
||||
{ "bug", HAS_ARG | OPT_EXPERT, {(void*)opt_workaround_bugs}, "workaround not auto detected encoder bugs", "param" },
|
||||
{ "ps", HAS_ARG | OPT_EXPERT, {(void*)opt_packet_size}, "packet size", "size in bits" },
|
||||
{ "sameq", OPT_BOOL, {(void*)&same_quality},
|
||||
"use same video quality as source (implies VBR)" },
|
||||
/* audio options */
|
||||
|
@ -11,6 +11,10 @@ abe11239875a32f00fa2910828bba4fb *./data/a-h263.avi
|
||||
c1f6c8ee7a24d8345deddf1a24ca3756 *./data/out.yuv
|
||||
440192aca11c310e01168ec24ea7807e *./data/a-odivx.avi
|
||||
145c98a175e760f8ba1997edf15b2964 *./data/out.yuv
|
||||
e68a6f6f8a228605cc4b131b100e06df *./data/a-mpeg4-rc.avi
|
||||
d63755afb8a7bb851d1da7a54786acbb *./data/out.yuv
|
||||
f5f44dad09c2d4d16524e539645f693c *./data/a-mpeg4-adv.avi
|
||||
d0f077a3b42367d7432b73c0ddad7438 *./data/out.yuv
|
||||
2846c8e3d97d7395eb746bfce44e0443 *./data/a-mjpeg.avi
|
||||
278033451d7a6bfeb8339abbe4228499 *./data/out.yuv
|
||||
202adaf59c09d703b55fc7dd95eace25 *./data/a-rv10.rm
|
||||
|
@ -29,6 +29,8 @@ else
|
||||
do_rv10=y
|
||||
do_mp2=y
|
||||
do_ac3=y
|
||||
do_rc=y
|
||||
do_mpeg4adv=y
|
||||
fi
|
||||
|
||||
|
||||
@ -133,6 +135,26 @@ do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
|
||||
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
|
||||
fi
|
||||
|
||||
###################################
|
||||
if [ -n "$do_rc" ] ; then
|
||||
# mpeg4 rate control
|
||||
file=${outfile}mpeg4-rc.avi
|
||||
do_ffmpeg $file -y -b 400 -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
|
||||
|
||||
# mpeg4 rate control decoding
|
||||
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
|
||||
fi
|
||||
|
||||
###################################
|
||||
if [ -n "$do_mpeg4adv" ] ; then
|
||||
# mpeg4
|
||||
file=${outfile}mpeg4-adv.avi
|
||||
do_ffmpeg $file -y -qscale 9 -4mv -hq -part -ps 1000 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
|
||||
|
||||
# mpeg4 decoding
|
||||
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
|
||||
fi
|
||||
|
||||
###################################
|
||||
if [ -n "$do_mjpeg" ] ; then
|
||||
# mjpeg
|
||||
|
Loading…
Reference in New Issue
Block a user