简体   繁体   English

什么是 AV_SAMPLE_FMT_FLT

[英]what is AV_SAMPLE_FMT_FLT

SwrContext *swr_ctx = swr_alloc_set_opts(NULL,                          
                        AV_CH_LAYOUT_STEREO,
                        AV_SAMPLE_FMT_FLT,
                        sample_rate,
                        pCodecParameters->channel_layout,                                                                               
                  
                        pCodecParameters->format,
                        pCodecParameters->sample_rate,                          
                        0,
                        NULL);

what exactly AV_SAMPLE_FMT_FLT is? AV_SAMPLE_FMT_FLT 到底是什么? i already read docs but i want to know that what is float layout means in the context of Audio.我已经阅读了文档,但我想知道什么是浮动布局在音频上下文中的含义。 How actually binary data of audio will look in that format.音频的二进制数据在该格式中的实际外观。

It means every sample is in single buffer and per sample data is 32bit float.这意味着每个样本都在单个缓冲区中,每个样本数据是 32 位浮点数。 Buffer AFAIK structured like this:缓冲区 AFAIK 的结构如下:

[SAMPLE_CH0][SAMPLE_CH1]...[SAMPLE_CHn]
[SAMPLE_CH0][SAMPLE_CH1]...[SAMPLE_CHn]

So on so forth.以此类推。 This repeats the number of "samples" times.这会重复“样本”的次数。
I may be wrong though, you need to check it yourself.我可能错了,你需要自己检查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 怎么把AV_PIX_FMT_BGRA转换成PIX_FMT_PAL8? - How to convert from AV_PIX_FMT_BGRA to PIX_FMT_PAL8? frexp(FLT_MAX,…)应该返回什么? - What should frexp(FLT_MAX, …) return? av_write_header - 样本格式错误 - av_write_header - Error with sample format 为什么FLT_MAX和FLT_MIN不是正的和负的无穷大,它们的用途是什么? - Why are FLT_MAX and FLT_MIN not positive and negative infinity, and what is their use? 如何查看/保存格式为 AV_PIX_FMT_YUVJ420P 的 AVFrame 到文件 - How to view/save AVFrame have format AV_PIX_FMT_YUVJ420P to file #define Dbg(fmt,…) (0) 是什么意思? 警告:表达式无效 - What does #define Dbg(fmt,…) (0) mean? warning: expression has no effect av[1] 和 av[1][0] 不是同一个地址? - av[1] and av[1][0] Not the same address? AV_PIX_FMT_NV12 表示它具有 12bpp 位像素颜色,但数据为 uint8_t 如何修改帧中的像素? - AV_PIX_FMT_NV12 says it has a 12bpp bit pixel color but data is uint8_t how can I modify the pixels from a frame? ffmpeg c api中的av_register_all()和avcodec_register_all()有什么区别? - What is the difference between av_register_all() vs avcodec_register_all() in ffmpeg c api? 在C#.NET中,Python的struct.pack(fmt,v1,v2,…)等效于什么? - What is the equivalent of Python's struct.pack(fmt, v1, v2, …) in C# .NET?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM