X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fasset.C;h=48dfca3ca66934d7379e30570f3bd115773dbd42;hp=e2fc242a2c49f73a5a911a11dfdc0cdc255ddfb9;hb=ac8f3979437fb45effb135a1bb6bee871f52d635;hpb=4710b00debcb86b8ff626c4af3473afe338408ae diff --git a/cinelerra-5.1/cinelerra/asset.C b/cinelerra-5.1/cinelerra/asset.C index e2fc242a..48dfca3c 100644 --- a/cinelerra-5.1/cinelerra/asset.C +++ b/cinelerra-5.1/cinelerra/asset.C @@ -95,9 +95,7 @@ int Asset::init_values() jpeg_quality = 80; aspect_ratio = -1; - interlace_autofixoption = ILACE_AUTOFIXOPTION_AUTO; interlace_mode = ILACE_MODE_UNDETECTED; - interlace_fixmethod = ILACE_FIXMETHOD_NONE; mp3_bitrate = 224; ampeg_bitrate = 256; @@ -149,6 +147,7 @@ void Asset::reset_video() layers = 0; actual_width = width = 0; actual_height = height = 0; + proxy_scale = 0; // not a proxy video_length = 0; single_frame = 0; vmpeg_cmodel = BC_YUV420P; @@ -198,9 +197,7 @@ void Asset::copy_format(Asset *asset, int do_index) mp3_bitrate = asset->mp3_bitrate; use_header = asset->use_header; aspect_ratio = asset->aspect_ratio; - interlace_autofixoption = asset->interlace_autofixoption; interlace_mode = asset->interlace_mode; - interlace_fixmethod = asset->interlace_fixmethod; video_data = asset->video_data; layers = asset->layers; @@ -210,6 +207,7 @@ void Asset::copy_format(Asset *asset, int do_index) height = asset->height; actual_width = asset->actual_width; actual_height = asset->actual_height; + proxy_scale = asset->proxy_scale; strcpy(vcodec, asset->vcodec); strcpy(acodec, asset->acodec); @@ -342,9 +340,7 @@ int Asset::equivalent(Asset &asset, int test_audio, int test_video, EDL *edl) result = (layers == asset.layers && program == asset.program && frame_rate == asset.frame_rate && - asset.interlace_autofixoption == interlace_autofixoption && asset.interlace_mode == interlace_mode && - interlace_fixmethod == asset.interlace_fixmethod && width == asset.width && height == asset.height && !strcmp(vcodec, asset.vcodec) && @@ -485,6 +481,7 @@ int Asset::read_video(FileXML *file) actual_width = file->tag.get_property("ACTUAL_WIDTH", actual_width); height = file->tag.get_property("HEIGHT", height); width = file->tag.get_property("WIDTH", width); + proxy_scale = file->tag.get_property("PROXY_SCALE", 0); layers = file->tag.get_property("LAYERS", layers); program = file->tag.get_property("PROGRAM", program); // This is loaded from the index file after the EDL but this @@ -497,15 +494,9 @@ int Asset::read_video(FileXML *file) mov_sphere = file->tag.get_property("MOV_SPHERE", 0); jpeg_sphere = file->tag.get_property("JPEG_SPHERE", 0); single_frame = file->tag.get_property("SINGLE_FRAME", (int64_t)0); - - interlace_autofixoption = file->tag.get_property("INTERLACE_AUTOFIX",0); - ilacemode_to_xmltext(string, ILACE_MODE_NOTINTERLACED); interlace_mode = ilacemode_from_xmltext(file->tag.get_property("INTERLACE_MODE",string), ILACE_MODE_NOTINTERLACED); - ilacefixmethod_to_xmltext(string, ILACE_FIXMETHOD_NONE); - interlace_fixmethod = ilacefixmethod_from_xmltext(file->tag.get_property("INTERLACE_FIXMETHOD",string), ILACE_FIXMETHOD_NONE); - return 0; } @@ -638,6 +629,7 @@ int Asset::write_video(FileXML *file) file->tag.set_property("ACTUAL_WIDTH", actual_width); file->tag.set_property("HEIGHT", height); file->tag.set_property("WIDTH", width); + file->tag.set_property("PROXY_SCALE", proxy_scale); file->tag.set_property("LAYERS", layers); file->tag.set_property("PROGRAM", program); file->tag.set_property("FRAMERATE", frame_rate); @@ -649,14 +641,9 @@ int Asset::write_video(FileXML *file) file->tag.set_property("JPEG_SPHERE", jpeg_sphere); file->tag.set_property("SINGLE_FRAME", single_frame); - file->tag.set_property("INTERLACE_AUTOFIX", interlace_autofixoption); - ilacemode_to_xmltext(string, interlace_mode); file->tag.set_property("INTERLACE_MODE", string); - ilacefixmethod_to_xmltext(string, interlace_fixmethod); - file->tag.set_property("INTERLACE_FIXMETHOD", string); - file->append_tag(); if(video_data) file->tag.set_title("/VIDEO"); @@ -744,6 +731,7 @@ void Asset::load_defaults(BC_Hash *defaults, width = GET_DEFAULT("WIDTH", width); actual_height = GET_DEFAULT("ACTUAL_HEIGHT", actual_height); actual_width = GET_DEFAULT("ACTUAL_WIDTH", actual_width); + proxy_scale = GET_DEFAULT("PROXY_SCALE", proxy_scale); program = GET_DEFAULT("PROGRAM", program); layers = GET_DEFAULT("LAYERS", layers); if(EQUIV(frame_rate, 0)) frame_rate = GET_DEFAULT("FRAMERATE", frame_rate); @@ -767,10 +755,7 @@ void Asset::load_defaults(BC_Hash *defaults, jpeg_quality = GET_DEFAULT("JPEG_QUALITY", jpeg_quality); aspect_ratio = GET_DEFAULT("ASPECT_RATIO", aspect_ratio); - - interlace_autofixoption = ILACE_AUTOFIXOPTION_AUTO; interlace_mode = ILACE_MODE_UNDETECTED; - interlace_fixmethod = ILACE_FIXMETHOD_UPONE; // MPEG format information vmpeg_iframe_distance = GET_DEFAULT("VMPEG_IFRAME_DISTANCE", vmpeg_iframe_distance); @@ -905,6 +890,7 @@ void Asset::save_defaults(BC_Hash *defaults, UPDATE_DEFAULT("WIDTH", width); UPDATE_DEFAULT("ACTUAL_HEIGHT", actual_height); UPDATE_DEFAULT("ACTUAL_WIDTH", actual_width); + UPDATE_DEFAULT("PROXY_SCALE", proxy_scale); UPDATE_DEFAULT("PROGRAM", program); UPDATE_DEFAULT("LAYERS", layers); UPDATE_DEFAULT("FRAMERATE", frame_rate); @@ -945,9 +931,13 @@ int Asset::dump(FILE *fp) char string[BCTEXTLEN]; ilacemode_to_xmltext(string, interlace_mode); fprintf(fp," video_data %d program %d layers %d framerate %f width %d" - " height %d vcodec %4.4s aspect_ratio %f ilace_mode %s\n", + " height %d vcodec %s aspect_ratio %f ilace_mode %s\n", video_data, layers, program, frame_rate, width, height, vcodec, aspect_ratio,string); + fprintf(fp," actual_width %d actual_height %d proxy_scale %d" + " video_length %jd repeat %d\n", + actual_width, actual_height, proxy_scale, video_length, + single_frame); fprintf(fp," video_length %jd repeat %d\n", video_length, single_frame); fprintf(fp," mov_sphere=%d jpeg_sphere=%d\n", mov_sphere, jpeg_sphere); return 0;