00001 /* writepic.c, write reconstructed pictures */ 00002 00003 /* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */ 00004 00005 /* 00006 * Disclaimer of Warranty 00007 * 00008 * These software programs are available to the user without any license fee or 00009 * royalty on an "as is" basis. The MPEG Software Simulation Group disclaims 00010 * any and all warranties, whether express, implied, or statuary, including any 00011 * implied warranties or merchantability or of fitness for a particular 00012 * purpose. In no event shall the copyright-holder be liable for any 00013 * incidental, punitive, or consequential damages of any kind whatsoever 00014 * arising from the use of these programs. 00015 * 00016 * This disclaimer of warranty extends to the user of these programs and user's 00017 * customers, employees, agents, transferees, successors, and assigns. 00018 * 00019 * The MPEG Software Simulation Group does not represent or warrant that the 00020 * programs furnished hereunder are free of infringement of any third-party 00021 * patents. 00022 * 00023 * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware, 00024 * are subject to royalty fees to patent holders. Many of these patents are 00025 * general enough such that they are unavoidable regardless of implementation 00026 * design. 00027 * 00028 */ 00029 00030 #include <stdio.h> 00031 #include <stdlib.h> 00032 #include "colormodels.h" 00033 #include "config.h" 00034 #include "global.h" 00035 00036 void writeframe(int number, unsigned char *frame[]) 00037 { 00038 int chrom_hsize, chrom_vsize; 00039 char name[128]; 00040 FILE *fd; 00041 00042 if(!qt_output) return; 00043 //printf("writeframe 1\n"); 00044 chrom_hsize = (chroma_format==CHROMA444) ? horizontal_size 00045 : horizontal_size>>1; 00046 00047 chrom_vsize = (chroma_format!=CHROMA420) ? vertical_size 00048 : vertical_size>>1; 00049 00050 quicktime_set_cmodel(qt_output, BC_YUV420P); 00051 quicktime_encode_video(qt_output, 00052 frame, 00053 0); 00054 }
1.5.5