From 41153d27bc445f26b307f48dc81a8b476ae02c0c Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Sun, 21 Apr 2024 17:18:21 +0200 Subject: [PATCH] in graphs give an option to set the color of the plot and the thickness #821 --- Source/Core/AudioCore.cpp | 34 +++++----- Source/Core/Core.h | 2 + Source/Core/VideoCore.cpp | 138 +++++++++++++++++++------------------- Source/GUI/Plot.cpp | 17 +++-- 4 files changed, 101 insertions(+), 90 deletions(-) diff --git a/Source/Core/AudioCore.cpp b/Source/Core/AudioCore.cpp index 227acddb1..7b60c1696 100644 --- a/Source/Core/AudioCore.cpp +++ b/Source/Core/AudioCore.cpp @@ -92,23 +92,23 @@ struct per_group AudioPerGroup [Group_AudioMax]= const struct per_item AudioPerItem [Item_AudioMax]= { //Y - { Group_R128, Group_AudioMax, "EBU R128 Momentary\nloudness","lavfi.r128.M", 3, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_EbuR128 }, - { Group_aphasemeter, Group_AudioMax, "Audio Phase", "lavfi.aphasemeter.phase", 3, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_aphasemeter }, - { Group_astats_dc, Group_AudioMax, "Audio DC Offset", "lavfi.astats.Overall.DC_offset", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_levels,Group_AudioMax, "Audio Min Level", "lavfi.astats.Overall.Min_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_levels,Group_AudioMax, "Audio Max Level", "lavfi.astats.Overall.Max_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_lvlchs,Group_AudioMax, "Audio Min Level (Ch2)", "lavfi.astats.2.Min_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_lvlchs,Group_AudioMax, "Audio Max Level (Ch2)", "lavfi.astats.2.Max_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_lvlchs,Group_AudioMax, "Audio Min Level (Ch1)", "lavfi.astats.1.Min_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_lvlchs,Group_AudioMax, "Audio Max Level (Ch1)", "lavfi.astats.1.Max_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_zeros, Group_AudioMax, "Audio Zero\nCrossing (ch 2)", "lavfi.astats.2.Zero_crossings_rate", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_zeros, Group_AudioMax, "Audio Zero\nCrossing (ch 1)", "lavfi.astats.1.Zero_crossings_rate", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_adif, Group_AudioMax, "Difference Min", "lavfi.astats.Overall.Min_difference", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_adif, Group_AudioMax, "Difference Max", "lavfi.astats.Overall.Max_difference", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_adif, Group_AudioMax, "Difference Mean", "lavfi.astats.Overall.Mean_difference", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_RMS, Group_AudioMax, "Peak Level", "lavfi.astats.Overall.Peak_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_RMS, Group_AudioMax, "RMS Peak", "lavfi.astats.Overall.RMS_peak", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, - { Group_astats_RMS, Group_AudioMax, "RMS Trough", "lavfi.astats.Overall.RMS_trough", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats }, + { Group_R128, Group_AudioMax, "EBU R128 Momentary\nloudness","lavfi.r128.M", 3, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_EbuR128, nullptr, -1 }, + { Group_aphasemeter, Group_AudioMax, "Audio Phase", "lavfi.aphasemeter.phase", 3, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_aphasemeter, nullptr, -1 }, + { Group_astats_dc, Group_AudioMax, "Audio DC Offset", "lavfi.astats.Overall.DC_offset", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_levels,Group_AudioMax, "Audio Min Level", "lavfi.astats.Overall.Min_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_levels,Group_AudioMax, "Audio Max Level", "lavfi.astats.Overall.Max_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_lvlchs,Group_AudioMax, "Audio Min Level (Ch2)", "lavfi.astats.2.Min_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_lvlchs,Group_AudioMax, "Audio Max Level (Ch2)", "lavfi.astats.2.Max_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_lvlchs,Group_AudioMax, "Audio Min Level (Ch1)", "lavfi.astats.1.Min_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_lvlchs,Group_AudioMax, "Audio Max Level (Ch1)", "lavfi.astats.1.Max_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_zeros, Group_AudioMax, "Audio Zero\nCrossing (ch 2)", "lavfi.astats.2.Zero_crossings_rate", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_zeros, Group_AudioMax, "Audio Zero\nCrossing (ch 1)", "lavfi.astats.1.Zero_crossings_rate", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_adif, Group_AudioMax, "Difference Min", "lavfi.astats.Overall.Min_difference", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_adif, Group_AudioMax, "Difference Max", "lavfi.astats.Overall.Max_difference", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_adif, Group_AudioMax, "Difference Mean", "lavfi.astats.Overall.Mean_difference", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_RMS, Group_AudioMax, "Peak Level", "lavfi.astats.Overall.Peak_level", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_RMS, Group_AudioMax, "RMS Peak", "lavfi.astats.Overall.RMS_peak", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, + { Group_astats_RMS, Group_AudioMax, "RMS Trough", "lavfi.astats.Overall.RMS_trough", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Audio_astats, nullptr, -1 }, //{ Group_R128, Group_AudioMax, "R128.S", "lavfi.r128.S", 0, false, DBL_MAX, DBL_MAX }, //{ Group_R128, Group_AudioMax, "R128.I", "lavfi.r128.I", 0, true, DBL_MAX, DBL_MAX }, //U diff --git a/Source/Core/Core.h b/Source/Core/Core.h index 3ea87cb0e..53644fe8a 100755 --- a/Source/Core/Core.h +++ b/Source/Core/Core.h @@ -63,6 +63,8 @@ struct per_item const double DefaultLimit; const double DefaultLimit2; const activefilter Filter; + const char* color; + const int thickness; }; struct stream_info diff --git a/Source/Core/VideoCore.cpp b/Source/Core/VideoCore.cpp index 5e62e0946..6602ea8be 100644 --- a/Source/Core/VideoCore.cpp +++ b/Source/Core/VideoCore.cpp @@ -271,94 +271,94 @@ struct per_group VideoPerGroup [Group_VideoMax]= const struct per_item VideoPerItem [Item_VideoMax]= { //Y - { Group_Y, Group_VideoMax, "Y MIN", "lavfi.signalstats.YMIN", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Y, Group_VideoMax, "Y LOW", "lavfi.signalstats.YLOW", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Y, Group_VideoMax, "Y AVG", "lavfi.signalstats.YAVG", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Y, Group_VideoMax, "Y HIGH", "lavfi.signalstats.YHIGH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Y, Group_VideoMax, "Y MAX", "lavfi.signalstats.YMAX", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, + { Group_Y, Group_VideoMax, "Y MIN", "lavfi.signalstats.YMIN", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, "gray", 1 }, + { Group_Y, Group_VideoMax, "Y LOW", "lavfi.signalstats.YLOW", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, "green", 2 }, + { Group_Y, Group_VideoMax, "Y AVG", "lavfi.signalstats.YAVG", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, "yellow", 3 }, + { Group_Y, Group_VideoMax, "Y HIGH", "lavfi.signalstats.YHIGH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_Y, Group_VideoMax, "Y MAX", "lavfi.signalstats.YMAX", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, //U - { Group_U, Group_VideoMax, "U MIN", "lavfi.signalstats.UMIN", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_U, Group_VideoMax, "U LOW", "lavfi.signalstats.ULOW", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_U, Group_VideoMax, "U AVG", "lavfi.signalstats.UAVG", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_U, Group_VideoMax, "U HIGH", "lavfi.signalstats.UHIGH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_U, Group_VideoMax, "U MAX", "lavfi.signalstats.UMAX", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, + { Group_U, Group_VideoMax, "U MIN", "lavfi.signalstats.UMIN", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_U, Group_VideoMax, "U LOW", "lavfi.signalstats.ULOW", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_U, Group_VideoMax, "U AVG", "lavfi.signalstats.UAVG", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_U, Group_VideoMax, "U HIGH", "lavfi.signalstats.UHIGH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_U, Group_VideoMax, "U MAX", "lavfi.signalstats.UMAX", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, //V - { Group_V, Group_VideoMax, "V MIN", "lavfi.signalstats.VMIN", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_V, Group_VideoMax, "V LOW", "lavfi.signalstats.VLOW", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_V, Group_VideoMax, "V AVG", "lavfi.signalstats.VAVG", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_V, Group_VideoMax, "V HIGH", "lavfi.signalstats.VHIGH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_V, Group_VideoMax, "V MAX", "lavfi.signalstats.VMAX", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, + { Group_V, Group_VideoMax, "V MIN", "lavfi.signalstats.VMIN", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_V, Group_VideoMax, "V LOW", "lavfi.signalstats.VLOW", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_V, Group_VideoMax, "V AVG", "lavfi.signalstats.VAVG", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_V, Group_VideoMax, "V HIGH", "lavfi.signalstats.VHIGH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_V, Group_VideoMax, "V MAX", "lavfi.signalstats.VMAX", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, //Diffs - { Group_VDiff, Group_Diffs, "V DIF", "lavfi.signalstats.VDIF", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_UDiff, Group_Diffs, "U DIF", "lavfi.signalstats.UDIF", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_YDiff, Group_Diffs, "Y DIF", "lavfi.signalstats.YDIF", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, + { Group_VDiff, Group_Diffs, "V DIF", "lavfi.signalstats.VDIF", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_UDiff, Group_Diffs, "U DIF", "lavfi.signalstats.UDIF", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_YDiff, Group_Diffs, "Y DIF", "lavfi.signalstats.YDIF", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, //Sat - { Group_Sat, Group_VideoMax, "SAT MIN", "lavfi.signalstats.SATMIN", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Sat, Group_VideoMax, "SAT LOW", "lavfi.signalstats.SATLOW", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Sat, Group_VideoMax, "SAT AVG", "lavfi.signalstats.SATAVG", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Sat, Group_VideoMax, "SAT HIGH", "lavfi.signalstats.SATHIGH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Sat, Group_VideoMax, "SAT MAX", "lavfi.signalstats.SATMAX", 0, true, 88.7, 118.2, ActiveFilter_Video_signalstats }, + { Group_Sat, Group_VideoMax, "SAT MIN", "lavfi.signalstats.SATMIN", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_Sat, Group_VideoMax, "SAT LOW", "lavfi.signalstats.SATLOW", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_Sat, Group_VideoMax, "SAT AVG", "lavfi.signalstats.SATAVG", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_Sat, Group_VideoMax, "SAT HIGH", "lavfi.signalstats.SATHIGH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_Sat, Group_VideoMax, "SAT MAX", "lavfi.signalstats.SATMAX", 0, true, 88.7, 118.2, ActiveFilter_Video_signalstats, nullptr, -1 }, //Hue - { Group_Hue, Group_VideoMax, "HUE MED", "lavfi.signalstats.HUEMED", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_Hue, Group_VideoMax, "HUE AVG", "lavfi.signalstats.HUEAVG", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, + { Group_Hue, Group_VideoMax, "HUE MED", "lavfi.signalstats.HUEMED", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_Hue, Group_VideoMax, "HUE AVG", "lavfi.signalstats.HUEAVG", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, //Others - { Group_TOUT, Group_VideoMax, "TOUT", "lavfi.signalstats.TOUT", 8, false, 0.005, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_VREP, Group_VideoMax, "VREP", "lavfi.signalstats.VREP", 8, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_BRNG, Group_VideoMax, "BRNG", "lavfi.signalstats.BRNG", 8, true, 0.05, DBL_MAX, ActiveFilter_Video_signalstats }, + { Group_TOUT, Group_VideoMax, "TOUT", "lavfi.signalstats.TOUT", 8, false, 0.005, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_VREP, Group_VideoMax, "VREP", "lavfi.signalstats.VREP", 8, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_BRNG, Group_VideoMax, "BRNG", "lavfi.signalstats.BRNG", 8, true, 0.05, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, //Bitdepths - { Group_YUVB, Group_VideoMax, "V Active Bits", "lavfi.signalstats.VBITDEPTH", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_YUVB, Group_VideoMax, "U Active Bits", "lavfi.signalstats.UBITDEPTH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, - { Group_YUVB, Group_VideoMax, "Y Active Bits", "lavfi.signalstats.YBITDEPTH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats }, + { Group_YUVB, Group_VideoMax, "V Active Bits", "lavfi.signalstats.VBITDEPTH", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_YUVB, Group_VideoMax, "U Active Bits", "lavfi.signalstats.UBITDEPTH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, + { Group_YUVB, Group_VideoMax, "Y Active Bits", "lavfi.signalstats.YBITDEPTH", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_signalstats, nullptr, -1 }, //Crop - { Group_CropW, Group_VideoMax, "Crop Left", "lavfi.cropdetect.x1", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect }, - { Group_CropW, Group_VideoMax, "Crop Right", "lavfi.cropdetect.x2", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect }, - { Group_CropH, Group_VideoMax, "Crop Top", "lavfi.cropdetect.y1", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect }, - { Group_CropH, Group_VideoMax, "Crop Bottom", "lavfi.cropdetect.y2", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect }, - { Group_CropF, Group_VideoMax, "Crop Width", "lavfi.cropdetect.w", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect }, - { Group_CropF, Group_VideoMax, "Crop Height", "lavfi.cropdetect.h", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect }, + { Group_CropW, Group_VideoMax, "Crop Left", "lavfi.cropdetect.x1", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect, nullptr, -1 }, + { Group_CropW, Group_VideoMax, "Crop Right", "lavfi.cropdetect.x2", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect, nullptr, -1 }, + { Group_CropH, Group_VideoMax, "Crop Top", "lavfi.cropdetect.y1", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect, nullptr, -1 }, + { Group_CropH, Group_VideoMax, "Crop Bottom", "lavfi.cropdetect.y2", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect, nullptr, -1 }, + { Group_CropF, Group_VideoMax, "Crop Width", "lavfi.cropdetect.w", 0, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect, nullptr, -1 }, + { Group_CropF, Group_VideoMax, "Crop Height", "lavfi.cropdetect.h", 0, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_cropdetect, nullptr, -1 }, //MSEf - { Group_MSE, Group_VideoMax, "MSEf V", "lavfi.psnr.mse.v", 2, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr }, - { Group_MSE, Group_VideoMax, "MSEf U", "lavfi.psnr.mse.u", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr }, - { Group_MSE, Group_VideoMax, "MSEf Y", "lavfi.psnr.mse.y", 2, false, 1000, DBL_MAX, ActiveFilter_Video_Psnr }, + { Group_MSE, Group_VideoMax, "MSEf V", "lavfi.psnr.mse.v", 2, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr, nullptr, -1 }, + { Group_MSE, Group_VideoMax, "MSEf U", "lavfi.psnr.mse.u", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr, nullptr, -1 }, + { Group_MSE, Group_VideoMax, "MSEf Y", "lavfi.psnr.mse.y", 2, false, 1000, DBL_MAX, ActiveFilter_Video_Psnr, nullptr, -1 }, //PSNRf - { Group_PSNR, Group_VideoMax, "PSNRf V", "lavfi.psnr.psnr.v", 2, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr }, - { Group_PSNR, Group_VideoMax, "PSNRf U", "lavfi.psnr.psnr.u", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr }, - { Group_PSNR, Group_VideoMax, "PSNRf Y", "lavfi.psnr.psnr.y", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr }, + { Group_PSNR, Group_VideoMax, "PSNRf V", "lavfi.psnr.psnr.v", 2, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr, nullptr, -1 }, + { Group_PSNR, Group_VideoMax, "PSNRf U", "lavfi.psnr.psnr.u", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr, nullptr, -1 }, + { Group_PSNR, Group_VideoMax, "PSNRf Y", "lavfi.psnr.psnr.y", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Psnr, nullptr, -1 }, //SSIMf - { Group_SSIM, Group_VideoMax, "SSIMf All", "lavfi.ssim.All", 2, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_Ssim }, - { Group_SSIM, Group_VideoMax, "SSIMf V", "lavfi.ssim.V", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Ssim }, - { Group_SSIM, Group_VideoMax, "SSIMf U", "lavfi.ssim.U", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Ssim }, - { Group_SSIM, Group_VideoMax, "SSIMf Y", "lavfi.ssim.Y", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Ssim }, + { Group_SSIM, Group_VideoMax, "SSIMf All", "lavfi.ssim.All", 2, true, DBL_MAX, DBL_MAX, ActiveFilter_Video_Ssim, nullptr, -1 }, + { Group_SSIM, Group_VideoMax, "SSIMf V", "lavfi.ssim.V", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Ssim, nullptr, -1 }, + { Group_SSIM, Group_VideoMax, "SSIMf U", "lavfi.ssim.U", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Ssim, nullptr, -1 }, + { Group_SSIM, Group_VideoMax, "SSIMf Y", "lavfi.ssim.Y", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Ssim, nullptr, -1 }, //IDET.single - { Group_IDET_S, Group_VideoMax, "s.bff", "lavfi.idet.single.bff", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, - { Group_IDET_S, Group_VideoMax, "s.tff", "lavfi.idet.single.tff", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, - { Group_IDET_S, Group_VideoMax, "s.prog", "lavfi.idet.single.progressive", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, - { Group_IDET_S, Group_VideoMax, "s.und", "lavfi.idet.single.undetermined", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, + { Group_IDET_S, Group_VideoMax, "s.bff", "lavfi.idet.single.bff", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, + { Group_IDET_S, Group_VideoMax, "s.tff", "lavfi.idet.single.tff", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, + { Group_IDET_S, Group_VideoMax, "s.prog", "lavfi.idet.single.progressive", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, + { Group_IDET_S, Group_VideoMax, "s.und", "lavfi.idet.single.undetermined", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, //IDET.multiple - { Group_IDET_M, Group_VideoMax, "m.bff", "lavfi.idet.multiple.bff", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, - { Group_IDET_M, Group_VideoMax, "m.tff", "lavfi.idet.multiple.tff", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, - { Group_IDET_M, Group_VideoMax, "m.prog", "lavfi.idet.multiple.progressive", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, - { Group_IDET_M, Group_VideoMax, "m.und", "lavfi.idet.multiple.undetermined", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, + { Group_IDET_M, Group_VideoMax, "m.bff", "lavfi.idet.multiple.bff", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, + { Group_IDET_M, Group_VideoMax, "m.tff", "lavfi.idet.multiple.tff", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, + { Group_IDET_M, Group_VideoMax, "m.prog", "lavfi.idet.multiple.progressive", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, + { Group_IDET_M, Group_VideoMax, "m.und", "lavfi.idet.multiple.undetermined", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, //IDET.repeat - { Group_IDET_R, Group_VideoMax, "bottom", "lavfi.idet.repeated.bottom", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, - { Group_IDET_R, Group_VideoMax, "top", "lavfi.idet.repeated.top", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, - { Group_IDET_R, Group_VideoMax, "neither", "lavfi.idet.repeated.neither", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet }, + { Group_IDET_R, Group_VideoMax, "bottom", "lavfi.idet.repeated.bottom", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, + { Group_IDET_R, Group_VideoMax, "top", "lavfi.idet.repeated.top", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, + { Group_IDET_R, Group_VideoMax, "neither", "lavfi.idet.repeated.neither", 2, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Idet, nullptr, -1 }, //DEFL - { Group_DEFL, Group_VideoMax, "flicker", "lavfi.deflicker.relative_change", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Deflicker }, + { Group_DEFL, Group_VideoMax, "flicker", "lavfi.deflicker.relative_change", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Deflicker, nullptr, -1 }, //ENTR - { Group_ENTR, Group_VideoMax, "V ENT", "lavfi.entropy.normalized_entropy.normal.V", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Entropy }, - { Group_ENTR, Group_VideoMax, "U ENT", "lavfi.entropy.normalized_entropy.normal.U", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Entropy }, - { Group_ENTR, Group_VideoMax, "Y ENT", "lavfi.entropy.normalized_entropy.normal.Y", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Entropy }, + { Group_ENTR, Group_VideoMax, "V ENT", "lavfi.entropy.normalized_entropy.normal.V", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Entropy, nullptr, -1 }, + { Group_ENTR, Group_VideoMax, "U ENT", "lavfi.entropy.normalized_entropy.normal.U", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Entropy, nullptr, -1 }, + { Group_ENTR, Group_VideoMax, "Y ENT", "lavfi.entropy.normalized_entropy.normal.Y", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_Entropy, nullptr, -1 }, //ENTR-DIFF - { Group_ENTRD, Group_VideoMax, "V ENT DIF", "lavfi.entropy.normalized_entropy.diff.V", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_EntropyDiff }, - { Group_ENTRD, Group_VideoMax, "U ENT DIF", "lavfi.entropy.normalized_entropy.diff.U", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_EntropyDiff }, - { Group_ENTRD, Group_VideoMax, "Y ENT DIF", "lavfi.entropy.normalized_entropy.diff.Y", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_EntropyDiff }, + { Group_ENTRD, Group_VideoMax, "V ENT DIF", "lavfi.entropy.normalized_entropy.diff.V", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_EntropyDiff, nullptr, -1 }, + { Group_ENTRD, Group_VideoMax, "U ENT DIF", "lavfi.entropy.normalized_entropy.diff.U", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_EntropyDiff, nullptr, -1 }, + { Group_ENTRD, Group_VideoMax, "Y ENT DIF", "lavfi.entropy.normalized_entropy.diff.Y", 5, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_EntropyDiff, nullptr, -1 }, // pkt_duration_time & pkt_size - { Group_pkt_duration_time, Group_VideoMax, "pkt_duration_time", "pkt_duration_time", 5, false, DBL_MAX, DBL_MAX, (activefilter) -1 }, - { Group_pkt_size, Group_VideoMax, "pkt_size", "pkt_size", 0, false, DBL_MAX, DBL_MAX, (activefilter) -1 }, + { Group_pkt_duration_time, Group_VideoMax, "pkt_duration_time", "pkt_duration_time", 5, false, DBL_MAX, DBL_MAX, (activefilter) -1, nullptr, -1 }, + { Group_pkt_size, Group_VideoMax, "pkt_size", "pkt_size", 0, false, DBL_MAX, DBL_MAX, (activefilter) -1, nullptr, -1 }, // block and blur detections - { Group_blockdetect, Group_VideoMax, "blockiness", "lavfi.block", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_blockdetect }, - { Group_blurdetect, Group_VideoMax, "blurriness", "lavfi.blur", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_blurdetect }, + { Group_blockdetect, Group_VideoMax, "blockiness", "lavfi.block", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_blockdetect, nullptr, -1 }, + { Group_blurdetect, Group_VideoMax, "blurriness", "lavfi.blur", 6, false, DBL_MAX, DBL_MAX, ActiveFilter_Video_blurdetect, nullptr, -1 }, // const std::size_t Group1; //Group // const std::size_t Group2; //Group diff --git a/Source/GUI/Plot.cpp b/Source/GUI/Plot.cpp index d7fad43f8..b94e10d2a 100644 --- a/Source/GUI/Plot.cpp +++ b/Source/GUI/Plot.cpp @@ -509,17 +509,26 @@ Plot::Plot( size_t streamPos, size_t Type, size_t Group, const FileInformation* for( unsigned j = 0; j < PerStreamType[m_type].PerGroup[m_group].Count; ++j ) { - PlotCurve* curve = new PlotCurve( PerStreamType[m_type].PerItem[PerStreamType[m_type].PerGroup[m_group].Start + j].Name ); + auto item = PerStreamType[m_type].PerItem[PerStreamType[m_type].PerGroup[m_group].Start + j]; + PlotCurve* curve = new PlotCurve( item.Name ); + QColor color = curveColor(j); + int thickness = 0; + switch (m_group) { case Group_IDET_S : case Group_IDET_M : case Group_IDET_R : - curve->setPen( curveColor( j ), 2 ); + thickness = 2; break; - default : - curve->setPen( curveColor( j ) ); } + + if(item.color && *item.color) + color = QColor(item.color); + if(item.thickness > -1) + thickness = item.thickness; + + curve->setPen(color, thickness); curve->setRenderHint( QwtPlotItem::RenderAntialiased ); curve->setZ( curve->z() - j ); //Invert data order (e.g. MAX before MIN) curve->setIndex(j, PerStreamType[m_type].PerGroup[m_group].Count);