Revision: 44242
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44242
Author:   nazgul
Date:     2012-02-19 08:02:05 +0000 (Sun, 19 Feb 2012)
Log Message:
-----------
Proxies: FFmpeg proxy builder wasn't taking image quality into account at all
which made it using default quality settings which are really bad for camera
tracking (and perhaps for CSE too).

haven't found Jpeg quality setting for FFmpeg which will behave in the same way
as quality setting for image sequence, but seems that mapping image quality
from 1..100 UI range to 31..1 range of qmin/qmax gives expected result.

--
svn merge -r44228:44230 ^/branches/soc-2011-tomato

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44228

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/intern/indexer.c

Property Changed:
----------------
    trunk/blender/
    trunk/blender/source/blender/editors/space_outliner/


Property changes on: trunk/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152
   + 
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230


Property changes on: trunk/blender/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152
   + 
/branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230

Modified: trunk/blender/source/blender/imbuf/intern/indexer.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/indexer.c 2012-02-19 07:56:23 UTC 
(rev 44241)
+++ trunk/blender/source/blender/imbuf/intern/indexer.c 2012-02-19 08:02:05 UTC 
(rev 44242)
@@ -459,12 +459,13 @@
 static struct proxy_output_ctx * alloc_proxy_output_ffmpeg(
        struct anim * anim,
        AVStream * st, int proxy_size, int width, int height,
-       int UNUSED(quality))
+       int quality)
 {
        struct proxy_output_ctx * rv = MEM_callocN(
                sizeof(struct proxy_output_ctx), "alloc_proxy_output");
        
        char fname[FILE_MAX];
+       int ffmpeg_quality;
 
        // JPEG requires this
        width = round_up(width, 8);
@@ -514,6 +515,12 @@
        rv->c->time_base.num = 1;
        rv->st->time_base = rv->c->time_base;
 
+       /* there's no  way to set JPEG quality in the same way as in AVI JPEG 
and image sequence,
+        * but this seems to be giving expected quality result */
+       ffmpeg_quality = (int)(1.0f + 30.0f * (1.0f - (float)quality / 100.0f) 
+ 0.5f);
+       av_set_int(rv->c, "qmin", ffmpeg_quality);
+       av_set_int(rv->c, "qmax", ffmpeg_quality);
+
        if (rv->of->flags & AVFMT_GLOBALHEADER) {
                rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER;
        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to