X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fdvdcreate.C;h=6ecb270b381be0102a77e08381b2f0d03b660774;hp=175ef5477ceb24c39c5a5b680af513d163e3cc4f;hb=HEAD;hpb=02c179665199bb8bd1b057f83c26c070ce618901 diff --git a/cinelerra-5.1/cinelerra/dvdcreate.C b/cinelerra-5.1/cinelerra/dvdcreate.C index 175ef547..390d2cbc 100644 --- a/cinelerra-5.1/cinelerra/dvdcreate.C +++ b/cinelerra-5.1/cinelerra/dvdcreate.C @@ -1,3 +1,23 @@ +/* + * CINELERRA + * Copyright (C) 2016-2020 William Morrow + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + #include "asset.h" #include "bchash.h" #include "clip.h" @@ -8,6 +28,7 @@ #include "edlsession.h" #include "file.h" #include "filexml.h" +#include "interlacemodes.h" #include "keyframe.h" #include "labels.h" #include "mainerror.h" @@ -26,12 +47,21 @@ #include #if !defined(__FreeBSD__) #include +#if !defined(__NetBSD__) #include +#endif #else #include #include #endif +#if defined(__NetBSD__) +#include +#ifndef statfs +#define statfs statvfs +#endif +#endif + #define DVD_PAL_4x3 0 #define DVD_PAL_16x9 1 #define DVD_NTSC_4x3 2 @@ -320,6 +350,10 @@ int CreateDVD_Thread::create_dvd_jobs(ArrayList *jobs, const ch double old_samplerate = session->sample_rate; double old_framerate = session->frame_rate; + if(use_deinterlace) { + session->interlace_mode = ILACE_MODE_NOTINTERLACED; + } + session->video_channels = DVD_STREAMS; session->video_tracks = DVD_STREAMS; session->frame_rate = dvd_framerate; @@ -437,12 +471,17 @@ int CreateDVD_Thread::create_dvd_jobs(ArrayList *jobs, const ch asset->vmpeg_bitrate = vid_bitrate; asset->vmpeg_quantization = 15; asset->vmpeg_iframe_distance = 15; - asset->vmpeg_progressive = 0; + if(session->interlace_mode == ILACE_MODE_NOTINTERLACED || use_deinterlace) + { asset->vmpeg_progressive = 1; } else { + asset->vmpeg_progressive = 0; } asset->vmpeg_denoise = 0; asset->vmpeg_seq_codes = 0; asset->vmpeg_derivative = 2; asset->vmpeg_preset = 8; asset->vmpeg_field_order = 0; + if(session->interlace_mode == ILACE_MODE_BOTTOM_FIRST && !use_deinterlace) + { asset->vmpeg_field_order = 1; } else { + asset->vmpeg_field_order = 0; } asset->vmpeg_pframe_distance = 0; use_farmed = job->farmed; job = new BatchRenderJob(mwindow->preferences, 0, 0);