[FFmpeg-devel] [PATCH] Allow enabling SVC in libaomenc

Anton Khirnov anton at khirnov.net
Tue Jun 25 11:45:48 EEST 2024


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


More information about the ffmpeg-devel mailing list