* [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties @ 2022-02-08 11:02 Stephen Hutchinson 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 1/3] avisynth: corrected interlace detection Stephen Hutchinson ` (3 more replies) 0 siblings, 4 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-08 11:02 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Stephen Hutchinson AviSynth+ 3.6.0 introduced support for frame properties, allowing various metadata to be passed between filters or read out by client programs. Using this, FFmpeg can read Color Range, Transfer Characteristics, Matrix, Color Primaries, Chroma Location, and Field Order information from AviSynth scripts. Reading frame properties through AviSynth's C interface was not possible until a few months ago, though, so client programs that use the C API need version 3.7.1 or higher to be able to take advantage of it. Incorporates a previous patch by emcodem that fixes setting field order on non-frameprop-aware versions of AviSynth. Stephen Hutchinson (2): avisynth: use AviSynth+'s frame properties to set various fields configure: check avisynth header version emcodem (1): avisynth: corrected interlace detection configure | 4 +- libavformat/avisynth.c | 266 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 253 insertions(+), 17 deletions(-) -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* [FFmpeg-devel] [PATCH 1/3] avisynth: corrected interlace detection 2022-02-08 11:02 [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson @ 2022-02-08 11:02 ` Stephen Hutchinson 2022-02-13 23:33 ` Stephen Hutchinson 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson ` (2 subsequent siblings) 3 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-08 11:02 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Stephen Hutchinson, emcodem From: emcodem <emcodem@ffastrans.com> AviSynth works on frame-based video by default, which can be either progressive or interlaced. Some filters can break frames into half-height fields, at which point it considers the clip to be field-based (avs_is_field_based can be used to check for this situation). To properly detect the field order of a typical video clip, the frame needs to have been weaved back together already, so avs_is_field_based should actually report 'false' when checked. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> --- libavformat/avisynth.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 350ac6d11d..1e862a6a85 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -250,15 +250,12 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) st->nb_frames = avs->vi->num_frames; avpriv_set_pts_info(st, 32, avs->vi->fps_denominator, avs->vi->fps_numerator); - av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); - av_log(s, AV_LOG_TRACE, "avs_is_parity_known: %d\n", avs_is_parity_known(avs->vi)); - /* The following typically only works when assumetff (-bff) and - * assumefieldbased is used in-script. Additional - * logic using GetParity() could deliver more accurate results - * but also decodes a frame which we want to avoid. */ st->codecpar->field_order = AV_FIELD_UNKNOWN; - if (avs_is_field_based(avs->vi)) { + /* AviSynth works with frame-based video, detecting field order can + * only work when avs_is_field_based returns 'false'. */ + av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); + if (avs_is_field_based(avs->vi) == 0) { if (avs_is_tff(avs->vi)) { st->codecpar->field_order = AV_FIELD_TT; } -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] avisynth: corrected interlace detection 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 1/3] avisynth: corrected interlace detection Stephen Hutchinson @ 2022-02-13 23:33 ` Stephen Hutchinson 0 siblings, 0 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-13 23:33 UTC (permalink / raw) To: ffmpeg-devel; +Cc: emcodem On 2/8/22 6:02 AM, Stephen Hutchinson wrote: > From: emcodem <emcodem@ffastrans.com> > > AviSynth works on frame-based video by default, which can > be either progressive or interlaced. Some filters can break > frames into half-height fields, at which point it considers > the clip to be field-based (avs_is_field_based can be used > to check for this situation). > > To properly detect the field order of a typical video clip, > the frame needs to have been weaved back together already, > so avs_is_field_based should actually report 'false' when > checked. > > Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > --- > libavformat/avisynth.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c > index 350ac6d11d..1e862a6a85 100644 > --- a/libavformat/avisynth.c > +++ b/libavformat/avisynth.c > @@ -250,15 +250,12 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > st->nb_frames = avs->vi->num_frames; > avpriv_set_pts_info(st, 32, avs->vi->fps_denominator, avs->vi->fps_numerator); > > - av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); > - av_log(s, AV_LOG_TRACE, "avs_is_parity_known: %d\n", avs_is_parity_known(avs->vi)); > > - /* The following typically only works when assumetff (-bff) and > - * assumefieldbased is used in-script. Additional > - * logic using GetParity() could deliver more accurate results > - * but also decodes a frame which we want to avoid. */ > st->codecpar->field_order = AV_FIELD_UNKNOWN; > - if (avs_is_field_based(avs->vi)) { > + /* AviSynth works with frame-based video, detecting field order can > + * only work when avs_is_field_based returns 'false'. */ > + av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); > + if (avs_is_field_based(avs->vi) == 0) { > if (avs_is_tff(avs->vi)) { > st->codecpar->field_order = AV_FIELD_TT; > } Pushed. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields 2022-02-08 11:02 [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 1/3] avisynth: corrected interlace detection Stephen Hutchinson @ 2022-02-08 11:02 ` Stephen Hutchinson 2022-02-13 23:34 ` Stephen Hutchinson ` (2 more replies) 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version Stephen Hutchinson 2022-02-13 17:48 ` [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson 3 siblings, 3 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-08 11:02 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Stephen Hutchinson * Field Order * Chroma Location * Color Transfer Characteristics * Color Range * Color Primaries * Matrix Coefficients The existing TFF/BFF detection is retained as a fallback for older versions of AviSynth that can't access frame properties. The other properties have no legacy equivalent to detect them. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> --- libavformat/avisynth.c | 263 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 250 insertions(+), 13 deletions(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 1e862a6a85..8bc39869a3 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -19,6 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <stdbool.h> + #include "libavutil/attributes.h" #include "libavutil/internal.h" @@ -76,6 +78,9 @@ typedef struct AviSynthLibrary { AVSC_DECLARE_FUNC(avs_get_row_size_p); AVSC_DECLARE_FUNC(avs_is_planar_rgb); AVSC_DECLARE_FUNC(avs_is_planar_rgba); + AVSC_DECLARE_FUNC(avs_get_frame_props_ro); + AVSC_DECLARE_FUNC(avs_prop_get_int); + AVSC_DECLARE_FUNC(avs_get_env_property); #undef AVSC_DECLARE_FUNC } AviSynthLibrary; @@ -153,6 +158,9 @@ static av_cold int avisynth_load_library(void) LOAD_AVS_FUNC(avs_get_row_size_p, 1); LOAD_AVS_FUNC(avs_is_planar_rgb, 1); LOAD_AVS_FUNC(avs_is_planar_rgba, 1); + LOAD_AVS_FUNC(avs_get_frame_props_ro, 1); + LOAD_AVS_FUNC(avs_prop_get_int, 1); + LOAD_AVS_FUNC(avs_get_env_property, 1); #undef LOAD_AVS_FUNC atexit(avisynth_atexit_handler); @@ -236,6 +244,10 @@ static av_cold void avisynth_atexit_handler(void) static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) { AviSynthContext *avs = s->priv_data; + const AVS_Map *avsmap; + AVS_VideoFrame *frame; + int framedata, error; + bool frameprop; int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; @@ -251,19 +263,6 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) avpriv_set_pts_info(st, 32, avs->vi->fps_denominator, avs->vi->fps_numerator); - st->codecpar->field_order = AV_FIELD_UNKNOWN; - /* AviSynth works with frame-based video, detecting field order can - * only work when avs_is_field_based returns 'false'. */ - av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); - if (avs_is_field_based(avs->vi) == 0) { - if (avs_is_tff(avs->vi)) { - st->codecpar->field_order = AV_FIELD_TT; - } - else if (avs_is_bff(avs->vi)) { - st->codecpar->field_order = AV_FIELD_BB; - } - } - switch (avs->vi->pixel_type) { /* 10~16-bit YUV pix_fmts (AviSynth+) */ case AVS_CS_YUV444P10: @@ -499,6 +498,244 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) avs->n_planes = 1; avs->planes = avs_planes_packed; } + + /* Read AviSynth+'s frame properties to set additional info. + * + * Due to a bug preventing the C interface from accessing frame + * properties in earlier versions of interface version 8, only + * enable this if we detect version 8.1 at the minimum. */ + + if (!avs_library.avs_get_env_property) { + av_log(s, AV_LOG_TRACE, "%s\n", + "avs_get_env_property does not exist in AviSynth library; frame properties won't be checked."); + frameprop = false; + } else { + if (avs_library.avs_get_env_property(avs->env, AVS_AEP_INTERFACE_BUGFIX)) { + av_log(s, AV_LOG_TRACE, "%s\n", "Using interface version 8.1 or higher, reading frame properties."); + frameprop = true; + } else { + av_log(s, AV_LOG_TRACE, "%s\n", "Using interface version 8.0, need 8.1+ to read frame properties."); + frameprop = false; + } + } + + if (frameprop = true) { + + frame = avs_library.avs_get_frame(avs->clip, framedata); + avsmap = avs_library.avs_get_frame_props_ro(avs->env, frame); + + /* Field order */ + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_FieldBased", 0, &error)) { + case 0: + st->codecpar->field_order = AV_FIELD_PROGRESSIVE; + break; + case 1: + st->codecpar->field_order = AV_FIELD_BB; + break; + case 2: + st->codecpar->field_order = AV_FIELD_TT; + break; + default: + st->codecpar->field_order = AV_FIELD_UNKNOWN; + } + + /* Color Range */ + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_ColorRange", 0, &error)) { + case 0: + st->codecpar->color_range = AVCOL_RANGE_JPEG; + break; + case 1: + st->codecpar->color_range = AVCOL_RANGE_MPEG; + break; + default: + st->codecpar->color_range = AVCOL_RANGE_UNSPECIFIED; + } + + /* Color Primaries */ + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Primaries", 0, &error)) { + case 1: + st->codecpar->color_primaries = AVCOL_PRI_BT709; + break; + case 2: + st->codecpar->color_primaries = AVCOL_PRI_UNSPECIFIED; + break; + case 4: + st->codecpar->color_primaries = AVCOL_PRI_BT470M; + break; + case 5: + st->codecpar->color_primaries = AVCOL_PRI_BT470BG; + break; + case 6: + st->codecpar->color_primaries = AVCOL_PRI_SMPTE170M; + break; + case 7: + st->codecpar->color_primaries = AVCOL_PRI_SMPTE240M; + break; + case 8: + st->codecpar->color_primaries = AVCOL_PRI_FILM; + break; + case 9: + st->codecpar->color_primaries = AVCOL_PRI_BT2020; + break; + case 10: + st->codecpar->color_primaries = AVCOL_PRI_SMPTE428; + break; + case 11: + st->codecpar->color_primaries = AVCOL_PRI_SMPTE431; + break; + case 12: + st->codecpar->color_primaries = AVCOL_PRI_SMPTE432; + break; + case 22: + st->codecpar->color_primaries = AVCOL_PRI_EBU3213; + break; + default: + st->codecpar->color_primaries = AVCOL_PRI_UNSPECIFIED; + } + + /* Color Transfer Characteristics */ + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Transfer", 0, &error)) { + case 1: + st->codecpar->color_trc = AVCOL_TRC_BT709; + break; + case 2: + st->codecpar->color_trc = AVCOL_TRC_UNSPECIFIED; + break; + case 4: + st->codecpar->color_trc = AVCOL_TRC_GAMMA22; + break; + case 5: + st->codecpar->color_trc = AVCOL_TRC_GAMMA28; + break; + case 6: + st->codecpar->color_trc = AVCOL_TRC_SMPTE170M; + break; + case 7: + st->codecpar->color_trc = AVCOL_TRC_SMPTE240M; + break; + case 8: + st->codecpar->color_trc = AVCOL_TRC_LINEAR; + break; + case 9: + st->codecpar->color_trc = AVCOL_TRC_LOG; + break; + case 10: + st->codecpar->color_trc = AVCOL_TRC_LOG_SQRT; + break; + case 11: + st->codecpar->color_trc = AVCOL_TRC_IEC61966_2_4; + break; + case 12: + st->codecpar->color_trc = AVCOL_TRC_BT1361_ECG; + break; + case 13: + st->codecpar->color_trc = AVCOL_TRC_IEC61966_2_1; + break; + case 14: + st->codecpar->color_trc = AVCOL_TRC_BT2020_10; + break; + case 15: + st->codecpar->color_trc = AVCOL_TRC_BT2020_12; + break; + case 16: + st->codecpar->color_trc = AVCOL_TRC_SMPTE2084; + break; + case 17: + st->codecpar->color_trc = AVCOL_TRC_SMPTE428; + break; + case 18: + st->codecpar->color_trc = AVCOL_TRC_ARIB_STD_B67; + break; + default: + st->codecpar->color_trc = AVCOL_TRC_UNSPECIFIED; + } + + /* Matrix coefficients */ + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Matrix", 0, &error)) { + case 0: + st->codecpar->color_space = AVCOL_SPC_RGB; + break; + case 1: + st->codecpar->color_space = AVCOL_SPC_BT709; + break; + case 2: + st->codecpar->color_space = AVCOL_SPC_UNSPECIFIED; + break; + case 4: + st->codecpar->color_space = AVCOL_SPC_FCC; + break; + case 5: + st->codecpar->color_space = AVCOL_SPC_BT470BG; + break; + case 6: + st->codecpar->color_space = AVCOL_SPC_SMPTE170M; + break; + case 7: + st->codecpar->color_space = AVCOL_SPC_SMPTE240M; + break; + case 8: + st->codecpar->color_space = AVCOL_SPC_YCGCO; + break; + case 9: + st->codecpar->color_space = AVCOL_SPC_BT2020_NCL; + break; + case 10: + st->codecpar->color_space = AVCOL_SPC_BT2020_CL; + break; + case 11: + st->codecpar->color_space = AVCOL_SPC_SMPTE2085; + break; + case 12: + st->codecpar->color_space = AVCOL_SPC_CHROMA_DERIVED_NCL; + break; + case 13: + st->codecpar->color_space = AVCOL_SPC_CHROMA_DERIVED_CL; + break; + case 14: + st->codecpar->color_space = AVCOL_SPC_ICTCP; + break; + default: + st->codecpar->color_space = AVCOL_SPC_UNSPECIFIED; + } + + /* Chroma Location */ + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_ChromaLocation", 0, &error)) { + case 0: + st->codecpar->chroma_location = AVCHROMA_LOC_LEFT; + break; + case 1: + st->codecpar->chroma_location = AVCHROMA_LOC_CENTER; + break; + case 2: + st->codecpar->chroma_location = AVCHROMA_LOC_TOPLEFT; + break; + case 3: + st->codecpar->chroma_location = AVCHROMA_LOC_TOP; + break; + case 4: + st->codecpar->chroma_location = AVCHROMA_LOC_BOTTOMLEFT; + break; + case 5: + st->codecpar->chroma_location = AVCHROMA_LOC_BOTTOM; + break; + default: + st->codecpar->chroma_location = AVCHROMA_LOC_UNSPECIFIED; + } + } else { + st->codecpar->field_order = AV_FIELD_UNKNOWN; + /* AviSynth works with frame-based video, detecting field order can + * only work when avs_is_field_based returns 'false'. */ + av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); + if (avs_is_field_based(avs->vi) == 0) { + if (avs_is_tff(avs->vi)) { + st->codecpar->field_order = AV_FIELD_TT; + } + else if (avs_is_bff(avs->vi)) { + st->codecpar->field_order = AV_FIELD_BB; + } + } + } + return 0; } -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson @ 2022-02-13 23:34 ` Stephen Hutchinson 2022-02-19 20:39 ` Andreas Rheinhardt 2022-08-24 17:04 ` Steinar Apalnes 2 siblings, 0 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-13 23:34 UTC (permalink / raw) To: FFmpeg development discussions and patches On 2/8/22 6:02 AM, Stephen Hutchinson wrote: > * Field Order > * Chroma Location > * Color Transfer Characteristics > * Color Range > * Color Primaries > * Matrix Coefficients > > The existing TFF/BFF detection is retained as a fallback for > older versions of AviSynth that can't access frame properties. > The other properties have no legacy equivalent to detect them. > > Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > --- > libavformat/avisynth.c | 263 +++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 250 insertions(+), 13 deletions(-) > > diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c > index 1e862a6a85..8bc39869a3 100644 > --- a/libavformat/avisynth.c > +++ b/libavformat/avisynth.c > @@ -19,6 +19,8 @@ > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > */ > > +#include <stdbool.h> > + > #include "libavutil/attributes.h" > #include "libavutil/internal.h" > > @@ -76,6 +78,9 @@ typedef struct AviSynthLibrary { > AVSC_DECLARE_FUNC(avs_get_row_size_p); > AVSC_DECLARE_FUNC(avs_is_planar_rgb); > AVSC_DECLARE_FUNC(avs_is_planar_rgba); > + AVSC_DECLARE_FUNC(avs_get_frame_props_ro); > + AVSC_DECLARE_FUNC(avs_prop_get_int); > + AVSC_DECLARE_FUNC(avs_get_env_property); > #undef AVSC_DECLARE_FUNC > } AviSynthLibrary; > > @@ -153,6 +158,9 @@ static av_cold int avisynth_load_library(void) > LOAD_AVS_FUNC(avs_get_row_size_p, 1); > LOAD_AVS_FUNC(avs_is_planar_rgb, 1); > LOAD_AVS_FUNC(avs_is_planar_rgba, 1); > + LOAD_AVS_FUNC(avs_get_frame_props_ro, 1); > + LOAD_AVS_FUNC(avs_prop_get_int, 1); > + LOAD_AVS_FUNC(avs_get_env_property, 1); > #undef LOAD_AVS_FUNC > > atexit(avisynth_atexit_handler); > @@ -236,6 +244,10 @@ static av_cold void avisynth_atexit_handler(void) > static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > { > AviSynthContext *avs = s->priv_data; > + const AVS_Map *avsmap; > + AVS_VideoFrame *frame; > + int framedata, error; > + bool frameprop; > int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA > > st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; > @@ -251,19 +263,6 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > avpriv_set_pts_info(st, 32, avs->vi->fps_denominator, avs->vi->fps_numerator); > > > - st->codecpar->field_order = AV_FIELD_UNKNOWN; > - /* AviSynth works with frame-based video, detecting field order can > - * only work when avs_is_field_based returns 'false'. */ > - av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); > - if (avs_is_field_based(avs->vi) == 0) { > - if (avs_is_tff(avs->vi)) { > - st->codecpar->field_order = AV_FIELD_TT; > - } > - else if (avs_is_bff(avs->vi)) { > - st->codecpar->field_order = AV_FIELD_BB; > - } > - } > - > switch (avs->vi->pixel_type) { > /* 10~16-bit YUV pix_fmts (AviSynth+) */ > case AVS_CS_YUV444P10: > @@ -499,6 +498,244 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > avs->n_planes = 1; > avs->planes = avs_planes_packed; > } > + > + /* Read AviSynth+'s frame properties to set additional info. > + * > + * Due to a bug preventing the C interface from accessing frame > + * properties in earlier versions of interface version 8, only > + * enable this if we detect version 8.1 at the minimum. */ > + > + if (!avs_library.avs_get_env_property) { > + av_log(s, AV_LOG_TRACE, "%s\n", > + "avs_get_env_property does not exist in AviSynth library; frame properties won't be checked."); > + frameprop = false; > + } else { > + if (avs_library.avs_get_env_property(avs->env, AVS_AEP_INTERFACE_BUGFIX)) { > + av_log(s, AV_LOG_TRACE, "%s\n", "Using interface version 8.1 or higher, reading frame properties."); > + frameprop = true; > + } else { > + av_log(s, AV_LOG_TRACE, "%s\n", "Using interface version 8.0, need 8.1+ to read frame properties."); > + frameprop = false; > + } > + } > + > + if (frameprop = true) { > + > + frame = avs_library.avs_get_frame(avs->clip, framedata); > + avsmap = avs_library.avs_get_frame_props_ro(avs->env, frame); > + > + /* Field order */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_FieldBased", 0, &error)) { > + case 0: > + st->codecpar->field_order = AV_FIELD_PROGRESSIVE; > + break; > + case 1: > + st->codecpar->field_order = AV_FIELD_BB; > + break; > + case 2: > + st->codecpar->field_order = AV_FIELD_TT; > + break; > + default: > + st->codecpar->field_order = AV_FIELD_UNKNOWN; > + } > + > + /* Color Range */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_ColorRange", 0, &error)) { > + case 0: > + st->codecpar->color_range = AVCOL_RANGE_JPEG; > + break; > + case 1: > + st->codecpar->color_range = AVCOL_RANGE_MPEG; > + break; > + default: > + st->codecpar->color_range = AVCOL_RANGE_UNSPECIFIED; > + } > + > + /* Color Primaries */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Primaries", 0, &error)) { > + case 1: > + st->codecpar->color_primaries = AVCOL_PRI_BT709; > + break; > + case 2: > + st->codecpar->color_primaries = AVCOL_PRI_UNSPECIFIED; > + break; > + case 4: > + st->codecpar->color_primaries = AVCOL_PRI_BT470M; > + break; > + case 5: > + st->codecpar->color_primaries = AVCOL_PRI_BT470BG; > + break; > + case 6: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE170M; > + break; > + case 7: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE240M; > + break; > + case 8: > + st->codecpar->color_primaries = AVCOL_PRI_FILM; > + break; > + case 9: > + st->codecpar->color_primaries = AVCOL_PRI_BT2020; > + break; > + case 10: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE428; > + break; > + case 11: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE431; > + break; > + case 12: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE432; > + break; > + case 22: > + st->codecpar->color_primaries = AVCOL_PRI_EBU3213; > + break; > + default: > + st->codecpar->color_primaries = AVCOL_PRI_UNSPECIFIED; > + } > + > + /* Color Transfer Characteristics */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Transfer", 0, &error)) { > + case 1: > + st->codecpar->color_trc = AVCOL_TRC_BT709; > + break; > + case 2: > + st->codecpar->color_trc = AVCOL_TRC_UNSPECIFIED; > + break; > + case 4: > + st->codecpar->color_trc = AVCOL_TRC_GAMMA22; > + break; > + case 5: > + st->codecpar->color_trc = AVCOL_TRC_GAMMA28; > + break; > + case 6: > + st->codecpar->color_trc = AVCOL_TRC_SMPTE170M; > + break; > + case 7: > + st->codecpar->color_trc = AVCOL_TRC_SMPTE240M; > + break; > + case 8: > + st->codecpar->color_trc = AVCOL_TRC_LINEAR; > + break; > + case 9: > + st->codecpar->color_trc = AVCOL_TRC_LOG; > + break; > + case 10: > + st->codecpar->color_trc = AVCOL_TRC_LOG_SQRT; > + break; > + case 11: > + st->codecpar->color_trc = AVCOL_TRC_IEC61966_2_4; > + break; > + case 12: > + st->codecpar->color_trc = AVCOL_TRC_BT1361_ECG; > + break; > + case 13: > + st->codecpar->color_trc = AVCOL_TRC_IEC61966_2_1; > + break; > + case 14: > + st->codecpar->color_trc = AVCOL_TRC_BT2020_10; > + break; > + case 15: > + st->codecpar->color_trc = AVCOL_TRC_BT2020_12; > + break; > + case 16: > + st->codecpar->color_trc = AVCOL_TRC_SMPTE2084; > + break; > + case 17: > + st->codecpar->color_trc = AVCOL_TRC_SMPTE428; > + break; > + case 18: > + st->codecpar->color_trc = AVCOL_TRC_ARIB_STD_B67; > + break; > + default: > + st->codecpar->color_trc = AVCOL_TRC_UNSPECIFIED; > + } > + > + /* Matrix coefficients */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Matrix", 0, &error)) { > + case 0: > + st->codecpar->color_space = AVCOL_SPC_RGB; > + break; > + case 1: > + st->codecpar->color_space = AVCOL_SPC_BT709; > + break; > + case 2: > + st->codecpar->color_space = AVCOL_SPC_UNSPECIFIED; > + break; > + case 4: > + st->codecpar->color_space = AVCOL_SPC_FCC; > + break; > + case 5: > + st->codecpar->color_space = AVCOL_SPC_BT470BG; > + break; > + case 6: > + st->codecpar->color_space = AVCOL_SPC_SMPTE170M; > + break; > + case 7: > + st->codecpar->color_space = AVCOL_SPC_SMPTE240M; > + break; > + case 8: > + st->codecpar->color_space = AVCOL_SPC_YCGCO; > + break; > + case 9: > + st->codecpar->color_space = AVCOL_SPC_BT2020_NCL; > + break; > + case 10: > + st->codecpar->color_space = AVCOL_SPC_BT2020_CL; > + break; > + case 11: > + st->codecpar->color_space = AVCOL_SPC_SMPTE2085; > + break; > + case 12: > + st->codecpar->color_space = AVCOL_SPC_CHROMA_DERIVED_NCL; > + break; > + case 13: > + st->codecpar->color_space = AVCOL_SPC_CHROMA_DERIVED_CL; > + break; > + case 14: > + st->codecpar->color_space = AVCOL_SPC_ICTCP; > + break; > + default: > + st->codecpar->color_space = AVCOL_SPC_UNSPECIFIED; > + } > + > + /* Chroma Location */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_ChromaLocation", 0, &error)) { > + case 0: > + st->codecpar->chroma_location = AVCHROMA_LOC_LEFT; > + break; > + case 1: > + st->codecpar->chroma_location = AVCHROMA_LOC_CENTER; > + break; > + case 2: > + st->codecpar->chroma_location = AVCHROMA_LOC_TOPLEFT; > + break; > + case 3: > + st->codecpar->chroma_location = AVCHROMA_LOC_TOP; > + break; > + case 4: > + st->codecpar->chroma_location = AVCHROMA_LOC_BOTTOMLEFT; > + break; > + case 5: > + st->codecpar->chroma_location = AVCHROMA_LOC_BOTTOM; > + break; > + default: > + st->codecpar->chroma_location = AVCHROMA_LOC_UNSPECIFIED; > + } > + } else { > + st->codecpar->field_order = AV_FIELD_UNKNOWN; > + /* AviSynth works with frame-based video, detecting field order can > + * only work when avs_is_field_based returns 'false'. */ > + av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); > + if (avs_is_field_based(avs->vi) == 0) { > + if (avs_is_tff(avs->vi)) { > + st->codecpar->field_order = AV_FIELD_TT; > + } > + else if (avs_is_bff(avs->vi)) { > + st->codecpar->field_order = AV_FIELD_BB; > + } > + } > + } > + > return 0; > } > Pushed. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson 2022-02-13 23:34 ` Stephen Hutchinson @ 2022-02-19 20:39 ` Andreas Rheinhardt 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson 2022-02-19 21:45 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson 2022-08-24 17:04 ` Steinar Apalnes 2 siblings, 2 replies; 35+ messages in thread From: Andreas Rheinhardt @ 2022-02-19 20:39 UTC (permalink / raw) To: ffmpeg-devel Stephen Hutchinson: > * Field Order > * Chroma Location > * Color Transfer Characteristics > * Color Range > * Color Primaries > * Matrix Coefficients > > The existing TFF/BFF detection is retained as a fallback for > older versions of AviSynth that can't access frame properties. > The other properties have no legacy equivalent to detect them. > > Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > --- > libavformat/avisynth.c | 263 +++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 250 insertions(+), 13 deletions(-) > > diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c > index 1e862a6a85..8bc39869a3 100644 > --- a/libavformat/avisynth.c > +++ b/libavformat/avisynth.c > @@ -19,6 +19,8 @@ > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > */ > > +#include <stdbool.h> > + > #include "libavutil/attributes.h" > #include "libavutil/internal.h" > > @@ -76,6 +78,9 @@ typedef struct AviSynthLibrary { > AVSC_DECLARE_FUNC(avs_get_row_size_p); > AVSC_DECLARE_FUNC(avs_is_planar_rgb); > AVSC_DECLARE_FUNC(avs_is_planar_rgba); > + AVSC_DECLARE_FUNC(avs_get_frame_props_ro); > + AVSC_DECLARE_FUNC(avs_prop_get_int); > + AVSC_DECLARE_FUNC(avs_get_env_property); > #undef AVSC_DECLARE_FUNC > } AviSynthLibrary; > > @@ -153,6 +158,9 @@ static av_cold int avisynth_load_library(void) > LOAD_AVS_FUNC(avs_get_row_size_p, 1); > LOAD_AVS_FUNC(avs_is_planar_rgb, 1); > LOAD_AVS_FUNC(avs_is_planar_rgba, 1); > + LOAD_AVS_FUNC(avs_get_frame_props_ro, 1); > + LOAD_AVS_FUNC(avs_prop_get_int, 1); > + LOAD_AVS_FUNC(avs_get_env_property, 1); > #undef LOAD_AVS_FUNC > > atexit(avisynth_atexit_handler); > @@ -236,6 +244,10 @@ static av_cold void avisynth_atexit_handler(void) > static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > { > AviSynthContext *avs = s->priv_data; > + const AVS_Map *avsmap; > + AVS_VideoFrame *frame; > + int framedata, error; > + bool frameprop; > int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA > > st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; > @@ -251,19 +263,6 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > avpriv_set_pts_info(st, 32, avs->vi->fps_denominator, avs->vi->fps_numerator); > > > - st->codecpar->field_order = AV_FIELD_UNKNOWN; > - /* AviSynth works with frame-based video, detecting field order can > - * only work when avs_is_field_based returns 'false'. */ > - av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); > - if (avs_is_field_based(avs->vi) == 0) { > - if (avs_is_tff(avs->vi)) { > - st->codecpar->field_order = AV_FIELD_TT; > - } > - else if (avs_is_bff(avs->vi)) { > - st->codecpar->field_order = AV_FIELD_BB; > - } > - } > - > switch (avs->vi->pixel_type) { > /* 10~16-bit YUV pix_fmts (AviSynth+) */ > case AVS_CS_YUV444P10: > @@ -499,6 +498,244 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > avs->n_planes = 1; > avs->planes = avs_planes_packed; > } > + > + /* Read AviSynth+'s frame properties to set additional info. > + * > + * Due to a bug preventing the C interface from accessing frame > + * properties in earlier versions of interface version 8, only > + * enable this if we detect version 8.1 at the minimum. */ > + > + if (!avs_library.avs_get_env_property) { > + av_log(s, AV_LOG_TRACE, "%s\n", > + "avs_get_env_property does not exist in AviSynth library; frame properties won't be checked."); > + frameprop = false; > + } else { > + if (avs_library.avs_get_env_property(avs->env, AVS_AEP_INTERFACE_BUGFIX)) { > + av_log(s, AV_LOG_TRACE, "%s\n", "Using interface version 8.1 or higher, reading frame properties."); > + frameprop = true; > + } else { > + av_log(s, AV_LOG_TRACE, "%s\n", "Using interface version 8.0, need 8.1+ to read frame properties."); > + frameprop = false; > + } > + } > + > + if (frameprop = true) { > + > + frame = avs_library.avs_get_frame(avs->clip, framedata); framedata is completely uninitialized here. I presume it should be zero (for the first frame)? (This is Coverity issue 1500290.) > + avsmap = avs_library.avs_get_frame_props_ro(avs->env, frame); > + > + /* Field order */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_FieldBased", 0, &error)) { > + case 0: > + st->codecpar->field_order = AV_FIELD_PROGRESSIVE; > + break; > + case 1: > + st->codecpar->field_order = AV_FIELD_BB; > + break; > + case 2: > + st->codecpar->field_order = AV_FIELD_TT; > + break; > + default: > + st->codecpar->field_order = AV_FIELD_UNKNOWN; > + } > + > + /* Color Range */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_ColorRange", 0, &error)) { > + case 0: > + st->codecpar->color_range = AVCOL_RANGE_JPEG; > + break; > + case 1: > + st->codecpar->color_range = AVCOL_RANGE_MPEG; > + break; > + default: > + st->codecpar->color_range = AVCOL_RANGE_UNSPECIFIED; > + } > + > + /* Color Primaries */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Primaries", 0, &error)) { > + case 1: > + st->codecpar->color_primaries = AVCOL_PRI_BT709; > + break; > + case 2: > + st->codecpar->color_primaries = AVCOL_PRI_UNSPECIFIED; > + break; > + case 4: > + st->codecpar->color_primaries = AVCOL_PRI_BT470M; > + break; > + case 5: > + st->codecpar->color_primaries = AVCOL_PRI_BT470BG; > + break; > + case 6: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE170M; > + break; > + case 7: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE240M; > + break; > + case 8: > + st->codecpar->color_primaries = AVCOL_PRI_FILM; > + break; > + case 9: > + st->codecpar->color_primaries = AVCOL_PRI_BT2020; > + break; > + case 10: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE428; > + break; > + case 11: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE431; > + break; > + case 12: > + st->codecpar->color_primaries = AVCOL_PRI_SMPTE432; > + break; > + case 22: > + st->codecpar->color_primaries = AVCOL_PRI_EBU3213; > + break; > + default: > + st->codecpar->color_primaries = AVCOL_PRI_UNSPECIFIED; > + } > + > + /* Color Transfer Characteristics */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Transfer", 0, &error)) { > + case 1: > + st->codecpar->color_trc = AVCOL_TRC_BT709; > + break; > + case 2: > + st->codecpar->color_trc = AVCOL_TRC_UNSPECIFIED; > + break; > + case 4: > + st->codecpar->color_trc = AVCOL_TRC_GAMMA22; > + break; > + case 5: > + st->codecpar->color_trc = AVCOL_TRC_GAMMA28; > + break; > + case 6: > + st->codecpar->color_trc = AVCOL_TRC_SMPTE170M; > + break; > + case 7: > + st->codecpar->color_trc = AVCOL_TRC_SMPTE240M; > + break; > + case 8: > + st->codecpar->color_trc = AVCOL_TRC_LINEAR; > + break; > + case 9: > + st->codecpar->color_trc = AVCOL_TRC_LOG; > + break; > + case 10: > + st->codecpar->color_trc = AVCOL_TRC_LOG_SQRT; > + break; > + case 11: > + st->codecpar->color_trc = AVCOL_TRC_IEC61966_2_4; > + break; > + case 12: > + st->codecpar->color_trc = AVCOL_TRC_BT1361_ECG; > + break; > + case 13: > + st->codecpar->color_trc = AVCOL_TRC_IEC61966_2_1; > + break; > + case 14: > + st->codecpar->color_trc = AVCOL_TRC_BT2020_10; > + break; > + case 15: > + st->codecpar->color_trc = AVCOL_TRC_BT2020_12; > + break; > + case 16: > + st->codecpar->color_trc = AVCOL_TRC_SMPTE2084; > + break; > + case 17: > + st->codecpar->color_trc = AVCOL_TRC_SMPTE428; > + break; > + case 18: > + st->codecpar->color_trc = AVCOL_TRC_ARIB_STD_B67; > + break; > + default: > + st->codecpar->color_trc = AVCOL_TRC_UNSPECIFIED; > + } > + > + /* Matrix coefficients */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_Matrix", 0, &error)) { > + case 0: > + st->codecpar->color_space = AVCOL_SPC_RGB; > + break; > + case 1: > + st->codecpar->color_space = AVCOL_SPC_BT709; > + break; > + case 2: > + st->codecpar->color_space = AVCOL_SPC_UNSPECIFIED; > + break; > + case 4: > + st->codecpar->color_space = AVCOL_SPC_FCC; > + break; > + case 5: > + st->codecpar->color_space = AVCOL_SPC_BT470BG; > + break; > + case 6: > + st->codecpar->color_space = AVCOL_SPC_SMPTE170M; > + break; > + case 7: > + st->codecpar->color_space = AVCOL_SPC_SMPTE240M; > + break; > + case 8: > + st->codecpar->color_space = AVCOL_SPC_YCGCO; > + break; > + case 9: > + st->codecpar->color_space = AVCOL_SPC_BT2020_NCL; > + break; > + case 10: > + st->codecpar->color_space = AVCOL_SPC_BT2020_CL; > + break; > + case 11: > + st->codecpar->color_space = AVCOL_SPC_SMPTE2085; > + break; > + case 12: > + st->codecpar->color_space = AVCOL_SPC_CHROMA_DERIVED_NCL; > + break; > + case 13: > + st->codecpar->color_space = AVCOL_SPC_CHROMA_DERIVED_CL; > + break; > + case 14: > + st->codecpar->color_space = AVCOL_SPC_ICTCP; > + break; > + default: > + st->codecpar->color_space = AVCOL_SPC_UNSPECIFIED; > + } > + > + /* Chroma Location */ > + switch (avs_library.avs_prop_get_int(avs->env, avsmap, "_ChromaLocation", 0, &error)) { > + case 0: > + st->codecpar->chroma_location = AVCHROMA_LOC_LEFT; > + break; > + case 1: > + st->codecpar->chroma_location = AVCHROMA_LOC_CENTER; > + break; > + case 2: > + st->codecpar->chroma_location = AVCHROMA_LOC_TOPLEFT; > + break; > + case 3: > + st->codecpar->chroma_location = AVCHROMA_LOC_TOP; > + break; > + case 4: > + st->codecpar->chroma_location = AVCHROMA_LOC_BOTTOMLEFT; > + break; > + case 5: > + st->codecpar->chroma_location = AVCHROMA_LOC_BOTTOM; > + break; > + default: > + st->codecpar->chroma_location = AVCHROMA_LOC_UNSPECIFIED; > + } > + } else { > + st->codecpar->field_order = AV_FIELD_UNKNOWN; > + /* AviSynth works with frame-based video, detecting field order can > + * only work when avs_is_field_based returns 'false'. */ > + av_log(s, AV_LOG_TRACE, "avs_is_field_based: %d\n", avs_is_field_based(avs->vi)); > + if (avs_is_field_based(avs->vi) == 0) { > + if (avs_is_tff(avs->vi)) { > + st->codecpar->field_order = AV_FIELD_TT; > + } > + else if (avs_is_bff(avs->vi)) { > + st->codecpar->field_order = AV_FIELD_BB; > + } > + } > + } > + > return 0; > } > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' 2022-02-19 20:39 ` Andreas Rheinhardt @ 2022-02-19 21:41 ` Stephen Hutchinson 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized Stephen Hutchinson 2022-02-23 18:03 ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson 2022-02-19 21:45 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson 1 sibling, 2 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-19 21:41 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Stephen Hutchinson Since the check got simplified and stdbool was no longer necessary to include, neither is that variable. Silences a warning. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> --- libavformat/avisynth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 2bd0c6949b..03489f180f 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -245,7 +245,6 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) const AVS_Map *avsmap; AVS_VideoFrame *frame; int framedata, error; - bool frameprop; int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson @ 2022-02-19 21:41 ` Stephen Hutchinson 2022-02-19 22:45 ` Andreas Rheinhardt 2022-02-23 18:03 ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson 1 sibling, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-19 21:41 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Stephen Hutchinson Addresses Coverity issue 1500290 Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> --- libavformat/avisynth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 03489f180f..cfb7b2a783 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -244,7 +244,8 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) AviSynthContext *avs = s->priv_data; const AVS_Map *avsmap; AVS_VideoFrame *frame; - int framedata, error; + int framedata = 0; + int error; int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized Stephen Hutchinson @ 2022-02-19 22:45 ` Andreas Rheinhardt 2022-02-20 0:05 ` Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Andreas Rheinhardt @ 2022-02-19 22:45 UTC (permalink / raw) To: ffmpeg-devel Stephen Hutchinson: > Addresses Coverity issue 1500290 > > Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > --- > libavformat/avisynth.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c > index 03489f180f..cfb7b2a783 100644 > --- a/libavformat/avisynth.c > +++ b/libavformat/avisynth.c > @@ -244,7 +244,8 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > AviSynthContext *avs = s->priv_data; > const AVS_Map *avsmap; > AVS_VideoFrame *frame; > - int framedata, error; > + int framedata = 0; > + int error; > int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA > > st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; Looking at the naming in https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/core/avisynth_c.cpp#L828 makes me believe that this variable is actually a frame number. If so, it is misnamed and this could be fixed easily by just removing this variable. Am I right? - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized 2022-02-19 22:45 ` Andreas Rheinhardt @ 2022-02-20 0:05 ` Stephen Hutchinson 2022-02-20 0:09 ` [FFmpeg-devel] [PATCH] avformat/avisynth: remove framedata variable Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-20 0:05 UTC (permalink / raw) To: ffmpeg-devel On 2/19/22 5:45 PM, Andreas Rheinhardt wrote: > Stephen Hutchinson: >> Addresses Coverity issue 1500290 >> >> Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> >> --- >> libavformat/avisynth.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c >> index 03489f180f..cfb7b2a783 100644 >> --- a/libavformat/avisynth.c >> +++ b/libavformat/avisynth.c >> @@ -244,7 +244,8 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) >> AviSynthContext *avs = s->priv_data; >> const AVS_Map *avsmap; >> AVS_VideoFrame *frame; >> - int framedata, error; >> + int framedata = 0; >> + int error; >> int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA >> >> st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; > > Looking at the naming in > https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/core/avisynth_c.cpp#L828 > makes me believe that this variable is actually a frame number. If so, > it is misnamed and this could be fixed easily by just removing this > variable. Am I right? > It seems so. I think I was just going off of the way avs_get_frame was used in avisynth_read_packet_video (as I was also trying to see whether some of the other properties* should be read per-frame from within read_packet_video), but there's no need to do that with the simpler ones in avisynth_create_stream_video. *related to timestamps or to HDR mastering information, but I'm thinking that's going to require adding an entire function to the demuxer to be able to set side metadata (at least for the HDR stuff, anyway). _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* [FFmpeg-devel] [PATCH] avformat/avisynth: remove framedata variable 2022-02-20 0:05 ` Stephen Hutchinson @ 2022-02-20 0:09 ` Stephen Hutchinson 2022-02-23 18:04 ` Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-20 0:09 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Stephen Hutchinson It's just a simple index. Addresses Coverity issue 1500290 Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> --- libavformat/avisynth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 03489f180f..318588ff52 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -244,7 +244,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) AviSynthContext *avs = s->priv_data; const AVS_Map *avsmap; AVS_VideoFrame *frame; - int framedata, error; + int error; int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; @@ -507,7 +507,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) if (avs_library.avs_get_version(avs->clip) >= 9) { - frame = avs_library.avs_get_frame(avs->clip, framedata); + frame = avs_library.avs_get_frame(avs->clip, 0); avsmap = avs_library.avs_get_frame_props_ro(avs->env, frame); /* Field order */ -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avformat/avisynth: remove framedata variable 2022-02-20 0:09 ` [FFmpeg-devel] [PATCH] avformat/avisynth: remove framedata variable Stephen Hutchinson @ 2022-02-23 18:04 ` Stephen Hutchinson 0 siblings, 0 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-23 18:04 UTC (permalink / raw) To: FFmpeg development discussions and patches On 2/19/22 7:09 PM, Stephen Hutchinson wrote: > It's just a simple index. > > Addresses Coverity issue 1500290 > > Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > --- > libavformat/avisynth.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c > index 03489f180f..318588ff52 100644 > --- a/libavformat/avisynth.c > +++ b/libavformat/avisynth.c > @@ -244,7 +244,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > AviSynthContext *avs = s->priv_data; > const AVS_Map *avsmap; > AVS_VideoFrame *frame; > - int framedata, error; > + int error; > int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA > > st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; > @@ -507,7 +507,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > > if (avs_library.avs_get_version(avs->clip) >= 9) { > > - frame = avs_library.avs_get_frame(avs->clip, framedata); > + frame = avs_library.avs_get_frame(avs->clip, 0); > avsmap = avs_library.avs_get_frame_props_ro(avs->env, frame); > > /* Field order */ Pushed. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized Stephen Hutchinson @ 2022-02-23 18:03 ` Stephen Hutchinson 1 sibling, 0 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-23 18:03 UTC (permalink / raw) To: FFmpeg development discussions and patches On 2/19/22 4:41 PM, Stephen Hutchinson wrote: > Since the check got simplified and stdbool was no longer necessary > to include, neither is that variable. Silences a warning. > > Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > --- > libavformat/avisynth.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c > index 2bd0c6949b..03489f180f 100644 > --- a/libavformat/avisynth.c > +++ b/libavformat/avisynth.c > @@ -245,7 +245,6 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) > const AVS_Map *avsmap; > AVS_VideoFrame *frame; > int framedata, error; > - bool frameprop; > int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA > > st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; Pushed. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields 2022-02-19 20:39 ` Andreas Rheinhardt 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson @ 2022-02-19 21:45 ` Stephen Hutchinson 1 sibling, 0 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-19 21:45 UTC (permalink / raw) To: ffmpeg-devel On 2/19/22 3:39 PM, Andreas Rheinhardt wrote: >> + if (frameprop = true) { >> + >> + frame = avs_library.avs_get_frame(avs->clip, framedata); > > framedata is completely uninitialized here. I presume it should be zero > (for the first frame)? (This is Coverity issue 1500290.) > I don't remember why I left that uninitialized (there's a vague memory of something, almost certainly unrelated since it works now, but it was months ago at this point). Patch sent. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson 2022-02-13 23:34 ` Stephen Hutchinson 2022-02-19 20:39 ` Andreas Rheinhardt @ 2022-08-24 17:04 ` Steinar Apalnes 2022-08-25 0:11 ` Stephen Hutchinson 2 siblings, 1 reply; 35+ messages in thread From: Steinar Apalnes @ 2022-08-24 17:04 UTC (permalink / raw) To: FFmpeg development discussions and patches tir. 8. feb. 2022 kl. 12:03 skrev Stephen Hutchinson <qyot27@gmail.com>: > * Field Order > * Chroma Location > * Color Transfer Characteristics > * Color Range > * Color Primaries > * Matrix Coefficients > > The existing TFF/BFF detection is retained as a fallback for > older versions of AviSynth that can't access frame properties. > The other properties have no legacy equivalent to detect them. > > Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > ....... Hi Stephen, Would it be possible to add support for "_SARum" and "_SARDen" so that ffmpeg could also recognize the sample aspect ratio in avs scripts? -steinar _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields 2022-08-24 17:04 ` Steinar Apalnes @ 2022-08-25 0:11 ` Stephen Hutchinson 2022-08-25 7:46 ` Steinar Apalnes 0 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-08-25 0:11 UTC (permalink / raw) To: ffmpeg-devel On 8/24/22 1:04 PM, Steinar Apalnes wrote: > tir. 8. feb. 2022 kl. 12:03 skrev Stephen Hutchinson <qyot27@gmail.com>: > >> * Field Order >> * Chroma Location >> * Color Transfer Characteristics >> * Color Range >> * Color Primaries >> * Matrix Coefficients >> >> The existing TFF/BFF detection is retained as a fallback for >> older versions of AviSynth that can't access frame properties. >> The other properties have no legacy equivalent to detect them. >> >> Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> >> > ....... > Hi Stephen, > > Would it be possible to add support for "_SARum" and "_SARDen" so that > ffmpeg could also recognize the sample aspect ratio in avs scripts? > I'm a bit hesitant to do so, namely because the _SARNum/Den properties are much more likely to need to have been changed due to operations in-script, and unless the user is studious about updating those properties after even just a basic resizing operation, then _SARNum/Den will still be set to the original values populated by the source filter, and will be wrong, leading to encodes ending up wrong and potentially bug reports to Trac which aren't actually the fault of the demuxer. This is partially coming from the fact that even the color-based properties that were already added have experienced some level of backlash because of the requirement for users to ensure the properties are correctly updated if they've done any changes to those factors (as best as I'm aware, the filters in the AviSynth+ core still only pass through the existing properties, but they don't update them if they pertain to that property's functionality; I believe some external filters do update them, however). I would be fairly confident in betting that users resizing video is far more common than them doing color correction ops that would require updating the frameprops FFmpeg can currently read. One mitigation to that, IMO, would be to flag that as an experimental feature, making it to where FFmpeg won't read _SARNum/Den unless the -strict option has been used. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields 2022-08-25 0:11 ` Stephen Hutchinson @ 2022-08-25 7:46 ` Steinar Apalnes 2022-09-04 19:14 ` Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Steinar Apalnes @ 2022-08-25 7:46 UTC (permalink / raw) To: FFmpeg development discussions and patches tor. 25. aug. 2022 kl. 02:11 skrev Stephen Hutchinson <qyot27@gmail.com>: > On 8/24/22 1:04 PM, Steinar Apalnes wrote: > > tir. 8. feb. 2022 kl. 12:03 skrev Stephen Hutchinson <qyot27@gmail.com>: > > > >> * Field Order > >> * Chroma Location > >> * Color Transfer Characteristics > >> * Color Range > >> * Color Primaries > >> * Matrix Coefficients > >> > >> The existing TFF/BFF detection is retained as a fallback for > >> older versions of AviSynth that can't access frame properties. > >> The other properties have no legacy equivalent to detect them. > >> > >> Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > >> > > ....... > > Hi Stephen, > > > > Would it be possible to add support for "_SARum" and "_SARDen" so that > > ffmpeg could also recognize the sample aspect ratio in avs scripts? > > > > I'm a bit hesitant to do so, namely because the _SARNum/Den properties > are much more likely to need to have been changed due to operations > in-script, and unless the user is studious about updating those > properties after even just a basic resizing operation, then _SARNum/Den > will still be set to the original values populated by the source filter, > and will be wrong, leading to encodes ending up wrong and potentially > bug reports to Trac which aren't actually the fault of the demuxer. > > This is partially coming from the fact that even the color-based > properties that were already added have experienced some level of > backlash because of the requirement for users to ensure the properties > are correctly updated if they've done any changes to those factors > (as best as I'm aware, the filters in the AviSynth+ core still only pass > through the existing properties, but they don't update them if they > pertain to that property's functionality; I believe some external > filters do update them, however). I would be fairly confident in > betting that users resizing video is far more common than them doing > color correction ops that would require updating the frameprops FFmpeg > can currently read. > > One mitigation to that, IMO, would be to flag that as an experimental > feature, making it to where FFmpeg won't read _SARNum/Den unless > the -strict option has been used. > _______________________________________________ > > If you think cherry picking what props to support under normal operation is the way to go then a -strict option to support *all* "scary" avs props would be very welcome indeed. Because as it is now we have nothing at all in regards to the SAR. Thanks for your efforts :-) -steinar _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields 2022-08-25 7:46 ` Steinar Apalnes @ 2022-09-04 19:14 ` Stephen Hutchinson 0 siblings, 0 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-09-04 19:14 UTC (permalink / raw) To: ffmpeg-devel On 8/25/22 3:46 AM, Steinar Apalnes wrote: > tor. 25. aug. 2022 kl. 02:11 skrev Stephen Hutchinson <qyot27@gmail.com>: > >> On 8/24/22 1:04 PM, Steinar Apalnes wrote: >>> tir. 8. feb. 2022 kl. 12:03 skrev Stephen Hutchinson <qyot27@gmail.com>: >>> >>>> * Field Order >>>> * Chroma Location >>>> * Color Transfer Characteristics >>>> * Color Range >>>> * Color Primaries >>>> * Matrix Coefficients >>>> >>>> The existing TFF/BFF detection is retained as a fallback for >>>> older versions of AviSynth that can't access frame properties. >>>> The other properties have no legacy equivalent to detect them. >>>> >>>> Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> >>>> >>> ....... >>> Hi Stephen, >>> >>> Would it be possible to add support for "_SARum" and "_SARDen" so that >>> ffmpeg could also recognize the sample aspect ratio in avs scripts? >>> >> >> I'm a bit hesitant to do so, namely because the _SARNum/Den properties >> are much more likely to need to have been changed due to operations >> in-script, and unless the user is studious about updating those >> properties after even just a basic resizing operation, then _SARNum/Den >> will still be set to the original values populated by the source filter, >> and will be wrong, leading to encodes ending up wrong and potentially >> bug reports to Trac which aren't actually the fault of the demuxer. >> >> This is partially coming from the fact that even the color-based >> properties that were already added have experienced some level of >> backlash because of the requirement for users to ensure the properties >> are correctly updated if they've done any changes to those factors >> (as best as I'm aware, the filters in the AviSynth+ core still only pass >> through the existing properties, but they don't update them if they >> pertain to that property's functionality; I believe some external >> filters do update them, however). I would be fairly confident in >> betting that users resizing video is far more common than them doing >> color correction ops that would require updating the frameprops FFmpeg >> can currently read. >> >> One mitigation to that, IMO, would be to flag that as an experimental >> feature, making it to where FFmpeg won't read _SARNum/Den unless >> the -strict option has been used. >> _______________________________________________ >> >> > If you think cherry picking what props to support under normal operation is > the way to go > then a -strict option to support *all* "scary" avs props would be very > welcome indeed. > Because as it is now we have nothing at all in regards to the SAR. > > Thanks for your efforts :-) > > -steinar SAR frameprops implemented in commit c49beead, and a more fine-grained, flags-based way to toggle any of the frameprops on and off added in commit adead1cc. Pushed a few minutes ago. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-08 11:02 [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 1/3] avisynth: corrected interlace detection Stephen Hutchinson 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson @ 2022-02-08 11:02 ` Stephen Hutchinson 2022-02-13 23:34 ` Stephen Hutchinson 2022-02-13 17:48 ` [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson 3 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-08 11:02 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Stephen Hutchinson The headers from version 3.7.1 are needed in order to support parsing of frame properties. avs/version.h has been generated as part of the AviSynth+ build process for a long time, but was never installed with the includes until version 3.7.1a. Checking for the presence of avs/version.h might have been sufficient, but a version check mechanism might be useful in the future. This does not change the version compatibility with the library itself; previous 3.x versions of AviSynth+ as well as AviSynth 2.6 can still be used with the demuxer. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 493493b4c5..544d341b49 100755 --- a/configure +++ b/configure @@ -6508,7 +6508,9 @@ for func in $COMPLEX_FUNCS; do done # these are off by default, so fail if requested and not available -enabled avisynth && require_headers "avisynth/avisynth_c.h" +enabled avisynth && { require_headers "avisynth/avisynth_c.h avisynth/avs/version.h" && + { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && AVS_BUGFIX_VER >= 1 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || AVS_MAJOR_VER > 3" || + die "ERROR: AviSynth+ header version must be >= 3.7.1"; } } enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; } enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint enabled decklink && { require_headers DeckLinkAPI.h && -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version Stephen Hutchinson @ 2022-02-13 23:34 ` Stephen Hutchinson 2022-02-14 11:56 ` Gyan Doshi 0 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-13 23:34 UTC (permalink / raw) To: FFmpeg development discussions and patches On 2/8/22 6:02 AM, Stephen Hutchinson wrote: > The headers from version 3.7.1 are needed in order to support > parsing of frame properties. avs/version.h has been generated > as part of the AviSynth+ build process for a long time, but was > never installed with the includes until version 3.7.1a. Checking > for the presence of avs/version.h might have been sufficient, > but a version check mechanism might be useful in the future. > > This does not change the version compatibility with the library > itself; previous 3.x versions of AviSynth+ as well as AviSynth 2.6 > can still be used with the demuxer. > > Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> > --- > configure | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index 493493b4c5..544d341b49 100755 > --- a/configure > +++ b/configure > @@ -6508,7 +6508,9 @@ for func in $COMPLEX_FUNCS; do > done > > # these are off by default, so fail if requested and not available > -enabled avisynth && require_headers "avisynth/avisynth_c.h" > +enabled avisynth && { require_headers "avisynth/avisynth_c.h avisynth/avs/version.h" && > + { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && AVS_BUGFIX_VER >= 1 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || AVS_MAJOR_VER > 3" || > + die "ERROR: AviSynth+ header version must be >= 3.7.1"; } } > enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; } > enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint > enabled decklink && { require_headers DeckLinkAPI.h && Pushed. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-13 23:34 ` Stephen Hutchinson @ 2022-02-14 11:56 ` Gyan Doshi 2022-02-14 22:03 ` Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Gyan Doshi @ 2022-02-14 11:56 UTC (permalink / raw) To: ffmpeg-devel; +Cc: qyot27 On 2022-02-14 05:04 am, Stephen Hutchinson wrote: > On 2/8/22 6:02 AM, Stephen Hutchinson wrote: >> The headers from version 3.7.1 are needed in order to support >> parsing of frame properties. avs/version.h has been generated >> as part of the AviSynth+ build process for a long time, but was >> never installed with the includes until version 3.7.1a. Checking >> for the presence of avs/version.h might have been sufficient, >> but a version check mechanism might be useful in the future. >> >> This does not change the version compatibility with the library >> itself; previous 3.x versions of AviSynth+ as well as AviSynth 2.6 >> can still be used with the demuxer. >> >> Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> >> --- >> configure | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/configure b/configure >> index 493493b4c5..544d341b49 100755 >> --- a/configure >> +++ b/configure >> @@ -6508,7 +6508,9 @@ for func in $COMPLEX_FUNCS; do >> done >> # these are off by default, so fail if requested and not available >> -enabled avisynth && require_headers "avisynth/avisynth_c.h" >> +enabled avisynth && { require_headers >> "avisynth/avisynth_c.h avisynth/avs/version.h" && >> + { test_cpp_condition >> avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && >> AVS_BUGFIX_VER >= 1 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || >> AVS_MAJOR_VER > 3" || >> + die "ERROR: AviSynth+ header >> version must be >= 3.7.1"; } } >> enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: >> failed checking for nvcc."; } >> enabled chromaprint && require chromaprint chromaprint.h >> chromaprint_get_version -lchromaprint >> enabled decklink && { require_headers DeckLinkAPI.h && The advice for AVS+ dlopen consumers is to only build and install AVS+ headers. That does not install version.h and arch.h which are only built with the binary artifacts, not with -DHEADERS_ONLY. For my Windows build, I just manually copied and renamed the template files to make configure succeed. Regards, Gyan _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-14 11:56 ` Gyan Doshi @ 2022-02-14 22:03 ` Stephen Hutchinson 2022-02-15 22:02 ` Helmut K. C. Tessarek 0 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-14 22:03 UTC (permalink / raw) To: ffmpeg, ffmpeg-devel On 2/14/22 6:56 AM, Gyan Doshi wrote: > > > On 2022-02-14 05:04 am, Stephen Hutchinson wrote: >> On 2/8/22 6:02 AM, Stephen Hutchinson wrote: >>> The headers from version 3.7.1 are needed in order to support >>> parsing of frame properties. avs/version.h has been generated >>> as part of the AviSynth+ build process for a long time, but was >>> never installed with the includes until version 3.7.1a. Checking >>> for the presence of avs/version.h might have been sufficient, >>> but a version check mechanism might be useful in the future. >>> >>> This does not change the version compatibility with the library >>> itself; previous 3.x versions of AviSynth+ as well as AviSynth 2.6 >>> can still be used with the demuxer. >>> >>> Signed-off-by: Stephen Hutchinson <qyot27@gmail.com> >>> --- >>> configure | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/configure b/configure >>> index 493493b4c5..544d341b49 100755 >>> --- a/configure >>> +++ b/configure >>> @@ -6508,7 +6508,9 @@ for func in $COMPLEX_FUNCS; do >>> done >>> # these are off by default, so fail if requested and not available >>> -enabled avisynth && require_headers "avisynth/avisynth_c.h" >>> +enabled avisynth && { require_headers >>> "avisynth/avisynth_c.h avisynth/avs/version.h" && >>> + { test_cpp_condition >>> avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && >>> AVS_BUGFIX_VER >= 1 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || >>> AVS_MAJOR_VER > 3" || >>> + die "ERROR: AviSynth+ header >>> version must be >= 3.7.1"; } } >>> enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: >>> failed checking for nvcc."; } >>> enabled chromaprint && require chromaprint chromaprint.h >>> chromaprint_get_version -lchromaprint >>> enabled decklink && { require_headers DeckLinkAPI.h && > > The advice for AVS+ dlopen consumers is to only build and install AVS+ > headers. > That does not install version.h and arch.h which are only built with the > binary artifacts, not with -DHEADERS_ONLY. > > For my Windows build, I just manually copied and renamed the template > files to make configure succeed. > > Regards, > Gyan Should be fixed in https://github.com/AviSynth/AviSynthPlus/commit/0e583378116c857372232e9886c599df2fb8da85 with the caveat (noted in AviSynth+'s README.md) that the `make install` step now needs to explicitly invoke the VersionGen target, `make VersionGen install`. I fiddled with it for a while, but I couldn't get the install process to invoke it automatically. Related, the older GNUmakefile method is not set up to generate version.h and arch.h (especially considering both of those use *.cmake scripts), so it's now pretty clearly deprecated. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-14 22:03 ` Stephen Hutchinson @ 2022-02-15 22:02 ` Helmut K. C. Tessarek 2022-02-15 23:55 ` Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Helmut K. C. Tessarek @ 2022-02-15 22:02 UTC (permalink / raw) To: FFmpeg development discussions and patches, Stephen Hutchinson, ffmpeg -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2022-02-14 17:03, Stephen Hutchinson wrote: > Should be fixed in > https://github.com/AviSynth/AviSynthPlus/commit/0e583378116c857372232e9886c5 99df2fb8da85 > > with the caveat (noted in AviSynth+'s README.md) that the `make install` step > now needs to explicitly invoke the VersionGen target, `make VersionGen > install`. I fiddled with it for a while, but I couldn't get the install > process to invoke it automatically. > > Related, the older GNUmakefile method is not set up to generate version.h > and arch.h (especially considering both of those use *.cmake scripts), so > it's now pretty clearly deprecated. What is the solution? I am compiling ffmpeg with AviSynthPlus-3.5.1 and my configure just errored out with ERROR: avisynth/avisynth_c.h avisynth/avs/version.h not found Which makes sense because I don't have a version.h Do I have to use the latest git version of AviSynthPlus. Is there a fix coming for configure so that I can compile it as I did 2 days ago? Cheers, K. C. - -- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944 /* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */ -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE191csiqpm8f5Ln9WvgmFNJ1E3QAFAmIMIu0ACgkQvgmFNJ1E 3QCIRBAAt2kUYvy3+rMfskOBLISsDQm0epV4/RYWROqfUfzdn7ZWyUbshEGzEfSP EuxYSgAXcvHhNYKhdgCLPFPTD5dqmxHR/9xYagelCEoEDY898DSOw0LFWyrBpak4 qvBtZP7Xt7bzFTvtoDAr+J4yrQCZN4M8gmQLhNqsh4nOawvmYlhONjXZ1eHX49Ki 9R3XFvm8jbdUqrvsil5+SNHtrf0734HYcZ5wcXNgulcfzdGDxvuGw1wS+XI9USQv lyyom9AjgQaKZK/Kv68pVY4wLpkpVyO0KPYrfv3isNctwP69bNupRMc1BKKAPnhT 48FfSwZpU5d3CETdIXve/oX7VyWtYvNxbhqDCexlQICQgZEoWWgmUncxhVrQkMbF e5N0mYhKTd2kJ3/31qaV/OfHqCznh2/BFzz3yeM+sH1NLj/bkAQQtCQ0I4jlW2jc 3sDxhtGmLtLXen1hnvAQLsEreT+jnlilhs1kTV8j4zZZ0rZexn7q6MFGMCR8Bmsb 7YZv0gY/1evuIvcjeviuPU9eYtbKqIeWqhIg+cRvmAJkqu1f2As0jl34Uuvw2agX JdpfQ+x4R16wXlOYKTVu8hiX9l4pNvmeeNxUFLQSFs+Vz+bPVW9me4VCbVzbV+Dc MwjxnhEOnarIcozsslvJLrQIwXnN+98RSpZJFmwRAM56w6QvZ1A= =mifW -----END PGP SIGNATURE----- _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-15 22:02 ` Helmut K. C. Tessarek @ 2022-02-15 23:55 ` Stephen Hutchinson 2022-02-16 1:33 ` Helmut K. C. Tessarek 0 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-15 23:55 UTC (permalink / raw) To: Helmut K. C. Tessarek, FFmpeg development discussions and patches, ffmpeg On 2/15/22 5:02 PM, Helmut K. C. Tessarek wrote: > > What is the solution? > > I am compiling ffmpeg with AviSynthPlus-3.5.1 and my configure just errored > out with > > ERROR: avisynth/avisynth_c.h avisynth/avs/version.h not found > > Which makes sense because I don't have a version.h > > Do I have to use the latest git version of AviSynthPlus. Is there a fix > coming for configure so that I can compile it as I did 2 days ago? > > Cheers, > K. C. > git clone --recursive -b 3.7 https://github.com/AviSynth/AviSynthPlus [build/install as usual] -b 3.7 is equal to the tarball for 3.7.1a (which has the fix for the case of building the entire library), --recursive pulls in the submodule needed for the default AppleClang on 10.13 & 10.14. Unfortunately, Github doesn't put submodules in the tarballs. The fix on latest git was specifically for those that want to use the HEADERS_ONLY option when configuring. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-15 23:55 ` Stephen Hutchinson @ 2022-02-16 1:33 ` Helmut K. C. Tessarek 2022-02-16 3:50 ` Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Helmut K. C. Tessarek @ 2022-02-16 1:33 UTC (permalink / raw) To: Stephen Hutchinson, FFmpeg development discussions and patches, ffmpeg -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2022-02-15 18:55, Stephen Hutchinson wrote: > > git clone --recursive -b 3.7 https://github.com/AviSynth/AviSynthPlus > [build/install as usual] > > -b 3.7 is equal to the tarball for 3.7.1a (which has the fix for the case > of building the entire library), --recursive pulls in the submodule > needed for the default AppleClang on 10.13 & 10.14. Unfortunately, > Github doesn't put submodules in the tarballs. > > The fix on latest git was specifically for those that want to use the > HEADERS_ONLY option when configuring. Unfortunately this didn't work. Building the new AviSynthPlus results in the following errors: [ 10%] Building CXX object avs_core/CMakeFiles/AvsCore.dir/core/FilterGraph.cpp.o /Users/Shared/ffmpeg/compile/AviSynthPlus/avs_core/core/FilterGraph.cpp:510:27 : error: 'path' is unavailable: introduced in macOS 10.15 return fs::absolute(fs::path(f).lexically_normal()).generic_string(); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here class _LIBCPP_TYPE_VIS path { ^ /Users/Shared/ffmpeg/compile/AviSynthPlus/avs_core/core/FilterGraph.cpp:510:23 : error: 'path' is unavailable: introduced in macOS 10.15 return fs::absolute(fs::path(f).lexically_normal()).generic_string(); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/../include/c++/v1/filesystem:773:3: note: 'path' has been explicitly marked unavailable here path(const _Source& __src, format = format::auto_format) { ^ /Users/Shared/ffmpeg/compile/AviSynthPlus/avs_core/core/FilterGraph.cpp:510:23 : error: '~path' is unavailable: introduced in macOS 10.15 return fs::absolute(fs::path(f).lexically_normal()).generic_string(); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here ~path() = default; ^ /Users/Shared/ffmpeg/compile/AviSynthPlus/avs_core/core/FilterGraph.cpp:510:35 : error: 'lexically_normal' is unavailable: introduced in macOS 10.15 return fs::absolute(fs::path(f).lexically_normal()).generic_string(); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/../include/c++/v1/filesystem:1110:8: note: 'lexically_normal' has been explicitly marked unavailable here path lexically_normal() const; ^ /Users/Shared/ffmpeg/compile/AviSynthPlus/avs_core/core/FilterGraph.cpp:510:35 : error: '~path' is unavailable: introduced in macOS 10.15 return fs::absolute(fs::path(f).lexically_normal()).generic_string(); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here ~path() = default; ^ /Users/Shared/ffmpeg/compile/AviSynthPlus/avs_core/core/FilterGraph.cpp:510:14 : error: 'absolute' is unavailable: introduced in macOS 10.15 return fs::absolute(fs::path(f).lexically_normal()).generic_string(); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/../include/c++/v1/filesystem:1477:39: note: 'absolute' has been explicitly marked unavailable here inline _LIBCPP_INLINE_VISIBILITY path absolute(const path& __p) { ^ /Users/Shared/ffmpeg/compile/AviSynthPlus/avs_core/core/FilterGraph.cpp:510:10 : error: '~path' is unavailable: introduced in macOS 10.15 return fs::absolute(fs::path(f).lexically_normal()).generic_string(); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here ~path() = default; ^ /Users/Shared/ffmpeg/compile/AviSynthPlus/avs_core/core/FilterGraph.cpp:510:55 : error: 'generic_string' is unavailable: introduced in macOS 10.15 return fs::absolute(fs::path(f).lexically_normal()).generic_string(); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/../include/c++/v1/filesystem:1019:15: note: 'generic_string' has been explicitly marked unavailable here std::string generic_string() const { return __pn_; } ^ 8 errors generated. make[2]: *** [avs_core/CMakeFiles/AvsCore.dir/core/FilterGraph.cpp.o] Error 1 make[1]: *** [avs_core/CMakeFiles/AvsCore.dir/all] Error 2 make: *** [all] Error 2 - -- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944 /* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */ -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE191csiqpm8f5Ln9WvgmFNJ1E3QAFAmIMVGoACgkQvgmFNJ1E 3QDPqQ//RMgo35KAXz9XJqNzQ1oaQAcgyt1a84g3Je8MLBAjpdWhCeGHxPzbAP+O EPtG0ODLpnVwggPzFf2qPwpz8Q85qqGg0uEftH3xCG3HoyqRIR12OFJkXq0kI4KD mbKplHQPRnr4Fvo1jpT0jOhGXzTpEX6n3G1rV8nhC5PH+GoZ292JgfPXeLCdiWNW epk5qK4t1pzapjNSo1FCy5v6qt4s6YqzomgidjsJCXekKu2ATgPeqamiUKMerpcp zVBG3dp8GJ/StebbLPVpO+J6NzsY8dSwlpjx2hKD8TrknzvHu/W1acG3JEMKF1vF 1abpexSvg5DRaoA1P1QMf5Yr19LWkW+b7nkwjQSTgeGlZ+7mMGDhJGo+rJDyPbK4 G+HJbRwNaDHB7++9vtk0RTnTVaLseLNldVCiM/fvOzB4ONMVQEwClxVOnE/1r+1W /F7FMZCTc/npBGaDyiTjgNJjcMl8LZ10S2S85tVTjeS8GP4AAdx6Ilvz6wqslmva pHxgUjQU7Aci/G14ZBcuclpRJjfM/voaUzbpZB5188z5Ht6A6xL3aIBTTyG0t6TC Ly+sA+zvxbmMvemGeNl+uc1llddg3bF9jZ1rjx4lgMxd+48cpo8pbp3KSuz5peEL ML3VuIliQUSVqWScbQ8Z91RES881xWYnlw4dZNgDFjMSrt6AjEE= =5YwB -----END PGP SIGNATURE----- _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-16 1:33 ` Helmut K. C. Tessarek @ 2022-02-16 3:50 ` Stephen Hutchinson 2022-02-16 5:10 ` Helmut K. C. Tessarek 0 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-16 3:50 UTC (permalink / raw) To: Helmut K. C. Tessarek, FFmpeg development discussions and patches, ffmpeg On 2/15/22 8:33 PM, Helmut K. C. Tessarek wrote: > Unfortunately this didn't work. > > Building the new AviSynthPlus results in the following errors: > Those errors would indicate you're not on the 3.7 branch, because if the filesystem submodule isn't present, it doesn't emit those errors, it stops dead because of the missing <ghc/filesystem> header. If the submodule is there, it compiles as it should. Is the filesystem subdirectory empty? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-16 3:50 ` Stephen Hutchinson @ 2022-02-16 5:10 ` Helmut K. C. Tessarek 2022-02-16 7:37 ` Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Helmut K. C. Tessarek @ 2022-02-16 5:10 UTC (permalink / raw) To: Stephen Hutchinson, FFmpeg development discussions and patches, ffmpeg -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2022-02-15 22:50, Stephen Hutchinson wrote: > Those errors would indicate you're not on the 3.7 branch, because if the > filesystem submodule isn't present, it doesn't emit those errors, it > stops dead because of the missing <ghc/filesystem> header. If the > submodule is there, it compiles as it should. Is the filesystem > subdirectory empty? Nope, I used the git command you posted. I also checked the filesystem dir: [tessus@epsilon3 0 ~/data/ext/ffmpeg/compile/AviSynthPlus/filesystem :3f1c185|✔]$ ll total 76 drwxr-xr-x 18 tessus wheel 576 2022-02-15 20:23 . drwxr-xr-x 16 tessus wheel 512 2022-02-15 20:31 .. - -rw-r--r-- 1 tessus wheel 2842 2022-02-15 20:23 .appveyor.yml drwxr-xr-x 4 tessus wheel 128 2022-02-15 20:23 .ci - -rw-r--r-- 1 tessus wheel 313 2022-02-15 20:23 .cirrus.yml - -rw-r--r-- 1 tessus wheel 576 2022-02-15 20:23 .clang-format - -rw-r--r-- 1 tessus wheel 795 2022-02-15 20:23 .drone.yml - -rw-r--r-- 1 tessus wheel 35 2022-02-15 20:23 .git drwxr-xr-x 3 tessus wheel 96 2022-02-15 20:23 .github - -rw-r--r-- 1 tessus wheel 32 2022-02-15 20:23 .gitignore - -rw-r--r-- 1 tessus wheel 4141 2022-02-15 20:23 .travis.yml - -rw-r--r-- 1 tessus wheel 1937 2022-02-15 20:23 CMakeLists.txt - -rw-r--r-- 1 tessus wheel 1086 2022-02-15 20:23 LICENSE - -rw-r--r-- 1 tessus wheel 35982 2022-02-15 20:23 README.md drwxr-xr-x 4 tessus wheel 128 2022-02-15 20:23 cmake drwxr-xr-x 5 tessus wheel 160 2022-02-15 20:23 examples drwxr-xr-x 3 tessus wheel 96 2022-02-15 20:23 include drwxr-xr-x 11 tessus wheel 352 2022-02-15 20:23 test I'm building AviSynth like this: [tessus@epsilon3 0 ~/data/ext/ffmpeg/compile/AviSynthPlus] mkdir avisynth-build && cd avisynth-build cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DBUILD_SHARED_LIBS=OFF .. make VersionGen install - ---- Until 2 days ago I could compile ffmpeg with AviSynth 3.5.1 just fine. So something must have made my configure to fail. - -- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944 /* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */ -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE191csiqpm8f5Ln9WvgmFNJ1E3QAFAmIMhzEACgkQvgmFNJ1E 3QDprg/+NckvpYpfWeq6jPKKjGmJQazTxFpE0PyyZAngEx9Du6UP49iitT4UefJH 5hOnm7Ps6gkmdNK5WZaeUHL87Vyarya6WIzdNAymzwERsapRfxdsc4YyEbh26bK6 eMf7Qz+4kZ2tfqSGvdTfCDqoYybr/nmR4W/T06jEbeV4v2OmZZieNrDPsel+BUjU 2pSSSCmglJ5qDXcDKfaqCXUtXI5TGJGKm0299yHcZq6Y+OOQGGTCz6f2JbMo0QL/ 9X9CNUXxGkCuMgJ4fsOfSq1GkhFQt0eVAIBY9/vIcXKdAPnw+qHgi/Y6OVh6FUc2 S8Y5BEcE73jkjuakimje4DV5h/TfAe6vlavM1MCuHhMblQKYstsrYaRoEkYidb2E sPp87KadqxCveYW7sTuNs0TxBuUJjWef/7NeShoBAsJTlgGgqM7Iel7ctEZz9gD7 TMOAwSqGy+B2OVXeQvQA5oLJf7I4a4WoVCUgSySKTRNh8Dq52X9wfmJPMD5iGz6K eAR0Z4jlZ3ihZ9NgrjHBqVaSNwbGsrvOlpdrNptxKwFV3ob2VFGuIw5rSJy53y++ e+WI+beujsNc1KX/oU+2CEDX5M1jua6+xBMW08gOpawB4YRxMyx3NfcJjgNwdNZq PWix846IxGDfd9O0pP7KAEmzX00Cld6b9k417ql/0m5zF1LMYw0= =NM4f -----END PGP SIGNATURE----- _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-16 5:10 ` Helmut K. C. Tessarek @ 2022-02-16 7:37 ` Stephen Hutchinson 2022-02-16 18:25 ` Helmut K. C. Tessarek 0 siblings, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-16 7:37 UTC (permalink / raw) To: Helmut K. C. Tessarek, FFmpeg development discussions and patches, ffmpeg On 2/16/22 12:10 AM, Helmut K. C. Tessarek wrote: > On 2022-02-15 22:50, Stephen Hutchinson wrote: >> Those errors would indicate you're not on the 3.7 branch, because if the >> filesystem submodule isn't present, it doesn't emit those errors, it >> stops dead because of the missing <ghc/filesystem> header. If the >> submodule is there, it compiles as it should. Is the filesystem >> subdirectory empty? > > Nope, I used the git command you posted. I also checked the filesystem dir: > > [tessus@epsilon3 0 ~/data/ext/ffmpeg/compile/AviSynthPlus/filesystem > :3f1c185|✔]$ ll > total 76 > drwxr-xr-x 18 tessus wheel 576 2022-02-15 20:23 . > drwxr-xr-x 16 tessus wheel 512 2022-02-15 20:31 .. > -rw-r--r-- 1 tessus wheel 2842 2022-02-15 20:23 .appveyor.yml > drwxr-xr-x 4 tessus wheel 128 2022-02-15 20:23 .ci > -rw-r--r-- 1 tessus wheel 313 2022-02-15 20:23 .cirrus.yml > -rw-r--r-- 1 tessus wheel 576 2022-02-15 20:23 .clang-format > -rw-r--r-- 1 tessus wheel 795 2022-02-15 20:23 .drone.yml > -rw-r--r-- 1 tessus wheel 35 2022-02-15 20:23 .git > drwxr-xr-x 3 tessus wheel 96 2022-02-15 20:23 .github > -rw-r--r-- 1 tessus wheel 32 2022-02-15 20:23 .gitignore > -rw-r--r-- 1 tessus wheel 4141 2022-02-15 20:23 .travis.yml > -rw-r--r-- 1 tessus wheel 1937 2022-02-15 20:23 CMakeLists.txt > -rw-r--r-- 1 tessus wheel 1086 2022-02-15 20:23 LICENSE > -rw-r--r-- 1 tessus wheel 35982 2022-02-15 20:23 README.md > drwxr-xr-x 4 tessus wheel 128 2022-02-15 20:23 cmake > drwxr-xr-x 5 tessus wheel 160 2022-02-15 20:23 examples > drwxr-xr-x 3 tessus wheel 96 2022-02-15 20:23 include > drwxr-xr-x 11 tessus wheel 352 2022-02-15 20:23 test > > I'm building AviSynth like this: > > [tessus@epsilon3 0 ~/data/ext/ffmpeg/compile/AviSynthPlus] > > mkdir avisynth-build && cd avisynth-build > cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DBUILD_SHARED_LIBS=OFF .. > make VersionGen install > > ---- > > Until 2 days ago I could compile ffmpeg with AviSynth 3.5.1 just fine. So > something must have made my configure to fail. > > I can't reproduce under the 10.14 VM. BUILD_SHARED_LIBS or not, if filesystem isn't present, it stops with a missing header error, and if it was properly '--recursive'ly cloned, the build succeeds. The only thing I can think of at this point is that the default Command Line Developer Tools fetch the utilities from Xcode 10, which are blissfully unaware of things Apple might have tried getting clever about in Xcode 11. That repeated 'error: <blank> is unavailable: introduced in macOS 10.15' message seems like something is new enough to *know* about it being present in 10.15, and might be interfering with it somehow. There is another option, basically what Gyan suggested earlier: grab the release build of 3.7.1, fetch the extra headers from the Github repo, then copy either all the contents of the tarball's /usr directory into the system /usr directory (or wherever your working ${prefix} is), or just the 'avisynth' directory into ${prefix}/include. Then try FFmpeg again. curl -L -O https://github.com/AviSynth/AviSynthPlus/releases/download/v3.7.1/AviSynthPlus_3.7.1_macOS_10.13_._10.14_x64-filesonly.tar.xz tar -xJvf AviSynthPlus_3.7.1_macOS_10.13_._10.14_x64-filesonly.tar.xz cd avisynthplus_3.7.1_macOS_10.13_\&_10.14_x64-filesonly/usr/include/avisynth/avs curl -L -o arch.h https://raw.githubusercontent.com/AviSynth/AviSynthPlus/master/avs_core/core/arch.h.in curl -L -o version.h https://raw.githubusercontent.com/AviSynth/AviSynthPlus/master/avs_core/core/version.h.in cd ../../../ sudo cp -R * /usr or cd ../../ sudo cp -R avisynth /usr/include The first option will at least allow you to test that AviSynth works when trying to use it with FFmpeg, because it'll make sure libavisynth.dylib is present. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-16 7:37 ` Stephen Hutchinson @ 2022-02-16 18:25 ` Helmut K. C. Tessarek 2022-02-16 23:04 ` hydra3333 2022-02-17 0:55 ` Stephen Hutchinson 0 siblings, 2 replies; 35+ messages in thread From: Helmut K. C. Tessarek @ 2022-02-16 18:25 UTC (permalink / raw) To: Stephen Hutchinson, FFmpeg development discussions and patches, ffmpeg -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2022-02-16 02:37, Stephen Hutchinson wrote: > There is another option, basically what Gyan suggested earlier: grab the > release build of 3.7.1, fetch the extra headers from the Github repo, > then copy either all the contents of the tarball's /usr directory into > the system /usr directory (or wherever your working ${prefix} is), or > just the 'avisynth' directory into ${prefix}/include. Then try FFmpeg > again. This does not work. I compile static binaries. The filesonly tarball only has dylibs. As I mentioned nefore:. 3 days ago everything worked fine. Now the ffmpeg builds are broken and I can no longer compile ffmpeg. Is there any chancf you can add something to make it work again with 3.5.1 which compiled withtout issues on macOS 10.14 and which I've been using since it was released. - -- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944 /* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */ -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE191csiqpm8f5Ln9WvgmFNJ1E3QAFAmINQXwACgkQvgmFNJ1E 3QAphA//aAu21aLcSYXTtFdb2DlW/lAdN3y7MhIftRXuy3zqTy7BnPOpiWwm6jtw lq7Ck4IJMtFSbtH2Xh7RHqYKk1UVNZiwjIiPHhx/mBDxr+40wRdV44u00NPuQaGl 3ZHHqVSlODr0TSR9HjsW1ywM5BcxX4+FiilFHyM0JVlxTpEp6kqyisN8pRsL3Zyk o00DVvTvTQD2GDd/eN+TRVl39d+8HD0DU16PzKF6ptuQs7Xyehoh/gt89fIhv5om 7/JWhJY9ritGQYyjzZq8J7vUrQ4dB7dLQMHbULnDaRC+7XQLdeTw5IU5NuNxqw4C IUh4PbuYiiVLK0cE5HpvlPs6LwbkVvbw6Er9QtOUAtWEIys+d0sQxS5STm4NqUrB 92MXmkPqwDE8MgW5QJGo2n+vT1N4zDT49ot9aIa5NGb7PJ3WLRmqcx6RUbUKPPXn JxtM1JYaVGHQIkqzxXh1Y8nWaMX5ynkXXj/TqIL8qjOuGgpaaqX9+mo6Uj7ZU3Vp 94AvAofrTXL6t7ZvnQGR53GNwroXsmy9/ffxZLhQSRQZj7oUasIeXRgDWkuJFaPd CDvda7MXBw2A3v1Z60GhIYwZe2rbpsCL61lHFX0SmcIjy8eLk0ZbucwapnpCit0Y IVtRbJCoDDrSCEwXgmXGkrlQ/KXGlCAX35C4Rw8T5hJLKqShE58= =oTu0 -----END PGP SIGNATURE----- _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-16 18:25 ` Helmut K. C. Tessarek @ 2022-02-16 23:04 ` hydra3333 2022-02-16 23:13 ` Helmut K. C. Tessarek 2022-02-17 0:55 ` Stephen Hutchinson 1 sibling, 1 reply; 35+ messages in thread From: hydra3333 @ 2022-02-16 23:04 UTC (permalink / raw) To: 'FFmpeg development discussions and patches' > On 2022-02-16 02:37, Stephen Hutchinson wrote: > > There is another option, basically what Gyan suggested earlier: grab the > > release build of 3.7.1, fetch the extra headers from the Github repo, > > then copy either all the contents of the tarball's /usr directory into > > the system /usr directory (or wherever your working ${prefix} is), or > > just the 'avisynth' directory into ${prefix}/include. Then try FFmpeg > > again. > > This does not work. I compile static binaries. The filesonly tarball only > has dylibs. > > As I mentioned nefore:. 3 days ago everything worked fine. Now the ffmpeg > builds are broken and I can no longer compile ffmpeg. > > Is there any chancf you can add something to make it work again with 3.5.1 > which compiled withtout issues on macOS 10.14 and which I've been using > since it was released. > > - -- > regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Hello. This probably will not help you, since I cross-compile under Ubuntu for target Win10. However, for the record I did this, not quite according to the git instructions, and it did not abort: # Changed dir from /home/u/Desktop/_working/workdir/x86_64/AviSynthPlus_git to subfolder avisynth-build cmake .. -DCMAKE_TOOLCHAIN_FILE="/home/u/Desktop/_working/workdir/mingw_toolchain.cmake" -G"Ninja" -DCMAKE_INSTALL_PREFIX=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32 -DHEADERS_ONLY:bool=on ninja VersionGen -j 6 ninja install -j 6 Cheers _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-16 23:04 ` hydra3333 @ 2022-02-16 23:13 ` Helmut K. C. Tessarek 0 siblings, 0 replies; 35+ messages in thread From: Helmut K. C. Tessarek @ 2022-02-16 23:13 UTC (permalink / raw) To: ffmpeg-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2022-02-16 18:04, hydra3333@gmail.com wrote: > This probably will not help you, since I cross-compile under Ubuntu for > target Win10. However, for the record I did this, not quite according to > the git instructions, and it did not abort: > > # Changed dir from > /home/u/Desktop/_working/workdir/x86_64/AviSynthPlus_git to subfolder > avisynth-build > > cmake .. > -DCMAKE_TOOLCHAIN_FILE="/home/u/Desktop/_working/workdir/mingw_toolchain.cma ke" > -G"Ninja" > -DCMAKE_INSTALL_PREFIX=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64 - -mingw32/x86_64-w64-mingw32 > -DHEADERS_ONLY:bool=on > > ninja VersionGen -j 6 > > ninja install -j 6 The file you are referencing is not even in the AviSynthPlus source tree. Also a mingw cmake file would not be very useful on macOS. But thanks anyway. - -- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944 /* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */ -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE191csiqpm8f5Ln9WvgmFNJ1E3QAFAmINhS4ACgkQvgmFNJ1E 3QDtrBAAr+DFCh6UXswzSlJ7lE6J8GX7FxofZgq7H97L5SgCOBS7azjuF9isM6d1 OrY2WqGPsBiK6NnTvlDUtaPmtxJkZQ8OEc2YwfsX1K0lSdjWmtBlbjIoWNZTiwja H1xydX+XueWeb6Gm5c4NEXNyxsIquFW8nGTX2q8mZ8w54K3nFZhNhbPTtskzS0k6 GUyFYf8RxMICyXO1EcJhsHLu1zWTXDV72yVEIiHcyg4SNjggkJv9f4lnJSTZ9Igd FzZAWT+Z7tLg8laAftFUDeEWj1vjbUF007ldvBUl6lbg5aWfLdvsau3eEn4EKeSQ Sspl5mieo/XKljdqOugfaPRNdaK4BNv9Q/oX6gxXJ9jYacU5HhHwo8FekKXP+wbn VNvB9sYdzp/NaAlPjQE71e/jdQHMA74ETb3duV3fjaWCPehnxX0iOWhBPfhPzM0O RerC+6rCoYEJoD30jHuYDPB029Z/jdU0Y6BUCWt03MSG2M1bknsKxTcrYjRJFJ+V Rzrnh34iRwTU5sBwoevG6oI6aojHSjXY9aY4sfHmttVbkpPbVpEVpyO8/QRaysBI 0r908qY3Q1GjTBX8iNKiGyp4E0DUbtVBb7oki/7X7ZR7klSuM2jyRt+Fj7OlQCsA 4NMB3iXwMODo/OwAQ1AYVdF0j6vl+auwxo9gDMcrlHstNRehOGI= =hF9U -----END PGP SIGNATURE----- _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-16 18:25 ` Helmut K. C. Tessarek 2022-02-16 23:04 ` hydra3333 @ 2022-02-17 0:55 ` Stephen Hutchinson 2022-02-17 22:19 ` Helmut K. C. Tessarek 1 sibling, 1 reply; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-17 0:55 UTC (permalink / raw) To: Helmut K. C. Tessarek, FFmpeg development discussions and patches, ffmpeg On 2/16/22 1:25 PM, Helmut K. C. Tessarek wrote: > > On 2022-02-16 02:37, Stephen Hutchinson wrote: >> There is another option, basically what Gyan suggested earlier: grab the >> release build of 3.7.1, fetch the extra headers from the Github repo, >> then copy either all the contents of the tarball's /usr directory into >> the system /usr directory (or wherever your working ${prefix} is), or >> just the 'avisynth' directory into ${prefix}/include. Then try FFmpeg >> again. > > This does not work. I compile static binaries. The filesonly tarball only > has dylibs. > > As I mentioned nefore:. 3 days ago everything worked fine. Now the ffmpeg > builds are broken and I can no longer compile ffmpeg. > > Is there any chancf you can add something to make it work again with 3.5.1 > which compiled withtout issues on macOS 10.14 and which I've been using > since it was released. > > FFmpeg dlopens AviSynth, it only needs the headers and doesn't try to link it. It has never linked to AviSynth. If 3.5.1 is working (and by that I assume you mean you're opening a Version() script in FFplay and it's showing you the video clip with the version and copyright information), then libavisynth.dylib is somewhere on your DYLD_LIBRARY_PATH, and you could just as easily set DYLD_LIBRARY_PATH to the /usr/lib directory in the -filesonly package and that Version() script will start reporting 3.7.1 instead. After fetching the extra headers in that sequence of commands, copy the fixed-up /usr/include/avisynth in the -filesonly package to wherever it is on your system you point FFmpeg's configure to to see AviSynth's headers, whether that's the default /usr/local/include or /usr/include or somewhere in your build root. You can completely omit copying the .dylibs and it won't care. At this point, just use latest git, since that's where the HEADERS_ONLY fix resides: git clone https://github.com/AviSynth/AviSynthPlus cd AviSynthPlus mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DHEADERS_ONLY=ON ../ make VersionGen install And HEADERS_ONLY is exactly what it says on the tin: it only sets CMake to install the headers, and stops it from building the library, which wouldn't get linked to anyway. This all did expose a major problem with the version detection inside the frame properties initialization area in the demuxer, so that check needs to be simplified and not try to be so clever. Between HEADERS_ONLY from AviSynth+-git and the simplifying patch*, which I'll need to push sometime in the next day or so, that should completely resolve the problem. *http://ffmpeg.org/pipermail/ffmpeg-devel/2022-February/293128.html _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-17 0:55 ` Stephen Hutchinson @ 2022-02-17 22:19 ` Helmut K. C. Tessarek 2022-02-18 0:21 ` Stephen Hutchinson 0 siblings, 1 reply; 35+ messages in thread From: Helmut K. C. Tessarek @ 2022-02-17 22:19 UTC (permalink / raw) To: Stephen Hutchinson, FFmpeg development discussions and patches, ffmpeg -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2022-02-16 19:55, Stephen Hutchinson wrote: > FFmpeg dlopens AviSynth, it only needs the headers and doesn't try to > link it. It has never linked to AviSynth. This I find strange. dlopen is rather useless when you create static binaries unless you want to ship X diffreent dylibs or SOs with the binary. There's also no static version of frei0r. Very annoying. > If 3.5.1 is working (and by that I assume you mean you're opening a > Version() script in FFplay and it's showing you the video clip with the > version and copyright information), then libavisynth.dylib is somewhere > on your DYLD_LIBRARY_PATH, and you could just as easily set > DYLD_LIBRARY_PATH to the /usr/lib directory in the -filesonly package and > that Version() script will start reporting 3.7.1 instead. It's definitely not working, since I don't ship any dylibs. I always thought 3.5.1 li9nked a static lib, but I checked. It does not. Even if I wanted to I couldn't ship any dylibs, since I can't build AviSynthPlus on macOS 10.14. > At this point, just use latest git, since that's where the HEADERS_ONLY > fix resides: And HEADERS_ONLY is exactly what it says on the tin: it only > sets CMake to install the headers, and stops it from building the > library, which wouldn't get linked to anyway. Ok, this worked. I was able to compile ffmpeg again. At least now I know that avisynth won't work with static banaries unless people install dylibs themselves. - -- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944 /* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */ -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE191csiqpm8f5Ln9WvgmFNJ1E3QAFAmIOyeMACgkQvgmFNJ1E 3QDS7g//VMqsrxTK7uC/N65ydY4MvEOhqZJcAJqTtmyDStqWrgLOr1zeTutu359I G3ah7M9/BYnZVwiVDypLgvRBNLR9F7bgv4CdG+VaV2M5Ljuv8yqiLG4ohbY6BcC3 6Da+CV2X7ylDunnGuI+jFQ2+E/DrP6lJRvMweotsLZvluTU3PCGNIpOHxt6SLq1S eN9V9UluOZT/+YYk4XOWiWpYucDBvZbRUCfcZtckKESRwpRrZCMRO9ExJXdRvNRr gyy0EIIDqAHhoEyP7RkadFuHOco4Beppalru4+UEvSwWae2B2pr8pwfFh8RUvXk6 75SNWOzfQoyndvEQR4jDv3PLFswWMv8upeGoGJHsb0NcOY31Uk0Y58kMzbzDC/eT uK8Jp5+5Gx+uOG8k/dvKQK5TllnelApSFaVbyeuzrcRnphVi6ad6OtdSPBaWKjdD BljKMkAr/plpCsfuJ9THdXIo3Q0qwoXC4l/fL8Q35uiqYcOOa8Ax/FePe/srMDnp vxtDBBzo+8nA2305OUtErEAq0XhgCnSvOyfzoXx4fWxF39N15tU2VKTDoPAkjx9A 5dx/753wos5HewC5WeESzKCALXWu5l9r/sV/Jih8rf+8YXzJweMjso+Ca2B8e7bv 2nWvPMAcqtByklBnsVpkV3QTGDaxb2c1E4XhEoTchKjVKeFzrQo= =5yaK -----END PGP SIGNATURE----- _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version 2022-02-17 22:19 ` Helmut K. C. Tessarek @ 2022-02-18 0:21 ` Stephen Hutchinson 0 siblings, 0 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-18 0:21 UTC (permalink / raw) To: Helmut K. C. Tessarek, FFmpeg development discussions and patches, ffmpeg On 2/17/22 5:19 PM, Helmut K. C. Tessarek wrote: > > It's definitely not working, since I don't ship any dylibs. I always thought > 3.5.1 li9nked a static lib, but I checked. It does not. > > Even if I wanted to I couldn't ship any dylibs, since I can't build > AviSynthPlus on macOS 10.14. > It's really the same situation as Windows: users get the FFmpeg build from whoever builds it with AviSynth support enabled, and if they want to use that functionality, they can install the official release of AviSynth+ that we provide upstream. The .dll situation on Windows is one of several reasons for the use of dlopen, as well. That's why with 3.7.0 I started providing macOS builds in the releases in both installer .pkg and -filesonly tarball form, since I know some people prefer doing it that way. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties 2022-02-08 11:02 [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson ` (2 preceding siblings ...) 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version Stephen Hutchinson @ 2022-02-13 17:48 ` Stephen Hutchinson 3 siblings, 0 replies; 35+ messages in thread From: Stephen Hutchinson @ 2022-02-13 17:48 UTC (permalink / raw) To: FFmpeg development discussions and patches On 2/8/22 6:02 AM, Stephen Hutchinson wrote: > AviSynth+ 3.6.0 introduced support for frame properties, allowing > various metadata to be passed between filters or read out by > client programs. Using this, FFmpeg can read Color Range, Transfer > Characteristics, Matrix, Color Primaries, Chroma Location, and > Field Order information from AviSynth scripts. > > Reading frame properties through AviSynth's C interface was not > possible until a few months ago, though, so client programs that > use the C API need version 3.7.1 or higher to be able to take > advantage of it. > > Incorporates a previous patch by emcodem that fixes setting field > order on non-frameprop-aware versions of AviSynth. > > Stephen Hutchinson (2): > avisynth: use AviSynth+'s frame properties to set various fields > configure: check avisynth header version > > emcodem (1): > avisynth: corrected interlace detection > > configure | 4 +- > libavformat/avisynth.c | 266 ++++++++++++++++++++++++++++++++++++++--- > 2 files changed, 253 insertions(+), 17 deletions(-) > Since it's been about a week, if there aren't any objections that show up, I'll go ahead and push this later today or tomorrow. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2022-09-04 19:14 UTC | newest] Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-02-08 11:02 [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 1/3] avisynth: corrected interlace detection Stephen Hutchinson 2022-02-13 23:33 ` Stephen Hutchinson 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson 2022-02-13 23:34 ` Stephen Hutchinson 2022-02-19 20:39 ` Andreas Rheinhardt 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson 2022-02-19 21:41 ` [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized Stephen Hutchinson 2022-02-19 22:45 ` Andreas Rheinhardt 2022-02-20 0:05 ` Stephen Hutchinson 2022-02-20 0:09 ` [FFmpeg-devel] [PATCH] avformat/avisynth: remove framedata variable Stephen Hutchinson 2022-02-23 18:04 ` Stephen Hutchinson 2022-02-23 18:03 ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson 2022-02-19 21:45 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson 2022-08-24 17:04 ` Steinar Apalnes 2022-08-25 0:11 ` Stephen Hutchinson 2022-08-25 7:46 ` Steinar Apalnes 2022-09-04 19:14 ` Stephen Hutchinson 2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version Stephen Hutchinson 2022-02-13 23:34 ` Stephen Hutchinson 2022-02-14 11:56 ` Gyan Doshi 2022-02-14 22:03 ` Stephen Hutchinson 2022-02-15 22:02 ` Helmut K. C. Tessarek 2022-02-15 23:55 ` Stephen Hutchinson 2022-02-16 1:33 ` Helmut K. C. Tessarek 2022-02-16 3:50 ` Stephen Hutchinson 2022-02-16 5:10 ` Helmut K. C. Tessarek 2022-02-16 7:37 ` Stephen Hutchinson 2022-02-16 18:25 ` Helmut K. C. Tessarek 2022-02-16 23:04 ` hydra3333 2022-02-16 23:13 ` Helmut K. C. Tessarek 2022-02-17 0:55 ` Stephen Hutchinson 2022-02-17 22:19 ` Helmut K. C. Tessarek 2022-02-18 0:21 ` Stephen Hutchinson 2022-02-13 17:48 ` [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git