Skip to content

Apply k=1 tweak for beta=1, ref and noref #197

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pvq.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ int od_pvq_compute_k(od_val32 qcg, int itheta, od_val32 theta, int noref, int n,
#endif
if (noref) {
if (qcg == 0) return 0;
if (n == 15 && qcg == OD_CGAIN_SCALE && beta > OD_BETA(1.25)) {
if (n == 15 && qcg == OD_CGAIN_SCALE) {
return 1;
}
else {
Expand All @@ -914,6 +914,7 @@ int od_pvq_compute_k(od_val32 qcg, int itheta, od_val32 theta, int noref, int n,
approximation for the fact that the coefficients aren't identically
distributed within a band so at low gain the number of dimensions that
are likely to have a pulse is less than n. */
if (n == 15 && itheta == 1 && beta == OD_BETA(1)) return 1;
if (nodesync) {
#if defined(OD_FLOAT_PVQ)
return OD_MAXI(1, (int)floor(.5 + (itheta - .2)*sqrt((n + 2)/2)));
Expand Down