The contents of this file were edited from the original MSSG
ditribution. The parameter file is a subset of the MSSG version
since avi2mpg1 only generates MPEG-1, and since many of the
encoding parameters can be determined from the avi file format.
The file "TEMPLATE.PAR" should be used as a template for any
changes. TEMPLATE.PAR contains the same parameters that are used
by default by avi2mpg1 if no parameter file is specified. The main
use of a parameter file will probably be to experiment with different
motion etsimation search vectors.
DO NOT ADD OR DELETE LINES FROM THE PARAMETER FILE, the input
routines depend on the exact ordering of the parameter lines!
Use the template.par provided and edit the given parameters.
The first line of the parameter file is a comment which is inserted near
the beginning of the MPEG bitstream as a user_data field, and can be
used for arbitrary purposes.
The remaining lines are described below:
/* name of intra quant matrix file ("-": default matrix) */
Setting this to a value other than - specifies a file containing
a custom intra quantization matrix to be used instead of the default
matrix specified in ISO/IEC 13818-2 and 11172-2. This file has to contain
64 integer values (range 1...255) separated by white space (blank, tab,
or newline), one corresponding to each of the 64 DCT coefficients. They
are ordered line by line, i.e. v-u frequency matrix order (not by the
zig-zag pattern used for transmission). The file intra.mat contains the
default matrix as a starting point for customization. It is neither
necessary or recommended to specify the default matrix explicitly.
Large values correspond to coarse quantization and consequently more
noise at that particular spatial frequency.
For the intra quantization matrix, the first value in the file (DC value)
is ignored. Use the parameter intra_dc_precision (see below) to define
the quantization of the DC value.
/* name of non intra quant matrix file ("-": default matrix) */
This parameter field follows the same rules as described for the above
intra quant matrix parameter, but specifies the file for the NON-INTRA
coded (predicted / interpolated) blocks. In this case the first
coefficient of the matrix is NOT ignored.
The default matrix uses a constant value of 16 for all 64 coefficients.
(a flat matrix is thought to statistically minimize mean square error).
The file inter.mat contains an alternate matrix, used in the MPEG-2 test
model.
/* timecode of first frame */
This line is used to set the timecode encoded into the first 'Group of
Pictures' header. The format is based on the SMPTE style:
hh:mm:ss:ff (hh=hour, mm=minute, ss=second, ff=frame (0..picture_rate-1)
/* N (# of frames in GOP) */
This defines the distance between I frames (and 'Group of Pictures'
headers). Common values are 15 for 30 Hz video and 12 for 25 Hz video.
/* M (I/P frame distance) */
Distance between consecutive I or P frames. Usually set to 3.
N has to be a multiple of M. M = 1 means no B frames in the sequence.
(in a future edition of this program, M=0 will mean only I frames).
/* aspect_ratio_information */
Defines the display aspect ratio. Legal values are:
Code Meaning
---- --------------
1 square pels
2 4:3 display
3 16:9 display
4 2.21:1 display
MPEG-1 uses a different coding of aspect ratios. In this cases codes
1 to 14 are valid.
/* vbv_buffer_size (in multiples 16 kbit) */
Specifies, according to the Video Buffering Verifier decoder model,
the size of the bitstream input buffer required in downstream
decoders in order for the sequence to be decoded without underflows or
or overflows. You probably will wish to leave this value at
20 for Constrained Parameters Bitstreams MPEG-1.
/* constrained_parameters_flag */
You may set this to 1 if you encode an MPEG-1
sequence which meets the parameter limits defined in ISO/IEC 11172-2
for constrained parameter bitstreams:
horizontal_size <= 768
vertical_size <= 576
picture_area <= 396 macroblocks
pixel_rate <= 396x25 macroblocks per second
vbv_buffer_size <= 20x16384 bit
bitrate <= 1856000 bits/second
motion vector range <= -64...63.5
/* Profile ID */
Specifies the subset of the MPEG-2 syntax required for decoding the
sequence. All MPEG-2 sequences generated by the current version of
the encoder are either Main Profile or Simple Profile sequences.
Code Meaning Typical use
---- -------------------------- ------------------------
1 High Profile production equipment requiring 4:2:2
2 Spatially Scalable Profile Simulcasting
3 SNR Scalable Profile Simulcasting
4 Main Profile 95 % of TVs, VCRs, cable applications
5 Simple Profile Low cost memory, e.g. no B pictures
/* Level ID */
Specifies coded parameter constraints, such as bitrate, sample rate, and
maximum allowed motion vector range.
Code Meaning Typical use
---- --------------- -----------------------------------------------
4 High Level HDTV production rates: e.g. 1920 x 1080 x 30 Hz
6 High 1440 Level HDTV consumer rates: e.g. 1440 x 960 x 30 Hz
8 Main Level CCIR 601 rates: e.g. 720 x 480 x 30 Hz
10 Low Level SIF video rate: e.g. 352 x 240 x 30 Hz
/* video_format: 0=comp., 1=PAL, 2=NTSC, 3=SECAM, 4=MAC, 5=unspec. */
/* color_primaries */
Specifies the x, y chromaticity coordinates of the source primaries.
Code Meaning
---- -------
1 ITU-R Rec. 709 (1990)
2 unspecified
4 ITU-R Rec. 624-4 System M
5 ITU-R Rec. 624-4 System B, G
6 SMPTE 170M
7 SMPTE 240M (1987)
/* transfer_characteristics */
Specifies the opto-electronic transfer characteristic of the source picture.
Code Meaning
---- -------
1 ITU-R Rec. 709 (1990)
2 unspecified
4 ITU-R Rec. 624-4 System M
5 ITU-R Rec. 624-4 System B, G
6 SMPTE 170M
7 SMPTE 240M (1987)
8 linear transfer characteristics
/* matrix_coefficients */
Specifies the matrix coefficients used in deriving luminance and chrominance
signals from the green, blue, and red primaries.
Code Meaning
---- -------
1 ITU-R Rec. 709 (1990)
2 unspecified
4 FCC
5 ITU-R Rec. 624-4 System B, G
6 SMPTE 170M
7 SMPTE 240M (1987)
/* intra_dc_precision */
Specifies the effective precision of the DC coefficient in MPEG-2
intra coded macroblocks. 10-bits usually achieves quality saturation.
Code Meaning
---- -----------------
0 8 bit
1 9 bit
2 10 bit
3 11 bit
/* frame_pred_frame_dct (I P B) */
Setting this parameter to 1 restricts motion compensation to frame
prediction and DCT to frame DCT. You have to specify this separately for
I, P and B picture types.
/* q_scale_type (I P B) */
These flag sets linear (0) or non-linear (1) quantization scale type
for the three respective picture types.
/* intra_vlc_format (I P B) */
Selects one of the two variable length coding tables for intra coded blocks.
Table 1 is considered to be statistically optimized for Intra coded
pictures coded within the sweet spot range (e.g. 0.3 to 0.6 bit/pixel)
of MPEG-2.
Code Meaning
---- -----------------
0 table 0 (= MPEG-1)
1 table 1
/* alternate_scan (I P B) */
Selects one of two entropy scanning patterns defining the order in
which quantized DCT coefficients are run-
评论0