summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorClaudio Freire <klaussfreire@gmail.com>2016-01-08 05:04:37 -0300
committerClaudio Freire <klaussfreire@gmail.com>2016-01-13 05:28:34 -0300
commit509f168017462cf301d16e3c406337072c81c783 (patch)
treeefcbbe8670fc9ddbd13cb1202c0aee9607d97ebb /libavcodec/aacenc.c
parent00d481b2c37552634490443b3af6dc04e6b42239 (diff)
AAC encoder: don't apply MS on special bands
Change the condition for application of the M/S transform to match that of the decoder. Namely, that no special coding books must be in use in either channel. While the condition ought to be equivalent to the current one when the invariant of is_mask is kept, matching the decoder's condition is safer and easier to maintain.
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 20a8f5a857..4b94f98823 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -300,8 +300,8 @@ static void apply_mid_side_stereo(ChannelElement *cpe)
* ms_mask is set.
*/
if (!cpe->ms_mask[w*16 + g] || cpe->is_mask[w*16 + g]
- || cpe->ch[0].band_type[w*16 + g] == NOISE_BT
- || cpe->ch[1].band_type[w*16 + g] == NOISE_BT) {
+ || cpe->ch[0].band_type[w*16 + g] >= NOISE_BT
+ || cpe->ch[1].band_type[w*16 + g] >= NOISE_BT) {
start += ics->swb_sizes[g];
continue;
}