Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Chun-Min Chang <chun.m.chang@gmail.com>
Subject: Re: [FFmpeg-devel] [PATCH] Allow enabling SVC in libaomenc
Date: Tue, 25 Jun 2024 10:45:48 +0200
Message-ID: <171930514894.21847.6981635989494341833@lain.khirnov.net> (raw)
In-Reply-To: <20240624185059.16797-1-chun.m.chang@gmail.com>

Quoting Chun-Min Chang (2024-06-24 20:50:59)
> +        const AVDictionaryEntry *en = NULL;
> +        while ((en = av_dict_iterate(ctx->svc_parameters, en))) {
> +            if (!strlen(en->value))
> +                return AVERROR(EINVAL);
> +
> +            if (!strcmp(en->key, "number_spatial_layers"))
> +                svc_params.number_spatial_layers = strtoul(en->value, NULL, 10);
> +            else if (!strcmp(en->key, "number_temporal_layers"))
> +                svc_params.number_temporal_layers = strtoul(en->value, NULL, 10);
> +            else if (!strcmp(en->key, "max_quantizers"))
> +                aom_svc_parse_int_array(svc_params.max_quantizers, en->value, AOM_MAX_LAYERS);
> +            else if (!strcmp(en->key, "min_quantizers"))
> +                aom_svc_parse_int_array(svc_params.min_quantizers, en->value, AOM_MAX_LAYERS);
> +            else if (!strcmp(en->key, "scaling_factor_num"))
> +                aom_svc_parse_int_array(svc_params.scaling_factor_num, en->value, AOM_MAX_SS_LAYERS);
> +            else if (!strcmp(en->key, "scaling_factor_den"))
> +                aom_svc_parse_int_array(svc_params.scaling_factor_den, en->value, AOM_MAX_SS_LAYERS);
> +            else if (!strcmp(en->key, "layer_target_bitrate"))
> +                aom_svc_parse_int_array(svc_params.layer_target_bitrate, en->value, AOM_MAX_LAYERS);
> +            else if (!strcmp(en->key, "framerate_factor"))
> +                aom_svc_parse_int_array(svc_params.framerate_factor, en->value, AOM_MAX_TS_LAYERS);

So you declare a new dict-type option, then parse this dict manually
instead of AVOptions doing this work for you? Why?

-- 
Anton Khirnov
_______________________________________________
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".

  reply	other threads:[~2024-06-25  8:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 18:50 Chun-Min Chang
2024-06-25  8:45 ` Anton Khirnov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-11 20:22 Chun-Min Chang
2024-06-11 20:28 ` Chun-Min Chang
2024-06-05 21:34 Chun-Min Chang
2024-06-05 22:43 ` Michael Niedermayer

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=171930514894.21847.6981635989494341833@lain.khirnov.net \
    --to=anton@khirnov.net \
    --cc=chun.m.chang@gmail.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