[FFmpeg-devel] [PATCH] Populate field order returned by avs script, Trac Ticket 8757

Stephen Hutchinson qyot27 at gmail.com
Thu Jan 21 15:10:53 EET 2021


On 1/17/21 1:23 PM, emcodem at ffastrans.com wrote:
> On 2021-01-17 09:02, wrote Stephen Hutchinson:
>> Comment bikeshedding aside, LGTM, but the avs_is* API usage added here
>> needs to be reflected in the AVSC_DECLARE_FUNC and LOAD_AVS_FUNC blocks.
>> If those parts of the API are present in 2.5, the LOAD_AVS_FUNC can be a
>> 0. If they were added in 2.6 (or Plus, but I know these would have to be
>> from classic AviSynth), then it should be 1.
> 
> What i am not able to do is to add the used convenience functions 
> avs_is_tff and bff to AVSC_DECLARE_FUNC and LOAD_AVS_FUNC, it refuses to 
> compile when i do so. IMHO this is because it is just convenience 
> functions that's function body is defined in the linked avisynth_c.h 
> file instead of being exported by the avisynth api lib.
> The existing code in avisynth.c also uses such convenience functions 
> without adding them to the declaration, examples:
> avs_has_video, line 524
> avs_is_clip, line 571
> 
> Also, i found it safe to use the convenience functions avs_is_tff and 
> bff because the minimum required version is 2.6 and Plus or above, so i 
> hoped the functions will be always available.

Yeah, never mind about that.  I didn't notice that those are declared
AVSC_INLINE, not AVSC_API, so they don't get used through the dynamic
API loader.

The comment formatting seems to have been messed up in the second
version, though.

/* 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. */


More information about the ffmpeg-devel mailing list