mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Smacker Audio stereo fix
Originally committed as revision 8460 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5d171758c0
commit
c72e05ba0f
@ -620,14 +620,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(bits) { //decode 16-bit data
|
if(bits) { //decode 16-bit data
|
||||||
pred[0] = get_bits(&gb, 8);
|
for(i = stereo; i >= 0; i--)
|
||||||
pred[0] |= get_bits(&gb, 8);
|
pred[i] = bswap_16(get_bits(&gb, 16));
|
||||||
*samples++ = pred[0];
|
for(i = 0; i < stereo; i++)
|
||||||
if(stereo) {
|
*samples++ = pred[i];
|
||||||
pred[1] = get_bits(&gb, 8);
|
|
||||||
pred[1] |= get_bits(&gb, 8);
|
|
||||||
*samples++ = pred[1];
|
|
||||||
}
|
|
||||||
for(i = 0; i < unp_size / 2; i++) {
|
for(i = 0; i < unp_size / 2; i++) {
|
||||||
if(i & stereo) {
|
if(i & stereo) {
|
||||||
if(vlc[2].table)
|
if(vlc[2].table)
|
||||||
@ -658,12 +654,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { //8-bit data
|
} else { //8-bit data
|
||||||
pred[0] = get_bits(&gb, 8);
|
for(i = stereo; i >= 0; i--)
|
||||||
*samples++ = (pred[0] - 0x80) << 8;
|
pred[i] = get_bits(&gb, 8);
|
||||||
if(stereo) {
|
for(i = 0; i < stereo; i++)
|
||||||
pred[1] = get_bits(&gb, 8);
|
*samples++ = (pred[i] - 0x80) << 8;
|
||||||
*samples++ = (pred[1] - 0x80) << 8;
|
|
||||||
}
|
|
||||||
for(i = 0; i < unp_size; i++) {
|
for(i = 0; i < unp_size; i++) {
|
||||||
if(i & stereo){
|
if(i & stereo){
|
||||||
if(vlc[1].table)
|
if(vlc[1].table)
|
||||||
|
Loading…
Reference in New Issue
Block a user