107
106
/* Video codec */
108
107
static QuicktimeCodecTypeDesc qtVideoCodecList[] = {
109
108
{kRawCodecType, 1, "Uncompressed"},
110
{kJPEGCodecType, 2, "JPEG"},
111
{kMotionJPEGACodecType, 3, "M-JPEG A"},
112
{kMotionJPEGBCodecType, 4, "M-JPEG B"},
113
{kDVCPALCodecType, 5, "DV PAL"},
114
{kDVCNTSCCodecType, 6, "DV/DVCPRO NTSC"},
115
{kDVCPROHD720pCodecType, 7, "DVCPRO HD 720p"},
116
{kDVCPROHD1080i50CodecType, 8, "DVCPRO HD 1080i50"},
117
{kDVCPROHD1080i60CodecType, 9, "DVCPRO HD 1080i60"},
118
{kMPEG4VisualCodecType, 10, "MPEG4"},
119
{kH263CodecType, 11, "H.263"},
120
{kH264CodecType, 12, "H.264"},
109
{k422YpCbCr8CodecType, 2, "Uncompressed 8-bit 4:2:2"},
110
{k422YpCbCr10CodecType, 3, "Uncompressed 10-bit 4:2:2"},
111
{kComponentVideoCodecType, 4, "Component Video"},
112
{kPixletCodecType, 5, "Pixlet"},
113
{kPNGCodecType, 6, "PNG"},
114
{kJPEGCodecType, 7, "JPEG"},
115
{kMotionJPEGACodecType, 8, "M-JPEG A"},
116
{kMotionJPEGBCodecType, 9, "M-JPEG B"},
117
{kDVCPALCodecType, 10, "DV PAL"},
118
{kDVCNTSCCodecType, 11, "DV/DVCPRO NTSC"},
119
{kDVCPROHD720pCodecType, 12, "DVCPRO HD 720p"},
120
{kDVCPROHD1080i50CodecType, 13, "DVCPRO HD 1080i50"},
121
{kDVCPROHD1080i60CodecType, 14, "DVCPRO HD 1080i60"},
122
{kMPEG4VisualCodecType, 15, "MPEG4"},
123
{kH263CodecType, 16, "H.263"},
124
{kH264CodecType, 17, "H.264"},
125
{kAnimationCodecType, 18, "Animation"},
123
static int qtVideoCodecCount = 12;
128
static int qtVideoCodecCount = 18;
125
int quicktime_get_num_videocodecs() {
130
int quicktime_get_num_videocodecs()
126
132
return qtVideoCodecCount;
129
QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue) {
135
QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue)
130
137
if ((indexValue>=0) && (indexValue < qtVideoCodecCount))
131
138
return &qtVideoCodecList[indexValue];
136
int quicktime_rnatmpvalue_from_videocodectype(int codecType) {
143
int quicktime_rnatmpvalue_from_videocodectype(int codecType)
138
146
for (i=0;i<qtVideoCodecCount;i++) {
139
147
if (qtVideoCodecList[i].codecType == codecType)
204
218
return [NSString stringWithCString:str encoding:NSASCIIStringEncoding];
207
void makeqtstring (RenderData *rd, char *string) {
221
void makeqtstring (RenderData *rd, char *string)
210
225
strcpy(string, rd->pic);
211
BLI_path_abs(string, G.sce);
226
BLI_path_abs(string, G.main->name);
213
228
BLI_make_existing_file(string);
215
230
if (BLI_strcasecmp(string + strlen(string) - 4, ".mov")) {
216
sprintf(txt, "%04d_%04d.mov", (rd->sfra) , (rd->efra) );
231
sprintf(txt, "%04d-%04d.mov", (rd->sfra) , (rd->efra) );
217
232
strcat(string, txt);
221
void filepath_qt(char *string, RenderData *rd) {
236
void filepath_qt(char *string, RenderData *rd)
222
238
if (string==NULL) return;
224
240
strcpy(string, rd->pic);
225
BLI_path_abs(string, G.sce);
241
BLI_path_abs(string, G.main->name);
227
243
BLI_make_existing_file(string);
229
245
if (!BLI_testextensie(string, ".mov")) {
230
/* if we dont have any #'s to insert numbers into, use 4 numbers by default */
246
/* if we don't have any #'s to insert numbers into, use 4 numbers by default */
231
247
if (strchr(string, '#')==NULL)
232
248
strcat(string, "####"); /* 4 numbers */
585
int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports)
603
int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, int rectx, int recty, ReportList *reports)
587
605
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
588
606
NSBitmapImageRep *blBitmapFormatImage;
589
607
NSImage *frameImage;
608
OSStatus err = noErr;
590
609
unsigned char *from_Ptr,*to_Ptr;
591
610
int y,from_i,to_i;
594
612
/* Create bitmap image rep in blender format (32bit RGBA) */
595
613
blBitmapFormatImage = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL