[FFmpeg-devel] [PATCH] add encode options to libvpxenc

Alexander Strange astrange
Wed May 19 23:51:31 CEST 2010


On May 19, 2010, at 2:39 PM, James Zern wrote:

> As mentioned in '[PATCH] VP8 de/encode via libvpx' this patch adds
> fuller option support to libvpxenc. An attempt was made to try to
> minimize new options, but in those cases some of the mappings may be
> incorrect.
> <avcodec-AVCodecContext_add_VP8_specifics.diff>

> +    /**
> +     * Enable spatial resampling
> +     *
> +     * Spatial resampling allows the codec to compress a lower resolution
> +     * version of the frame, which is then upscaled by the encoder to the
> +     * correct presentation resolution. This increases visual quality at low
> +     * data rates, at the expense of CPU time on the encoder/decoder.
> +     * - encoding: Set by user.
> +     * - decoding: unused
> +     *
> +     *  \attention VP8 specific
> +     */
> +    int spatial_rsmpl;


Is this a boolean? If so, it could go in CODEC_FLAGS2.
I remember Xvid supported this once, but it seems like it was never exposed here.

I think "resample" is better than "rsmpl".

> +     * Spatial resampling up watermark.
> +     * Spatial resampling down watermark.

"watermark" made me think it had to do with watermarking.
Maybe "high-water mark" and "low-water mark"?
Of course, matching the library documentation is probably the most important thing here.

> +     * Two-pass mode CBR/VBR bias.

This sounds like bit_rate_tolerance (x264 ratetol).

> +     * Bias, expressed on a scale of 0 to 100, for determining target size for
> +     * the current frame. The value 0 indicates the optimal CBR mode value
> +     * should be used. The value 100 indicates the optimal VBR mode value
> +     * should be used. Values in between indicate which way the encoder should
> +     * "lean." RC mode bias between CBR and VBR(0-100: 0->CBR, 100->VBR)


The last sentence doesn't fit the rest of it.

> +     * Allow lagged encoding.

This is rc_lookahead.

> +     * Control sharpness preprocessing
> +     *
> +     * This setting does not impact any other setting and is largely a matter
> +     * of personal preference.  A low sharpness setting will result in fewer
> +     * visible artifacts but may blur the image somewhat; a high sharpness will
> +     * result in a sharper image but may result in more visible artifacts.
> +     * Valid Range: [0,7]

The documentation mostly uses noun phrases "level of sharpness preprocessing" instead of "control sharpness preprocessing".
"Valid Range" should be a sentence.

> +     * Allow encoder to automatically set and use alternate reference frame.

"the".
Is this a boolean? Maybe it can be a codec flag too if so.

> +     * Set the max number of frames blurred creating the alternate reference frame.

"when creating"

> +     * Set the type of filter to use for the alternate reference frame.

What are the filter types?

> +     * Set the filter strength for the alternate reference frame.

What are the range of values?

> +     * Set the threshold for macroblocks treated as static.

Same.

> +     * Number of bits which should be maintained in rc buffer during decoding.

I feel like this already exists, but I don't know enough about VBV to say which value it is.
So ignore this if it really already doesn't exist.

> +     * Number of token partitions.
> +     * Valid Values: {1,2,4,8}

"Valid Values" should be a sentence, or at least lowercase "values".



More information about the ffmpeg-devel mailing list