[vlc-devel] [PATCH] amem: fix integer overflow above 262143Hz
Farid HAMMANE
farid.hammane at gmail.com
Tue Jan 14 15:32:24 CET 2020
Hello,
Thank you for your review and for your response.
I agree. I saw no reason to do that either.
We could use the same types as in audio_sample_format_t (to be consistent
with it):
struct
{
unsigned rate;
uint8_t channels;
}
or do as you suggested:
struct
{
unsigned rate;
unsigned channels;
}
I will update the patch at your convenience.
Best regards
Farid
On Tue, Jan 14, 2020 at 2:31 PM Thomas Guillem <thomas at gllm.fr> wrote:
> Hello,
>
> I checked the code, I don't think there is a real use of specifying rate
> and channels size.
> Maybe I missed something obvious but why not just remove the size
> specifier like the following :
>
> union
> {
> struct
> {
> void *setup_opaque;
> };
> struct
> {
> unsigned rate;
> unsigned channels;
> };
> };
>
> On Wed, Jan 8, 2020, at 11:47, Jean-Baptiste Kempf wrote:
>
> I do not know, but usually s16n, fl32 are the main ones. fl64 I do not
> know the use, tbh.
>
> On Wed, Jan 8, 2020, at 11:29, Farid HAMMANE wrote:
>
> Hello Jean-Baptiste,
>
> Thank you for your suggestion. Yesterday I sent a new patch taking into
> account your suggestion.
>
> My next patch in amem will be the support of different formats.
> I have identified some of them and I would like to ask you if you have any
> needs or suggestions ?
>
> The formats already identified are: s16n, s24n, s32n, fl32, fl64.
>
> Thank you in advance for your response
>
> Best regards
> Farid
>
> On Tue, Jan 7, 2020 at 11:00 AM Jean-Baptiste Kempf <jb at videolan.org>
> wrote:
>
>
> Hello,
>
> It is just that we currently have samples with 18 channels and some with
> ambisonic HOA 3rd channel (16channels).
> Object-based will grow to 64 channels.
>
> I would suggest to cut with channels at 10 and the rest for the rate.
>
> best,
>
> On Tue, Jan 7, 2020, at 09:12, Farid HAMMANE wrote:
>
> Hello Jean-Basptite,
>
> Thank you for your review.
>
> I agree that the number of channels grows in audio
> systems. If there is no other reason except to save
> space by sharing 32bits, I can declare them
> as in audio_sample_format_t, i.e. an unsigned int
> for the frequency and an uint16_t for the number of
> channels. Is it ok for you ?
>
> Note that as I wrote in the commit message, amem
> currently does not support more than 8 channels
>
> Best regards
> Farid
>
> On Tue, Jan 7, 2020 at 1:14 AM Jean-Baptiste Kempf <jb at videolan.org>
> wrote:
>
> Hello,
>
> On Tue, Jan 7, 2020, at 01:10, Farid Hammane wrote:
> > Today, the maximum value allowed for the sample rate
> > is 384000. 19 bits would be enough. The maximum value
> > allowed for the number of channels is 8. 4 bits are enough.
>
> We currently support more than 8 channels in the core.
> Planning for 16 seems a minimum, IMHO.
>
>
> --
> Jean-Baptiste Kempf - President
> +33 672 704 734
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
>
> --
> Jean-Baptiste Kempf - President
> +33 672 704 734
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
>
> --
> Jean-Baptiste Kempf - President
> +33 672 704 734
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200114/58f5997d/attachment.html>
More information about the vlc-devel
mailing list