From db15615b5b171cd6d85df10ae1f6a0f69d3e0ffe Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Wed, 12 Mar 2008 22:01:57 +0000 Subject: == Quicktime == Hopefully fixes: [#8518] 2.46RC1: Blender doesn't render animation correctly with Quicktime and 30/1.001 FPS was off by a factor of 10 in export... --- source/blender/quicktime/apple/quicktime_export.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/quicktime') diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index d6c4d33a82f..e1f893f0d9d 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -573,13 +573,13 @@ static void check_renderbutton_framerate(void) { CheckError( err, "SCSetInfo error" ); if(qtdata->gTemporalSettings.frameRate == 1571553) { // 23.98 fps - qtdata->kVideoTimeScale = 2400; + qtdata->kVideoTimeScale = 24000; qtdata->duration = 1001; } else if (qtdata->gTemporalSettings.frameRate == 1964113) { // 29.97 fps - qtdata->kVideoTimeScale = 3000; + qtdata->kVideoTimeScale = 30000; qtdata->duration = 1001; } else if (qtdata->gTemporalSettings.frameRate == 3928227) { // 59.94 fps - qtdata->kVideoTimeScale = 6000; + qtdata->kVideoTimeScale = 60000; qtdata->duration = 1001; } else { qtdata->kVideoTimeScale = (qtdata->gTemporalSettings.frameRate >> 16) * 100; @@ -648,13 +648,13 @@ int get_qtcodec_settings(void) G.scene->r.frs_sec = 24; G.scene->r.frs_sec_base = 1.001; } else if (qtdata->gTemporalSettings.frameRate == 1964113) { // 29.97 fps - qtdata->kVideoTimeScale = 3000; + qtdata->kVideoTimeScale = 30000; qtdata->duration = 1001; G.scene->r.frs_sec = 30; G.scene->r.frs_sec_base = 1.001; } else if (qtdata->gTemporalSettings.frameRate == 3928227) { // 59.94 fps - qtdata->kVideoTimeScale = 6000; + qtdata->kVideoTimeScale = 60000; qtdata->duration = 1001; G.scene->r.frs_sec = 60; @@ -662,7 +662,7 @@ int get_qtcodec_settings(void) } else { double fps = qtdata->gTemporalSettings.frameRate; - qtdata->kVideoTimeScale = 600; + qtdata->kVideoTimeScale = 60000; qtdata->duration = qtdata->kVideoTimeScale / (qtdata->gTemporalSettings.frameRate / 65536); if ((qtdata->gTemporalSettings.frameRate & 0xffff) == 0) { -- cgit v1.2.3 From ff77d00544118cb61124b3cf10248c8011a01a4e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 12 Apr 2008 13:49:00 +0000 Subject: Fix for bug #5862: crash rendering to quicktime h.264. This would need an upgrade to the new quicktime api to work, but that's not really compatible with rendering out frames sequentially. For now it sets the compression to minimum quality, which doesn't need seeking forward and backwards. --- source/blender/quicktime/apple/quicktime_export.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source/blender/quicktime') diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index e1f893f0d9d..0cfb1950686 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -311,6 +311,7 @@ static void QT_EndCreateMyVideoTrack(void) static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame, int rectx, int recty) { + SCTemporalSettings gTemporalSettings; OSErr err = noErr; qtexport->ibuf = IMB_allocImBuf (rectx, recty, 32, IB_rect, 0); @@ -329,7 +330,18 @@ static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame, int rectx, i SCDefaultPixMapSettings (qtdata->theComponent, qtexport->thePixMap, true); - SCSetInfo(qtdata->theComponent, scTemporalSettingsType, &qtdata->gTemporalSettings); + // workaround for crash with H.264, which requires an upgrade to + // the new callback based api for proper encoding, but that's not + // really compatible with rendering out frames sequentially + gTemporalSettings = qtdata->gTemporalSettings; + if(qtdata->gSpatialSettings.codecType == kH264CodecType) { + if(gTemporalSettings.temporalQuality != codecMinQuality) { + fprintf(stderr, "Only minimum quality compression supported for QuickTime H.264.\n"); + gTemporalSettings.temporalQuality = codecMinQuality; + } + } + + SCSetInfo(qtdata->theComponent, scTemporalSettingsType, &gTemporalSettings); SCSetInfo(qtdata->theComponent, scSpatialSettingsType, &qtdata->gSpatialSettings); SCSetInfo(qtdata->theComponent, scDataRateSettingsType, &qtdata->aDataRateSetting); -- cgit v1.2.3 From 5d0a207ecb843c4c73be897cfccbf3a0d2db574b Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 16 Apr 2008 22:40:48 +0000 Subject: Patch from GSR that a) fixes a whole bunch of GPL/BL license blocks that were previously missed; and b) greatly increase my ohloh stats! --- source/blender/quicktime/CMakeLists.txt | 9 +++------ source/blender/quicktime/Makefile | 9 +++------ source/blender/quicktime/apple/Makefile | 9 +++------ source/blender/quicktime/apple/quicktime_export.c | 9 +++------ source/blender/quicktime/apple/quicktime_import.c | 9 +++------ source/blender/quicktime/quicktime_export.h | 9 +++------ source/blender/quicktime/quicktime_import.h | 9 +++------ 7 files changed, 21 insertions(+), 42 deletions(-) (limited to 'source/blender/quicktime') diff --git a/source/blender/quicktime/CMakeLists.txt b/source/blender/quicktime/CMakeLists.txt index afaaa35cac7..95969878cf1 100644 --- a/source/blender/quicktime/CMakeLists.txt +++ b/source/blender/quicktime/CMakeLists.txt @@ -1,13 +1,10 @@ # $Id$ -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,7 +22,7 @@ # # Contributor(s): Jacques Beaurain. # -# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# ***** END GPL LICENSE BLOCK ***** SET(SRC apple/quicktime_import.c apple/quicktime_export.c) diff --git a/source/blender/quicktime/Makefile b/source/blender/quicktime/Makefile index c71ebc4325d..3d8ab2f0adc 100644 --- a/source/blender/quicktime/Makefile +++ b/source/blender/quicktime/Makefile @@ -1,15 +1,12 @@ # # $Id$ # -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +24,7 @@ # # Contributor(s): none yet. # -# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# ***** END GPL LICENSE BLOCK ***** # # Bounces make to subdirectories. diff --git a/source/blender/quicktime/apple/Makefile b/source/blender/quicktime/apple/Makefile index 4620714563e..40a353243a6 100644 --- a/source/blender/quicktime/apple/Makefile +++ b/source/blender/quicktime/apple/Makefile @@ -1,15 +1,12 @@ # # $Id$ # -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +24,7 @@ # # Contributor(s): none yet. # -# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# ***** END GPL LICENSE BLOCK ***** # # diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index 0cfb1950686..a49a9a2fdc8 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -5,14 +5,11 @@ * * Code to create QuickTime Movies with Blender * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * ***** BEGIN GPL LICENSE BLOCK ***** * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,7 +25,7 @@ * * Contributor(s): Stefan Gartner (sgefant) * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** + * ***** END GPL LICENSE BLOCK ***** */ #ifdef WITH_QUICKTIME diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c index 862b20b5260..5a3c76b9d6f 100644 --- a/source/blender/quicktime/apple/quicktime_import.c +++ b/source/blender/quicktime/apple/quicktime_import.c @@ -5,14 +5,11 @@ * * Code to use Quicktime to load images/movies as texture. * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * ***** BEGIN GPL LICENSE BLOCK ***** * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,7 +25,7 @@ * * Contributor(s): Stefan Gartner (sgefant) * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** + * ***** END GPL LICENSE BLOCK ***** */ #ifdef WITH_QUICKTIME diff --git a/source/blender/quicktime/quicktime_export.h b/source/blender/quicktime/quicktime_export.h index 5962ae3d713..8a752f9b251 100644 --- a/source/blender/quicktime/quicktime_export.h +++ b/source/blender/quicktime/quicktime_export.h @@ -1,14 +1,11 @@ /* $Id$ * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,7 +23,7 @@ * * Contributor(s): none yet. * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** + * ***** END GPL LICENSE BLOCK ***** */ #ifndef __QUICKTIME_EXPORT_H__ diff --git a/source/blender/quicktime/quicktime_import.h b/source/blender/quicktime/quicktime_import.h index 58f20e4bf16..1444827e12e 100644 --- a/source/blender/quicktime/quicktime_import.h +++ b/source/blender/quicktime/quicktime_import.h @@ -3,15 +3,12 @@ * * $Id$ * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,7 +26,7 @@ * * Contributor(s): none yet. * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** + * ***** END GPL LICENSE BLOCK ***** */ -- cgit v1.2.3 From 6c05a92fe189baf82b7de4813d63b7bacf36cab2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 4 May 2008 15:02:48 +0000 Subject: missed out on some BLI_convertstringcode's, also found that playing relative quicktime paths from the python api never worked, was using the 'Scene' type cast to a char. --- source/blender/quicktime/apple/quicktime_export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/quicktime') diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index a49a9a2fdc8..736bb4dd584 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -428,7 +428,7 @@ void makeqtstring (char *string) { if (string==0) return; strcpy(string, G.scene->r.pic); - BLI_convertstringcode(string, G.sce, G.scene->r.cfra); + BLI_convertstringcode(string, G.sce); BLI_make_existing_file(string); -- cgit v1.2.3