Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G.726 codec bug #27

Open
bulletnoid opened this issue May 25, 2022 · 2 comments
Open

G.726 codec bug #27

bulletnoid opened this issue May 25, 2022 · 2 comments

Comments

@bulletnoid
Copy link

bulletnoid commented May 25, 2022

g726 解码有爆音, 对比解码 pcm 文件与 ffmpeg 转码的结果不同
实测发现 g726 state 有错误

其中

if (dqsez != 0)
if (pks1==0)
state.a[0]+=192;
else
state.a[0] -= 192;

应为

if (dqsez != 0) {
    if (pks1 == 0)
        state.a[0] += 192;
    else
        state.a[0] -= 192;
}
@bulletnoid
Copy link
Author

另外 g726 编码只有大端序, 设备基本是小端序的, 需要一个 bit stream 来处理小端序 IO
可以参考 https://github.com/herbix/bitstream

@glaciall
Copy link
Owner

我怎么看你发的那两段代码是一模一样的呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants