From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 3/9] avformat/avisynth: add read_frameprops option
Date: Wed, 31 Aug 2022 01:17:44 +0200
Message-ID: <GV1P250MB0737B8D401A0F06A644438218F799@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <b59a5eb9-fb44-f86a-8f35-0b9db713fa57@gmail.com>
Stephen Hutchinson:
> On 8/28/22 8:41 PM, Andreas Rheinhardt wrote:
>> This will make frameprops a global on-off which overrides everything
>> else even if some of the "else" stuff has been enabled explicitly. Worse
>> yet, if you want to disable everything except exactly one field, you
>> have to leave frameprops enabled and disable everything else explicitly.
>>
>> Why not use a bitfield (with AV_OPT_TYPE_FLAGS and AV_OPT_TYPE_CONST)?
>> These properties certainly seem like a bitfield and the above would be
>> easily achievable with it.
>>
>
> How are flags supposed to be set to on by default? With av_dict_set or
> a different mechanism? Because the closest I was able to get¹,
>
> if(avs->flags & AVISYNTH_FRAMEPROP_FIELD_ORDER |
> AVISYNTH_FRAMEPROP_DEFAULT) {
>
> ends up correctly setting the flags that should be on by default,
> with the new sar flag able to be enabled or disabled, but the ones
> flagged as default refuse to be disabled now.
>
> ¹https://github.com/qyot27/FFmpeg/commit/6d3d6108145f9c7ac2dfcdaf09852b7472f6ca7f
>
{ "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.
- 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".
next prev parent reply other threads:[~2022-08-30 23:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 0:02 [FFmpeg-devel] [PATCH 0/9] avisynth: add user options Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 1/9] avformat/avisynth: read _SARNum/_SARDen from frame properties Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 2/9] avformat/avisynth: add read_frameprop_sar option Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 3/9] avformat/avisynth: add read_frameprops option Stephen Hutchinson
2022-08-29 0:41 ` Andreas Rheinhardt
2022-08-30 23:04 ` Stephen Hutchinson
2022-08-30 23:17 ` Andreas Rheinhardt [this message]
2022-08-31 0:07 ` Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 4/9] avformat/avisynth: add read_frameprop_field_order option Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 5/9] avformat/avisynth: add read_frameprop_range option Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 6/9] avformat/avisynth: add read_frameprop_primaries option Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 7/9] avformat/avisynth: add read_frameprop_transfer option Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 8/9] avformat/avisynth: add read_frameprop_matrix option Stephen Hutchinson
2022-08-29 0:02 ` [FFmpeg-devel] [PATCH 9/9] avformat/avisynth: add read_frameprop_chroma_location option Stephen Hutchinson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=GV1P250MB0737B8D401A0F06A644438218F799@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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