<div dir="ltr"><div class="gmail_default" style="font-size:small">Andras,</div><div class="gmail_default" style="font-size:small">Thank you! I am trying to learn C++ by looking at the code but mostly all I can do is copy other working parts that were patches.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 21, 2021 at 7:43 AM Reuss András via Cin <<a href="mailto:cin@lists.cinelerra-gg.org">cin@lists.cinelerra-gg.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, Phyllis,<br>
Not a real problem, here is a patch.<br>
<br>
br<br>
andras<br>
<br>
On 2021. 02. 20. 1:22, Phyllis Smith via Cin wrote:<br>
> Andrew,<br>
> I just noticed these error messages today and was hoping for a <br>
> solution as the interlace mods may not be working as you expected. <br>
> Specifically in the interlace_aspect_autodetect-12 patch that was <br>
> checked into GIT on January 18 the compiler is giving the errors:<br>
> <br>
> fileffmpeg.C: In member function ‘virtual int <br>
> FFOptionsFormatView::handle_event()’:<br>
> fileffmpeg.C:1947:24: warning: ISO C++ forbids converting a string <br>
> constant to ‘char*’ [-Wwrite-strings]<br>
> 1947 | char *replace_name0 = "mov";<br>
> | ^~~~~<br>
> fileffmpeg.C:1948:24: warning: ISO C++ forbids converting a string <br>
> constant to ‘char*’ [-Wwrite-strings]<br>
> 1948 | char *replace_name1 = "mpegts";<br>
> | ^~~~~~~~<br>
> fileffmpeg.C:1949:24: warning: ISO C++ forbids converting a string <br>
> constant to ‘char*’ [-Wwrite-strings]<br>
> 1949 | char *replace_name2 = "matroska";<br>
> <br>
> _The patch code was:_<br>
> --- a/cinelerra-5.1/cinelerra/fileffmpeg.C<br>
> +++ b/cinelerra-5.1/cinelerra/fileffmpeg.C<br>
> @@ -326,7 +326,7 @@ int FileFFMPEG::open_file(int rd, int wr)<br>
> int result = 0;<br>
> if( ff ) return 1;<br>
> ff = new FFMPEG(this);<br>
> ...<br>
> @@ -1938,6 +1943,15 @@ int FFOptionsFormatView::handle_event()<br>
> {<br>
> Asset *asset = fmt_config->asset;<br>
> char *format_name = asset->fformat;<br>
> *+ char *replace_name0 = "mov";<br>
> + char *replace_name1 = "mpegts";<br>
> + char *replace_name2 = "matroska";*<br>
> + if (!strcmp(format_name, "qt"))<br>
> <br>
> On Wed, Nov 18, 2020 at 9:49 AM Andrew Randrianasulu via Cin <br>
> <<a href="mailto:cin@lists.cinelerra-gg.org" target="_blank">cin@lists.cinelerra-gg.org</a> <mailto:<a href="mailto:cin@lists.cinelerra-gg.org" target="_blank">cin@lists.cinelerra-gg.org</a>>> wrote:<br>
> <br>
> So, I grep'ed ffmpeg-4.3 sources and apparently thise falgs<br>
> consumed by few encoders outside of mpeg2/4:<br>
> <br>
> guest@slax:/dev/shm/cinelerra/cinelerra-5.1/cinelerra$ grep<br>
> 'AV_CODEC_FLAG_INTERLACED_DCT' ../thirdparty/ffmpeg-4.3/libav<br>
> libavcodec/ libavdevice/ libavfilter/ libavformat/ <br>
> libavresample/ libavutil/<br>
> guest@slax:/dev/shm/cinelerra/cinelerra-5.1/cinelerra$ grep<br>
> 'AV_CODEC_FLAG_INTERLACED_DCT'<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/*.c<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/cuviddec.c: <br>
> avctx->flags |= AV_CODEC_FLAG_INTERLACED_DCT;<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/cuviddec.c: <br>
> avctx->flags &= ~AV_CODEC_FLAG_INTERLACED_DCT;<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/dnxhddata.c: <br>
> interlaced == !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) &&<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/dnxhdenc.c: if<br>
> (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/dvenc.c: if<br>
> (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/libx264.c: <br>
> x4->params.b_interlaced = avctx->flags &<br>
> AV_CODEC_FLAG_INTERLACED_DCT;<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/libxavs.c: <br>
> x4->params.b_interlaced = avctx->flags &<br>
> AV_CODEC_FLAG_INTERLACED_DCT;<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if<br>
> ((s->avctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT |<br>
> AV_CODEC_FLAG_INTERLACED_ME)) &&<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: <br>
> s->progressive_sequence = !(avctx->flags &<br>
> (AV_CODEC_FLAG_INTERLACED_DCT |<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if<br>
> (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if<br>
> (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/nvenc.c: if (ret < 1 &&<br>
> avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/nvenc.c: if (avctx->flags<br>
> & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/nvenc.c: if<br>
> (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/pngenc.c: <br>
> s->is_progressive = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/proresenc_anatoliy.c: <br>
> ctx->is_interlaced = !!(avctx->flags &<br>
> AV_CODEC_FLAG_INTERLACED_DCT);<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/proresenc_kostya.c: if<br>
> (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT)<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/proresenc_kostya.c: int<br>
> interlaced = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/qsvenc.c: if<br>
> (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
> guest@slax:/dev/shm/cinelerra/cinelerra-5.1/cinelerra$ grep<br>
> 'AV_CODEC_FLAG_INTERLACED_ME'<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/*.c<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/huffyuvenc.c: <br>
> s->interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_ME ? 1 : 0;<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/motion_est.c: if<br>
> ((s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/motion_est.c: if<br>
> ((s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/motion_est.c: if<br>
> (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo.c: <br>
> (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if<br>
> ((s->avctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT |<br>
> AV_CODEC_FLAG_INTERLACED_ME)) &&<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: <br>
> AV_CODEC_FLAG_INTERLACED_ME) ||<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: <br>
> if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: <br>
> if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {<br>
> ../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: <br>
> if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {<br>
> <br>
> <br>
> So, reworked this section again ... basically only excluding<br>
> mjpeg codec case from setting those flags, instead of<br>
> whilelisting mpeg2/4 only<br>
> <br>
> Strangely ffv1/avi shows interlace (with my patch) if source was<br>
> Top Field First and not showing it if source was Bottom Field<br>
> First ..:/<br>
> <br>
> dv file re-encoded as dv_ntsc.avi shows bff correctly, it seems.<br>
> mp4 container with h264 also gets it right now ....<br>
> mpeg2 works (but not sure if field order correct or now ..I'm<br>
> confused by ffmpeg source :/)<br>
> mkv seems to work (but it was working before)<br>
> <br>
> <a href="https://cloud.mail.ru/public/5AM1/275yC576u" rel="noreferrer" target="_blank">https://cloud.mail.ru/public/5AM1/275yC576u</a><br>
> <<a href="https://cloud.mail.ru/public/5AM1/275yC576u" rel="noreferrer" target="_blank">https://cloud.mail.ru/public/5AM1/275yC576u</a>><br>
> <br>
> How to test those 'tb/bb/tt/bt' cases? There must be some <br>
> artificial picture clearly showing if I did it wrong ..Not found<br>
> it yet.<br>
> <br>
> <br>
> <br>
> <br>
> -- <br>
> Cin mailing list<br>
> <a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a> <mailto:<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a>><br>
> <a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
> <<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a>><br>
> <br>
> <br>
<br>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote></div>