aboutsummaryrefslogtreecommitdiff
path: root/encoder/ixheaace_mps_nlc_enc.c
diff options
context:
space:
mode:
authorNikhil Bhavikatti <97579291+nikhil-bhavikatti@users.noreply.github.com>2023-07-21 19:29:46 +0530
committerGitHub <noreply@github.com>2023-07-21 19:29:46 +0530
commitaf3f10a9bee9caceb59a4a5423d06f01f533a30e (patch)
tree8add0c97a54ed6a7a042f2ba760cadfdddce7ef5 /encoder/ixheaace_mps_nlc_enc.c
parent797de4d1e90e8bcfc19fdae6923a116d761ba0d5 (diff)
downloadlibxaac-af3f10a9bee9caceb59a4a5423d06f01f533a30e.tar.gz
Encoder enhancements for USAC along with DRC (#38)
Diffstat (limited to 'encoder/ixheaace_mps_nlc_enc.c')
-rw-r--r--encoder/ixheaace_mps_nlc_enc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/encoder/ixheaace_mps_nlc_enc.c b/encoder/ixheaace_mps_nlc_enc.c
index c56bc30..4f5dae7 100644
--- a/encoder/ixheaace_mps_nlc_enc.c
+++ b/encoder/ixheaace_mps_nlc_enc.c
@@ -170,9 +170,11 @@ static VOID ixheaace_mps_212_apply_pcm_coding(ixheaace_bit_buf_handle pstr_bit_b
grp_val = 0;
for (lvl = 0; lvl < grp_len; lvl++) {
idx = val + lvl;
- next_val = (in_data_2 == NULL) ? in_data_1[idx]
- : (in_data_1 == NULL) ? in_data_2[idx]
- : ((idx & 01) ? in_data_2[idx >> 1] : in_data_1[idx >> 1]);
+ next_val = (in_data_2 == NULL)
+ ? in_data_1[idx]
+ : (in_data_1 == NULL)
+ ? in_data_2[idx]
+ : ((idx & 01) ? in_data_2[idx >> 1] : in_data_1[idx >> 1]);
grp_val = grp_val * n_levels + next_val + offset;
}
ixheaace_write_bits(pstr_bit_buf, grp_val, pcm_block_size[grp_len]);
@@ -856,9 +858,11 @@ static VOID ixheaace_mps_515_apply_pcm_coding(ixheaace_bit_buf_handle pstr_bit_b
grp_val = 0;
for (j = 0; j < grp_len; j++) {
idx = i + j;
- next_val = (in_data_2 == NULL) ? in_data_1[idx]
- : (in_data_1 == NULL) ? in_data_2[idx]
- : ((idx & 01) ? in_data_2[idx >> 1] : in_data_1[idx >> 1]);
+ next_val = (in_data_2 == NULL)
+ ? in_data_1[idx]
+ : (in_data_1 == NULL)
+ ? in_data_2[idx]
+ : ((idx & 01) ? in_data_2[idx >> 1] : in_data_1[idx >> 1]);
grp_val = grp_val * n_levels + next_val + offset;
}