Mercurial > mplayer.hg
changeset 13496:0bdcb3eea569
better default parameter,added counterpart option, better names for few options, 3-pass support and improved documentation.
patch by Loren Merritt
author | iive |
---|---|
date | Mon, 27 Sep 2004 21:04:42 +0000 |
parents | 2074e959b32c |
children | 927825240d42 |
files | DOCS/man/en/mplayer.1 libmpcodecs/ve_x264.c |
diffstat | 2 files changed, 58 insertions(+), 50 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1 Mon Sep 27 20:34:35 2004 +0000 +++ b/DOCS/man/en/mplayer.1 Mon Sep 27 21:04:42 2004 +0000 @@ -6770,10 +6770,20 @@ This is required if you want a CBR (constant bitrate) encode. . .TP -.B iframe=<value> +.B keyint=<value> Sets maximum interval between I frames. Larger values save bits, thus improve quality, at the cost of seeking -precision (default: 60). +precision (default: 250). +. +.TP +.B idrint=<value> +Each <value> I-Frames are IDR-Frames (default: 2). +In H.264, I-Frames do not necessarily bound a closed GOP because it is +allowable for a P-frame to be predicted from more frames than just the one +frame before it (also see frameref). +Therefore, I-frames are not necessarily seekable. +IDR-Frames restrict subsequent P-frames from referring to any frame +prior to the IDR-Frame. . .TP .B frameref=<1\-15> @@ -6783,21 +6793,11 @@ Some decoders are unable to deal with large frameref values. . .TP -.B idrframe=<value> -Each <value> I-Frames are IDR-Frames (default: 2). -In H.264, I-Frames do not necessarily bound a closed GOP because it is -allowable for a P-frame to be predicted from more frames than just the one -frame before it (also see frameref). -Therefore, I-frames are not necessarily seekable. -IDR-Frames restrict subsequent P-frames from referring to any frame -prior to the IDR-Frame. -. -.TP -.B bframe=<value> -number of B-Frames between I- and P-Frames (default: 0) -. -.TP -.B deblock=<0|1> +.B bframes=<0\-16> +number of consecutive B-Frames between I- and P-Frames (default: 0) +. +.TP +.B deblock | nodeblock Use deblocking filter (default: on). As it takes very little time compared to its quality gain, it's not recommend to disable it. @@ -6824,10 +6824,10 @@ Affects the maximum allowed gradient within two adjacent blocks. . .TP -.B cabac\ \ \ -Use CABAC (Context-Adaptive Binary Arithmetic Coding). -Slows down encoding but should save 10-15% of the bits. -Unless you are looking for speed, you should activate it. +.B cabac | nocabac +Use CABAC (Context-Adaptive Binary Arithmetic Coding) (default: on). +Slightly slows down encoding and decoding, but should save 10-15% bitrate. +Unless you are looking for speed, you should not disable it. . .TP .B cabacidc=<value> @@ -6847,7 +6847,7 @@ .REss . .TP -.B qp_constant=<2\-51> +.B qp_constant=<1\-51> This selects the quantizer to use. 20\-40 is a useful range (default: 26). Lower values result in better fidelity, but higher bitrates. @@ -6858,11 +6858,11 @@ Useful quantizers in H.264 tend to be very large compared to MPEG[124]. . .TP -.B qp_min=<2\-51> (CBR only) +.B qp_min=<1\-51> (CBR or 2 pass) Minimum quantizer, 15\-35 seems to be a useful range (default: 10). . .TP -.B qp_max=<2\-51> (CBR only) +.B qp_max=<1\-51> (CBR or 2 pass) maximum quantizer (default: 51) . .TP @@ -6912,7 +6912,7 @@ higher values force it to vary more smoothly. . .TP -.B fullinter +.B fullinter | nofullinter Use all available interframe macroblock types (i16x16, i4x4, p16x16-4x4) The idea is to find the type and size that best describe a certain area of the picture, i.e.\& very effective for Anime, which usually contains @@ -6921,22 +6921,6 @@ it with care. . .TP -.B log=<-1\-3> -Adjust the amount of logging info printed to the screen. -.RSs --1: none -.br - 0: Print errors only. -.br - 1: warnings -.br - 2: PSNR, encoding times, and other analysis stats when the encode finishes -(default) -.br - 3: PSNR, QP, frametype, size, and other stats for every frame -.REss -. -.TP .B subq=<0\-5> Adjust subpel refinement quality. This parameter controls quality versus speed tradeoffs involved in the motion @@ -6957,8 +6941,24 @@ .REss . .TP -.B psnr\ \ \ -Print signal-to-noise ratio statistics. +.B log=<-1\-3> +Adjust the amount of logging info printed to the screen. +.RSs +-1: none +.br + 0: Print errors only. +.br + 1: warnings +.br + 2: PSNR, encoding times, and other analysis stats when the encode finishes +(default) +.br + 3: PSNR, QP, frametype, size, and other stats for every frame +.REss +. +.TP +.B psnr | nopsnr +Print signal-to-noise ratio statistics (default: off). . . .\" --------------------------------------------------------------------------
--- a/libmpcodecs/ve_x264.c Mon Sep 27 20:34:35 2004 +0000 +++ b/libmpcodecs/ve_x264.c Mon Sep 27 21:04:42 2004 +0000 @@ -61,13 +61,13 @@ static int bitrate = -1; static int qp_constant = 26; static int frame_ref = 1; -static int iframe = 60; +static int iframe = 250; static int idrframe = 2; static int bframe = 0; static int deblock = 1; static int deblockalpha = 0; static int deblockbeta = 0; -static int cabac = 0; +static int cabac = 1; static int cabacidc = -1; static int fullinter = 0; static float ip_factor = 2.0; @@ -89,16 +89,19 @@ m_option_t x264encopts_conf[] = { {"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL}, {"qp_constant", &qp_constant, CONF_TYPE_INT, CONF_RANGE, 1, 51, NULL}, - {"frameref", &frame_ref, CONF_TYPE_INT, CONF_RANGE, 1, 100, NULL}, - {"iframe", &iframe, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL}, - {"idrframe", &idrframe, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL}, - {"bframe", &bframe, CONF_TYPE_INT, CONF_RANGE, 0, 10, NULL}, - {"deblock", &deblock, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL}, + {"frameref", &frame_ref, CONF_TYPE_INT, CONF_RANGE, 1, 15, NULL}, + {"keyint", &iframe, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL}, + {"idrint", &idrframe, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL}, + {"bframes", &bframe, CONF_TYPE_INT, CONF_RANGE, 0, 16, NULL}, + {"deblock", &deblock, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"nodeblock", &deblock, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"deblockalpha", &deblockalpha, CONF_TYPE_INT, CONF_RANGE, -6, 6, NULL}, {"deblockbeta", &deblockbeta, CONF_TYPE_INT, CONF_RANGE, -6, 6, NULL}, {"cabac", &cabac, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"nocabac", &cabac, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"cabacidc", &cabacidc, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL}, {"fullinter", &fullinter, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"nofullinter", &fullinter, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"ip_factor", &ip_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL}, {"pb_factor", &pb_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL}, {"rc_buffer_size", &rc_buffer_size, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL}, @@ -113,6 +116,7 @@ {"qblur", &qblur, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL}, {"subq", &subq, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL}, {"psnr", &psnr, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"nopsnr", &psnr, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"log", &log_level, CONF_TYPE_INT, CONF_RANGE, -1, 3, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -168,6 +172,10 @@ mod->param.rc.b_stat_write = 0; mod->param.rc.b_stat_read = 1; break; + case 3: + mod->param.rc.b_stat_write = 1; + mod->param.rc.b_stat_read = 1; + break; } if(bitrate > 0) { if(rc_buffer_size <= 0)