- Header changes to support hdaudio, memcache limitor and framecount boost.
authorPeter Schlaile <peter@schlaile.de>
Sun, 5 Feb 2006 19:36:32 +0000 (19:36 +0000)
committerPeter Schlaile <peter@schlaile.de>
Sun, 5 Feb 2006 19:36:32 +0000 (19:36 +0000)
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/iff.h
source/blender/include/BIF_editsound.h
source/blender/include/BIF_resources.h
source/blender/include/BSE_seqaudio.h
source/blender/include/BSE_sequence.h
source/blender/include/blendef.h
source/blender/python/api2_2x/sceneRender.c

index fbbc311e0d549a5a267cb337c372da9ba2eb79ca..7b32a814f9882641b32d1975800106db0830b1cf 100644 (file)
@@ -2639,6 +2639,7 @@ static void lib_link_scene(FileData *fd, Main *main)
                                                }
                                        }
                                        seq->anim= 0;
+                                       seq->hdaudio = 0;
                                }
                                END_SEQ
                        }
@@ -2740,7 +2741,8 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                                                }
                                        }
                                }
-                               else if(seq->type==SEQ_SOUND) {
+                               else if(seq->type==SEQ_RAM_SOUND
+                                       || seq->type == SEQ_HD_SOUND) {
                                        /* only first stripelem is in file */
                                        se= newdataadr(fd, seq->strip->stripdata);
 
index f00e238314b9c04a282d2e76a4e51a65ee5fe29d..cb2abd71ca0bcf8e96fe8e56f3df9c6b92a0d788 100644 (file)
@@ -1186,7 +1186,7 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
 
                                        if(seq->type==SEQ_IMAGE)
                                                writestruct(wd, DATA, "StripElem", strip->len, strip->stripdata);
-                                       else if(seq->type==SEQ_MOVIE || seq->type==SEQ_SOUND)
+                                       else if(seq->type==SEQ_MOVIE || seq->type==SEQ_RAM_SOUND || seq->type == SEQ_HD_SOUND)
                                                writestruct(wd, DATA, "StripElem", 1, strip->stripdata);
 
                                        strip->done= 1;
index 456291e664bcbe02fa894eea3bc3326aa5849d7e..f0d7a76f0f4adabc7a4e0543b3ee0565d6665c0c 100644 (file)
 
 #define AN_INIT an_stringdec = stringdec; an_stringenc = stringenc;
 
+struct MEM_CacheLimiterHandle_s;
+
 typedef struct ImBuf{
        short   x,y;            /* width in pixels, height in scanlines */
        short   skipx;          /* width in ints to get to the next scanline */
@@ -148,7 +150,11 @@ typedef struct ImBuf{
        unsigned char *encodedbuffer;
        unsigned int   encodedsize;
        unsigned int   encodedbuffersize;
+
        float *rect_float;
+
+       struct MEM_CacheLimiterHandle_s * c_handle;
+        int refcounter;
 } ImBuf;
 
 extern struct ImBuf *allocImBuf(short,short,uchar,uint,uchar);
index e4b730aedc891cf9cf19474d6e3145ad16333969..abeabdc3e0699a302155d3f7a34e88c4ba17d1c2 100644 (file)
@@ -37,6 +37,7 @@ struct bSound;
 struct bSample;
 struct ListBase;
 struct PackedFile;
+struct hdaudio;
 
 void sound_init_audio(void);
 void sound_initialize_sounds(void);
@@ -64,8 +65,23 @@ void sound_play_sound(struct bSound *sound);
 void sound_stop_all_sounds(void);
 
 void sound_set_position(void *object,
-                                               struct bSound *sound,
-                                               float obmatrix[4][4]);
+                       struct bSound *sound,
+                       float obmatrix[4][4]);
+
+struct hdaudio * sound_open_hdaudio(char * name);
+struct hdaudio * sound_copy_hdaudio(struct hdaudio * c);
+
+long sound_hdaudio_get_duration(struct hdaudio * hdaudio, int frame_rate);
+void sound_hdaudio_extract(struct hdaudio * hdaudio, 
+                          short * target_buffer,
+                          int sample_position /* units of target_rate */,
+                          int target_rate,
+                          int target_channels,
+                          int nb_samples /* in target */);
+                          
+void sound_close_hdaudio(struct hdaudio * hdaudio);
+
+
 
 #endif
 
index ecf6f67331ab818d4bf38996d9040d260b85bad9..af721feafa86adad69a3a13bee91fb2375045e0c 100644 (file)
@@ -293,10 +293,10 @@ typedef enum {
        ICON_MOD_MIRROR,
        ICON_MOD_SOFT,
        ICON_MOD_SUBSURF,
-       ICON_BLANK73,
-       ICON_BLANK74,
-       ICON_BLANK75,
-       ICON_BLANK76,
+       ICON_SEQ_SEQUENCER,
+       ICON_SEQ_PREVIEW,
+       ICON_SEQ_LUMA_WAVEFORM,
+       ICON_SEQ_CHROMA_SCOPE,
        ICON_ROTATE,
        ICON_CURSOR,
        ICON_ROTATECOLLECTION,
index f395ac4b90e191ca5e27a12458d5e88722a7ac3b..985c4be73d2922039542b62b6914ffb8488241dc 100644 (file)
@@ -43,6 +43,7 @@
 void audio_mixdown();
 void audio_makestream(bSound *sound);
 void audiostream_play(Uint32 startframe, Uint32 duration, int mixdown);
+void audiostream_fill(Uint8* mixdown, int len);
 void audiostream_start(Uint32 frame);
 void audiostream_scrub(Uint32 frame);
 void audiostream_stop(void);
index df38389892aef63a0aa8ce6285a52cb8b880968e..686749b303d7eafcf98175778ae5eda465f1eda2 100644 (file)
@@ -123,16 +123,19 @@ void do_effect(int cfra, struct Sequence *seq, struct StripElem *se);
 int evaluate_seq_frame(int cfra);
 struct StripElem *give_stripelem(struct Sequence *seq, int cfra);
 void set_meta_stripdata(struct Sequence *seqm);
-void do_seq_count_cfra(struct ListBase *seqbase, int *totseq, int cfra);
-void do_build_seqar_cfra(struct ListBase *seqbase, struct Sequence ***seqar, int cfra);
-struct ImBuf *give_ibuf_seq(int rectx, int recty, int cfra);
+struct ImBuf *give_ibuf_seq(int rectx, int recty, int cfra, int chansel); 
+/* chansel: render this channel. Default=0 (renders end result)*/
+
+struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf * ibuf);
+struct ImBuf *make_vectorscope_view_from_ibuf(struct ImBuf * ibuf);
+
 void free_imbuf_effect_spec(int cfra);
 void free_imbuf_seq_except(int cfra);
 void free_imbuf_seq(void);
 
 /* still bad level call... */
 struct RenderResult;
-void do_render_seq(struct RenderResult *rr);
+void do_render_seq(struct RenderResult *rr, int cfra);
 
 
 #endif
index 52638e6f9889e6e2888cc873735274f70c45babe..425d95cc112ce5752df0b080d4d9eb29d0f6029c 100644 (file)
@@ -34,8 +34,8 @@
 
 /* **************** MAX ********************* */
 
-#define MAXFRAME       30000
-#define MAXFRAMEF      30000.0f
+#define MAXFRAME       300000
+#define MAXFRAMEF      300000.0f
 
 #define MINFRAME       1
 #define MINFRAMEF      1.0
 #define B_UITHEMEIMPORT                323
 #define B_UITHEMEEXPORT                324
 
+#define B_MEMCACHELIMIT         325
+
 /* Definitions for the fileselect buttons in user prefs */
 #define B_FONTDIRFILESEL       330
 #define B_TEXTUDIRFILESEL      331
index 01329dd36c4fd0469273c72daafb226dda8284c2..10de6e05aeea97ba4d655baf5143a8f52551240c 100644 (file)
@@ -1443,22 +1443,22 @@ PyObject *RenderData_GaussFilterSize( BPy_RenderData * self, PyObject * args )
 //------------------------------------RenderData.StartFrame() -----------
 PyObject *RenderData_StartFrame( BPy_RenderData * self, PyObject * args )
 {
-       return M_Render_GetSetAttributeShort( args, &self->renderContext->sfra,
-                                             1, MAXFRAME );
+       return M_Render_GetSetAttributeInt( args, &self->renderContext->sfra,
+                                           1, MAXFRAME );
 }
 
 //------------------------------------RenderData.CurrentFrame() ---------
 PyObject *RenderData_CurrentFrame( BPy_RenderData * self, PyObject * args )
 {
-       return M_Render_GetSetAttributeShort( args, &self->renderContext->cfra,
-                                             1, MAXFRAME );
+       return M_Render_GetSetAttributeInt( args, &self->renderContext->cfra,
+                                           1, MAXFRAME );
 }
 
 //------------------------------------RenderData.EndFrame() -------------
 PyObject *RenderData_EndFrame( BPy_RenderData * self, PyObject * args )
 {
-       return M_Render_GetSetAttributeShort( args, &self->renderContext->efra,
-                                             1, MAXFRAME );
+       return M_Render_GetSetAttributeInt( args, &self->renderContext->efra,
+                                           1, MAXFRAME );
 }
 
  //------------------------------------RenderData.ImageSizeX() ----------