<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 28 авг. 2024 г., 20:27 Tarantas via Cin <<a href="mailto:cin@lists.cinelerra-gg.org" rel="noreferrer noreferrer" target="_blank">cin@lists.cinelerra-gg.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 28 Aug 2024 02:35:56 +0300<br>
Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">randrianasulu@gmail.com</a>> wrote:<br>
<br>
> > - JPEG in "preferences"; <br>
> <br>
> Unfortunately, this setting controls both input and output color range<br>
> (swscaler, part of ffmpeg).<br>
<br>
By the way, do "F_" video filters works with 32-float RGB?<br>
It looks like they do, but I'm not sure.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">as far as I understand ffmpeg filters themselves does not do fp 32bit filtering ... so it converted to 16bit per channel stage buffer, see cinelerra/pluginfclient.C and function in cinelerra/ffmpeg.C</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">AVPixelFormat FFVideoConvert::color_model_to_pix_fmt(int color_model) { switch( color_model ) { case BC_YUV422: return AV_PIX_FMT_YUYV422; case BC_RGB888: return AV_PIX_FMT_RGB24; case BC_RGBA8888: return AV_PIX_FMT_RGBA; case BC_BGR8888: return AV_PIX_FMT_BGR0; case BC_BGR888: return AV_PIX_FMT_BGR24; case BC_ARGB8888: return AV_PIX_FMT_ARGB; case BC_ABGR8888: return AV_PIX_FMT_ABGR; case BC_RGB8: return AV_PIX_FMT_RGB8; case BC_YUV420P: return AV_PIX_FMT_YUV420P; case BC_YUV422P: return AV_PIX_FMT_YUV422P;</div><div dir="auto"> case BC_YUV444P: return AV_PIX_FMT_YUV444P; case BC_YUV411P: return AV_PIX_FMT_YUV411P;</div><div dir="auto"> case BC_RGB565: return AV_PIX_FMT_RGB565; case BC_RGB161616: return AV_PIX_FMT_RGB48LE; case BC_RGBA16161616: return AV_PIX_FMT_RGBA64LE; case BC_AYUV16161616: return AV_PIX_FMT_AYUV64LE; case BC_GBRP: return AV_PIX_FMT_GBRP; default: break; }</div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">and for ffmpeg's colorspace filter it advertizes</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">{ "format", "Output pixel format", OFFSET(user_format), AV_OPT_TYPE_INT, { .i64 = AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE, AV_PIX_FMT_GBRAP12LE, FLAGS, .unit = "fmt" }, ENUM("yuv420p", AV_PIX_FMT_YUV420P, "fmt"), ENUM("yuv420p10", AV_PIX_FMT_YUV420P10, "fmt"), ENUM("yuv420p12", AV_PIX_FMT_YUV420P12, "fmt"), ENUM("yuv422p", AV_PIX_FMT_YUV422P, "fmt"),</div><div dir="auto"> ENUM("yuv422p10", AV_PIX_FMT_YUV422P10, "fmt"),</div><div dir="auto"> ENUM("yuv422p12", AV_PIX_FMT_YUV422P12, "fmt"), ENUM("yuv444p", AV_PIX_FMT_YUV444P, "fmt"),</div><div dir="auto"> ENUM("yuv444p10", AV_PIX_FMT_YUV444P10, "fmt"),</div><div dir="auto"> ENUM("yuv444p12", AV_PIX_FMT_YUV444P12, "fmt"),</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">I can't see floating-point formats here ....</div><div dir="auto"><br></div><div dir="auto"> ffmpeg/libavfilter/vf_colorspace.c</div><div dir="auto"><br></div></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> So I think you need to put some kind of filter either doing full-range<br>
> -> limited range on input media, <br>
> or full range-> limited range for whole file on output ....<br>
<br>
For now figured out this way:<br>
- in render options, "color_range=mpeg";<br>
- at the top of ready project - "F_colorspace" filter.<br>
Interestingly enough the native "ColorSpace" filter doesn't work<br>
properly and cuts the dynamic range not where it supposed to. I don't<br>
know why. This deserve a bug report.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">well, file it then ?</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
But this way with the extra filter sucks. You could forgot about it and<br>
receive the result with an increased contrast. You could forgot about<br>
it being enabled and wonder why your histogram tweaking doesn't work.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">you can try to chain cingg's video output to external ffmpeg binary via y4m filetype, but then you need separate pass for audio ....</div><div dir="auto"><br></div><div dir="auto">Historically cinelerra was avoiding making decisions for users, may be partially because making everything fully automatic and working in all cases is not really trivial ?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Wait, could I just type "vf=colorspace" into render settings?..<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">never tried that ..... </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" rel="noreferrer noreferrer noreferrer" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote></div></div></div>