[FFmpeg-devel] [PATCH] vpxenc: add codec specific speed option

James Zern jzern
Sat Jan 8 00:12:07 CET 2011


On Fri, Jan 7, 2011 at 10:53, Luca Barbato <lu_zero at gentoo.org> wrote:
> On 01/07/2011 07:33 PM, James Zern wrote:
>> On Fri, Jan 7, 2011 at 02:24, Luca Barbato <lu_zero at gentoo.org> wrote:
>>> On 01/07/2011 02:43 AM, James Zern wrote:
>>>> -speed maps to VP8E_SET_CPUUSED [-16,16].
>>>>
>>>> While this establishes the framework for libvpx codec specific options
>>>> I was wondering about name clashes with these. Is 'speed' too generic
>>>> for this?
>>>
>>> doesn't it map to 'threads' ?
>>>
>> -threads/thread_count is already used to populate g_threads.
>
> Could you please point me to the options or reply with an summary?
>
I had the attached doxygen around, all N/A's take library defaults.
Shorter inline text version (libvpx/AVCodecContext/option) below. The
resulting configuration can be output at -loglevel debug.

g_threads | AVCodecContext::thread_count | -threads
g_lag_in_frames | AVCodecContext::rc_lookahead | -lag
rc_target_bitrate | AVCodecContext::bit_rate/1000 | -vb
kf_max_dist | AVCodecContext::gop_size | -g
kf_min_dist | AVCodecContext::keyint_min | -keyint_min
rc_min_quantizer | AVCodecContext::qmin | -qmin
rc_max_quantizer | AVCodecContext::qmax | -qmax
rc_buf_sz | AVCodecContext::rc_buffer_size*1000 /
AVCodecContext::bit_rate | -bufsize -vb
rc_buf_initial_sz | AVCodecContext::rc_initial_buffer_occupancy * 1000
/ AVCodecContext::bit_rate | -rc_init_occupancy -vb
rc_buf_optimal_sz | (AVCodecContext::rc_buffer_size * 1000 /
AVCodecContext::bit_rate) * 5 / 6 | -bufsize -vb
rc_dropframe_thresh | AVCodecContext::frame_skip_threshold | -skip_threshold
rc_2pass_vbr_bias_pct | AVCodecContext::qcompress * 100 | -qcomp
rc_2pass_vbr_maxsection_pct | AVCodecContext::rc_max_rate * 100 /
AVCodecContext::bit_rate | -maxrate -vb
rc_2pass_vbr_minsection_pct | AVCodecContext::rc_min_rate * 100 /
AVCodecContext::bit_rate | -minrate -vb
VPX_CBR | AVCodecContext::rc_min_rate == AVCodecContext::rc_max_rate
&& AVCodecContext::rc_min_rate == AVCodecContext::bit_rate | -minrate
-maxrate -vb
g_profile | AVCodecContext::profile | -profile
VPX_DL_GOOD_QUALITY | (default) | N/A
VP8E_SET_NOISE_SENSITIVITY | AVCodecContext::noise_reduction | -nr
VP8E_SET_TOKEN_PARTITIONS | AVCodecContext::slices | -slices
-------------- next part --------------
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index a4dc621..b9deecc 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -21,6 +21,45 @@
 /**
  * @file
  * VP8 encoder support via libvpx
+ *
+ * @par libvpx SDK param./#AVCodecContext param./Assoc. cli opt {{{
+ * <table>
+ * <tr><td>g_threads</td><td>AVCodecContext::thread_count</td><td>-threads</td></tr>
+ * <tr><td>g_lag_in_frames</td><td>AVCodecContext::rc_lookahead</td><td>-lag</td></tr>
+ * <tr><td>rc_target_bitrate</td><td>AVCodecContext::bit_rate/1000</td><td>-vb</td></tr>
+ * <tr><td>kf_max_dist</td><td>AVCodecContext::gop_size</td><td>-g</td></tr>
+ * <tr><td>kf_min_dist</td><td>AVCodecContext::keyint_min</td><td>-keyint_min</td></tr>
+ * <tr><td>rc_min_quantizer</td><td>AVCodecContext::qmin</td><td>-qmin</td></tr>
+ * <tr><td>rc_max_quantizer</td><td>AVCodecContext::qmax</td><td>-qmax</td></tr>
+ * <tr><td>rc_buf_sz</td><td>AVCodecContext::rc_buffer_size*1000 / AVCodecContext::bit_rate</td><td>-bufsize -vb</td></tr>
+ * <tr><td>rc_buf_initial_sz</td><td>AVCodecContext::rc_initial_buffer_occupancy * 1000 / AVCodecContext::bit_rate</td><td>-rc_init_occupancy -vb</td></tr>
+ * <tr><td>rc_buf_optimal_sz</td><td>(AVCodecContext::rc_buffer_size * 1000 / AVCodecContext::bit_rate) * 5 / 6</td><td>-bufsize -vb</td></tr>
+ * <tr><td>rc_dropframe_thresh</td><td>AVCodecContext::frame_skip_threshold</td><td>-skip_threshold</td></tr>
+ * <tr><td>rc_undershoot_pct</td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td>rc_overshoot_pct</td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td>rc_resize_allowed</td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td>rc_resize_up_thresh</td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td>rc_resize_down_thresh</td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td>rc_2pass_vbr_bias_pct</td><td>AVCodecContext::qcompress * 100</td><td>-qcomp</td></tr>
+ * <tr><td>rc_2pass_vbr_maxsection_pct</td><td>AVCodecContext::rc_max_rate * 100 / AVCodecContext::bit_rate</td><td>-maxrate -vb</td></tr>
+ * <tr><td>rc_2pass_vbr_minsection_pct</td><td>AVCodecContext::rc_min_rate * 100 / AVCodecContext::bit_rate</td><td>-minrate -vb</td></tr>
+ * <tr><td>VPX_CBR</td><td>AVCodecContext::rc_min_rate == AVCodecContext::rc_max_rate && AVCodecContext::rc_min_rate == AVCodecContext::bit_rate</td><td>-minrate -maxrate -vb</td></tr>
+ * <tr><td>g_profile</td><td>AVCodecContext::profile</td><td>-profile</td></tr>
+ * <tr><td>g_error_resilient</td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VPX_DL_BEST_QUALITY</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VPX_DL_GOOD_QUALITY</code></td><td>(default)</td><td>N/A</td></tr>
+ * <tr><td><code>VPX_DL_REALTIME</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VP8E_SET_CPUUSED</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VP8E_SET_NOISE_SENSITIVITY</code></td><td>AVCodecContext::noise_reduction</td><td>-nr</td></tr>
+ * <tr><td><code>VP8E_SET_SHARPNESS</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VP8E_SET_ENABLEAUTOALTREF</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VP8E_SET_ARNR_MAXFRAMES</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VP8E_SET_ARNR_TYPE</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VP8E_SET_ARNR_STRENGTH</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VP8E_SET_STATIC_THRESHOLD</code></td><td>N/A</td><td>N/A</td></tr>
+ * <tr><td><code>VP8E_SET_TOKEN_PARTITIONS</code></td><td>AVCodecContext::slices</td><td>-slices</td></tr>
+ * </table>
+ * }}}
  */
 
 #define VPX_DISABLE_CTRL_TYPECHECKS 1



More information about the ffmpeg-devel mailing list