diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-13 00:16:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-13 00:16:53 +0300 |
commit | bdfe7d89e2f1292644577972c716931b4ce3c6c3 (patch) | |
tree | d00eb50b749cb001e2b08272c91791e66740b05d /source/blender/quicktime/apple/quicktime_export.c | |
parent | 78a1c27c4a6abe0ed31ca93ad21910f3df04da56 (diff) | |
parent | 7e4db234cee71ead34ee81a12e27da4bd548eb4b (diff) |
Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416
Issues:
* GHOST/X11 had conflicting changes. Some code was added in 2.5, which was
later added in trunk also, but reverted partially, specifically revision
16683. I have left out this reversion in the 2.5 branch since I think it is
needed there.
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683
* Scons had various conflicting changes, I decided to go with trunk version
for everything except priorities and some library renaming.
* In creator.c, there were various fixes and fixes for fixes related to the -w
-W and -p options. In 2.5 -w and -W is not coded yet, and -p is done
differently. Since this is changed so much, and I don't think those fixes
would be needed in 2.5, I've left them out.
* Also in creator.c: there was code for a python bugfix where the screen was not
initialized when running with -P. The code that initializes the screen there
I had to disable, that can't work in 2.5 anymore but left it commented as a
reminder.
Further I had to disable some new function calls. using src/ and python/, as
was done already in this branch, disabled function calls:
* bpath.c: error reporting
* BME_conversions.c: editmesh conversion functions.
* SHD_dynamic: disabled almost completely, there is no python/.
* KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled.
* text.c: clipboard copy call.
* object.c: OB_SUPPORT_MATERIAL.
* DerivedMesh.c and subsurf_ccg, stipple_quarttone.
Still to be done:
* Go over files and functions that were moved to a different location but could
still use changes that were done in trunk.
Diffstat (limited to 'source/blender/quicktime/apple/quicktime_export.c')
-rw-r--r-- | source/blender/quicktime/apple/quicktime_export.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index 06c5d9132bc..ca025a0b8a3 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -307,6 +307,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); @@ -325,7 +326,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); @@ -415,7 +427,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); @@ -569,13 +581,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; @@ -644,13 +656,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; @@ -658,7 +670,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) { |