<div dir="ltr"><div class="gmail_default" style="font-size:small">Andrew,</div><div class="gmail_default" style="font-size:small">I just noticed these error messages today and was hoping for a solution as the interlace mods may not be working as you expected. Specifically in the interlace_aspect_autodetect-12 patch that was checked into GIT on January 18 the compiler is giving the errors:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace">fileffmpeg.C: In member function ‘virtual int FFOptionsFormatView::handle_event()’:<br>fileffmpeg.C:1947:24: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]<br> 1947 | char *replace_name0 = "mov";<br> | ^~~~~<br>fileffmpeg.C:1948:24: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]<br> 1948 | char *replace_name1 = "mpegts";<br> | ^~~~~~~~<br>fileffmpeg.C:1949:24: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]<br> 1949 | char *replace_name2 = "matroska";</span><br></div><div class="gmail_default" style="font-size:small"><br> </div><div class="gmail_default" style="font-size:small"><u>The patch code was:</u></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace">--- 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>...</span></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace">@@ -1938,6 +1943,15 @@ int FFOptionsFormatView::handle_event()</span></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace"> {<br></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace"> Asset *asset = fmt_config->asset;<br> char *format_name = asset->fformat;<br><b>+ char *replace_name0 = "mov";<br>+ char *replace_name1 = "mpegts";<br>+ char *replace_name2 = "matroska";</b><br>+ if (!strcmp(format_name, "qt"))</span><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 18, 2020 at 9:49 AM Andrew Randrianasulu 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">So, I grep'ed ffmpeg-4.3 sources and apparently thise falgs consumed by few encoders outside of mpeg2/4:<br>
<br>
guest@slax:/dev/shm/cinelerra/cinelerra-5.1/cinelerra$ grep 'AV_CODEC_FLAG_INTERLACED_DCT' ../thirdparty/ffmpeg-4.3/libav<br>
libavcodec/ libavdevice/ libavfilter/ libavformat/ libavresample/ libavutil/<br>
guest@slax:/dev/shm/cinelerra/cinelerra-5.1/cinelerra$ grep 'AV_CODEC_FLAG_INTERLACED_DCT' ../thirdparty/ffmpeg-4.3/libavcodec/*.c<br>
../thirdparty/ffmpeg-4.3/libavcodec/cuviddec.c: avctx->flags |= AV_CODEC_FLAG_INTERLACED_DCT;<br>
../thirdparty/ffmpeg-4.3/libavcodec/cuviddec.c: avctx->flags &= ~AV_CODEC_FLAG_INTERLACED_DCT;<br>
../thirdparty/ffmpeg-4.3/libavcodec/dnxhddata.c: interlaced == !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) &&<br>
../thirdparty/ffmpeg-4.3/libavcodec/dnxhdenc.c: if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/dvenc.c: if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/libx264.c: x4->params.b_interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT;<br>
../thirdparty/ffmpeg-4.3/libavcodec/libxavs.c: x4->params.b_interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT;<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if ((s->avctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME)) &&<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: s->progressive_sequence = !(avctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT |<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/nvenc.c: if (ret < 1 && avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/nvenc.c: if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/nvenc.c: if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/pngenc.c: s->is_progressive = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);<br>
../thirdparty/ffmpeg-4.3/libavcodec/proresenc_anatoliy.c: ctx->is_interlaced = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);<br>
../thirdparty/ffmpeg-4.3/libavcodec/proresenc_kostya.c: if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT)<br>
../thirdparty/ffmpeg-4.3/libavcodec/proresenc_kostya.c: int interlaced = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);<br>
../thirdparty/ffmpeg-4.3/libavcodec/qsvenc.c: if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {<br>
guest@slax:/dev/shm/cinelerra/cinelerra-5.1/cinelerra$ grep 'AV_CODEC_FLAG_INTERLACED_ME' ../thirdparty/ffmpeg-4.3/libavcodec/*.c<br>
../thirdparty/ffmpeg-4.3/libavcodec/huffyuvenc.c: s->interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_ME ? 1 : 0;<br>
../thirdparty/ffmpeg-4.3/libavcodec/motion_est.c: if ((s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)<br>
../thirdparty/ffmpeg-4.3/libavcodec/motion_est.c: if ((s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)<br>
../thirdparty/ffmpeg-4.3/libavcodec/motion_est.c: if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo.c: (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if ((s->avctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME)) &&<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: AV_CODEC_FLAG_INTERLACED_ME) ||<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {<br>
../thirdparty/ffmpeg-4.3/libavcodec/mpegvideo_enc.c: if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {<br>
<br>
<br>
So, reworked this section again ... basically only excluding mjpeg codec case from setting those flags, instead of whilelisting mpeg2/4 only<br>
<br>
Strangely ffv1/avi shows interlace (with my patch) if source was Top Field First and not showing it if source was Bottom Field 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 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>
<br>
How to test those 'tb/bb/tt/bt' cases? There must be some artificial picture clearly showing if I did it wrong ..Not found 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><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>