Configuration File Syntax

When you run nvm_iep_sci you must provide a configuration file. A default configuration is available at:

<top>/drive-t186ref-linux/samples/nvmedia/img_enc/enc_h264_sample.cfg

The configuration file contains parameters with values, groups or sections of parameters, and optional comments.

Parameters

Each parameter must be on a separate line. A parameter line contains the following tokens:

  • The parameter name
  • An equal sign (“=”)
  • A value
  • An optional comment

Here is an example of a parameter with a comment:

InputFile = "configs/input.yuv" # File to encode

An unknown parameter in a configuration file does not cause a failure; the parameter is ignored. An ill-formed parameter line causes the application to fail.

Comments

A comment consists of a pound sign (a ‘#’) and any following text to the end of the line. A comment may appear at the end of any parameter line, or on a line by itself.

Sections

A section is a named group of parameters, containing a specific set of parameters. For example, the group RC_Params contains rate control parameters. You can define one or more RC_Params sections and use the parameter values they set by referring to them in the EPRateControlSectionIndex and EPPRCParamsIndex parameters, described later in this topic.

Note:

Range of values that can be used for numbering sections is 1 to 9 in steps of 1.

Available section types include:

  • EncodePic_Params: per-frame parameters
  • EncodePicH264_Params: specific H.264 per-frame parameters
  • Payload: different arrays of SEI payloads can be used for every picture in H.264 encoding
  • EncodePicH265_Params: consists of specific H.265 per frame parameters
  • EncodePicVP9_Params: specific VP9 per frame parameters
  • PayloadH265: different arrays of SEI payloads can be used for every picture in H.265 encoding
  • RC_Params: rate control parameters
  • QP_Params: quantization parameters

Each section begins with a line in the form:

[<section name> <section number>]

The rest of the section consists of parameter values to be defined in the group. A specific set of parameters may be defined in each group, as shown in Configuration File Parameters.

For example, these lines define three QP_Params groups:

[QP_Params 1]
QPBSlice             = 30    # Quant. parameter for B slices (0-51) - qpInterB
QPISlice             = 28    # Quant. parameter for I Slices (0-51) - qpIntra
QPPSlice             = 28    # Quant. parameter for P Slices (0-51) - qpInterP

[QP_Params 2]
QPBSlice             = 40    # Quant. parameter for B slices (0-51) - qpInterB
QPISlice             = 38    # Quant. parameter for I Slices (0-51) - qpIntra
QPPSlice             = 38    # Quant. parameter for P Slices (0-51) - qpInterP

[QP_Params 3]
QPBSlice             = 50    # Quant. parameter for B slices (0-51) - qpInterB
QPISlice             = 48    # Quant. parameter for I Slices (0-51) - qpIntra
QPPSlice             = 48    # Quant. parameter for P Slices (0-51) - qpInterP