On 8/30/22 7:17 PM, Andreas Rheinhardt wrote:
{ "avisynth_flags", "set flags related to reading frame properties from script (AviSynth+ v3.7.1 or higher)", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 1}, 0, 1, AV_OPT_FLAG_DECODING_PARAM, "flags" },This is wrong. It should be { "avisynth_flags", "set flags related to reading frame properties from script (AviSynth+ v3.7.1 or higher)", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = AVISYNTH_FRAMEPROP_FIELD_ORDER | AVISYNTH_FRAMEPROP_RANGE | AVISYNTH_FRAMEPROP_PRIMARIES | AVISYNTH_FRAMEPROP_TRANSFER | AVISYNTH_FRAMEPROP_MATRIX | AVISYNTH_FRAMEPROP_CHROMA_LOCATION}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM, "flags" } The default option should be removed. Users can then set the options via avisynth_flags=+sar-range or via avisynth_flags=matrix or however they wish. The AVISYNTH_FRAMEPROP_DEFAULT should also be removed (at least, it should not be part of the bitfield, but you can of course add a define (or an enum value) equivalent to the default value I used above and you can use that for the default value above); to know whether field order should be exported, you simply query via "if (avs->flags & AVISYNTH_FRAMEPROP_FIELD_ORDER)". For this it is of course important that the default value is a combination of other bits of the bitfield and not a bit of its own.
I don't know why I didn't think to use it directly in the avisynth_flags line. Thanks. _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
