[FFmpeg-devel] [PATCH] lavc: extend documentation for skip_idct, skip_loop_filter, skip_frame options

Stefano Sabatini stefasab at gmail.com
Sun Mar 10 16:19:09 CET 2013


---
 doc/ffmpeg-codecs.texi     |   47 ++++++++++++--------------------------------
 libavcodec/avcodec.h       |    6 +++---
 libavcodec/options_table.h |   18 ++++++++---------
 3 files changed, 25 insertions(+), 46 deletions(-)

diff --git a/doc/ffmpeg-codecs.texi b/doc/ffmpeg-codecs.texi
index db20aec..8f807c1 100644
--- a/doc/ffmpeg-codecs.texi
+++ b/doc/ffmpeg-codecs.texi
@@ -944,58 +944,37 @@ Set max macroblock lagrange factor (VBR).
 Set motion estimation bitrate penalty compensation (1.0 = 256).
 
 @item skip_loop_filter @var{integer} (@emph{decoding,video})
+ at item skip_idct        @var{integer} (@emph{decoding,video})
+ at item skip_frame       @var{integer} (@emph{decoding,video})
 
-Possible values:
- at table @samp
- at item none
-
- at item default
-
- at item noref
-
- at item bidir
-
- at item nokey
-
- at item all
-
- at end table
+Make decoder discard processing depending on the frame type selected
+by the option value.
 
- at item skip_idct @var{integer} (@emph{decoding,video})
+ at option{skip_loop_filter} skips frame loop filtering, @option{skip_idct}
+skips frame IDCT/dequantization, @option{skip_frame} skips decoding.
 
 Possible values:
 @table @samp
 @item none
+Discard no frame.
 
 @item default
+Discard useless frames like 0-sized frames.
 
 @item noref
+Discard all non-reference frames.
 
 @item bidir
+Discard all bidirectional frames.
 
 @item nokey
+Discard all frames excepts keyframes.
 
 @item all
-
+Discard all frames.
 @end table
 
- at item skip_frame @var{integer} (@emph{decoding,video})
-
-Possible values:
- at table @samp
- at item none
-
- at item default
-
- at item noref
-
- at item bidir
-
- at item nokey
-
- at item all
-
- at end table
+Default value is @samp{default}.
 
 @item bidir_refine @var{integer} (@emph{encoding,video})
 Refine the two motion vectors used in bidirectional macroblocks.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 36c1106..3ed14c2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2688,21 +2688,21 @@ typedef struct AVCodecContext {
 #define FF_LEVEL_UNKNOWN -99
 
     /**
-     *
+     * Skip loop filtering for selected frames.
      * - encoding: unused
      * - decoding: Set by user.
      */
     enum AVDiscard skip_loop_filter;
 
     /**
-     *
+     * Skip IDCT/dequantization for selected frames.
      * - encoding: unused
      * - decoding: Set by user.
      */
     enum AVDiscard skip_idct;
 
     /**
-     *
+     * Skip decoding for selected frames.
      * - encoding: unused
      * - decoding: Set by user.
      */
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index d0c55a2..f9765dc 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -350,15 +350,15 @@ static const AVOption options[]={
 {"mblmin", "minimum macroblock Lagrange factor (VBR)", OFFSET(mb_lmin), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 2 }, 1, FF_LAMBDA_MAX, V|E},
 {"mblmax", "maximum macroblock Lagrange factor (VBR)", OFFSET(mb_lmax), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 31 }, 1, FF_LAMBDA_MAX, V|E},
 {"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, V|E},
-{"skip_loop_filter", NULL, OFFSET(skip_loop_filter), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
-{"skip_idct"       , NULL, OFFSET(skip_idct)       , AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
-{"skip_frame"      , NULL, OFFSET(skip_frame)      , AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
-{"none"            , NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONE    }, INT_MIN, INT_MAX, V|D, "avdiscard"},
-{"default"         , NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
-{"noref"           , NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONREF  }, INT_MIN, INT_MAX, V|D, "avdiscard"},
-{"bidir"           , NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_BIDIR   }, INT_MIN, INT_MAX, V|D, "avdiscard"},
-{"nokey"           , NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY  }, INT_MIN, INT_MAX, V|D, "avdiscard"},
-{"all"             , NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL     }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"skip_loop_filter", "skip loop filtering process for the selected frames", OFFSET(skip_loop_filter), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"skip_idct"       , "skip IDCT/dequantization for the selected frames",    OFFSET(skip_idct),        AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"skip_frame"      , "skip decoding for the selected frames",               OFFSET(skip_frame),       AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"none"            , "discard no frame",                    0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONE    }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"default"         , "discard useless frames",              0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"noref"           , "discard all non-reference frames",    0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONREF  }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"bidir"           , "discard all bidirectional frames",    0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_BIDIR   }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"nokey"           , "discard all frames except keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY  }, INT_MIN, INT_MAX, V|D, "avdiscard"},
+{"all"             , "discard all frames",                  0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL     }, INT_MIN, INT_MAX, V|D, "avdiscard"},
 {"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 4, V|E},
 {"brd_scale", "downscale frames for dynamic B-frame decision", OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 10, V|E},
 {"keyint_min", "minimum interval between IDR-frames", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E},
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list