int main(int argc, char *argv[]) { const char *filename = "2frame.y4m"; const int width = 360; const int height = 180; FILE *out = fopen(filename, "wb"); // Header. fprintf(out, "YUV4MPEG2 W%d H%d F24:1 Ip A1:1\n", width, height); // Blue frame. y4m *blue = newframe(width, height); fillframe(blue, 96, 224, 32); writeframe(blue, out); freeframe(blue); // Green frame. y4m *green = newframe(width, height); fillframe(green, 218, 32, 32); writeframe(green, out); freeframe(green); fclose(out); fprintf(stderr, "File written to %s.\n", filename); return 0; }
PUBLIC INLINE void push_frame(VMSTATE vms) { OVECTOR newf = newovector(FR_MAXSLOTINDEX, T_FRAME); fillframe(vms, newf, vms->c.vm_ip); vms->r->vm_frame = newf; }