[FFmpeg-cvslog] snowenc: add no_bitstream option.

Reimar Döffinger git at videolan.org
Sat Mar 10 20:17:30 CET 2012


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sat Mar 10 19:59:44 2012 +0100| [6fe8cb7d70414b5aa97f13fcbb4e73f9a87e706c] | committer: Reimar Döffinger

snowenc: add no_bitstream option.

This allows making e.g. MPlayer's -vf uspp filter about 20% faster.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fe8cb7d70414b5aa97f13fcbb4e73f9a87e706c
---

 libavcodec/snow.h    |    1 +
 libavcodec/snowenc.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavcodec/snow.h b/libavcodec/snow.h
index d2ef1ad..7990f1f 100644
--- a/libavcodec/snow.h
+++ b/libavcodec/snow.h
@@ -158,6 +158,7 @@ typedef struct SnowContext{
     unsigned me_cache_generation;
     slice_buffer sb;
     int memc_only;
+    int no_bitstream;
 
     MpegEncContext m; // needed for motion estimation, should not be used for anything else, the idea is to eventually make the motion estimation independent of MpegEncContext, so this will be removed then (FIXME/XXX)
 
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 8a6dce0..b71c823 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1800,6 +1800,7 @@ redo_frame:
                         quantize(s, b, b->ibuf, b->buf, b->stride, s->qbias);
                     if(orientation==0)
                         decorrelate(s, b, b->ibuf, b->stride, pic->pict_type == AV_PICTURE_TYPE_P, 0);
+                    if (!s->no_bitstream)
                     encode_subband(s, b, b->ibuf, b->parent ? b->parent->ibuf : NULL, b->stride, orientation);
                     assert(b->parent==NULL || b->parent->stride == b->stride*2);
                     if(orientation==0)
@@ -1904,6 +1905,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 static const AVOption options[] = {
     { "memc_only",      "Only do ME/MC (I frames -> ref, P frame -> ME+MC).",   OFFSET(memc_only), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },
+    { "no_bitstream",   "Skip final bitstream writeout.",                    OFFSET(no_bitstream), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },
     { NULL },
 };
 



More information about the ffmpeg-cvslog mailing list