Browse code

s302m: fix resampling for 16 and 24bits.

Baptiste Coudurier authored on 2011/06/04 21:36:30
Showing 1 changed files
... ...
@@ -97,7 +97,7 @@ static int s302m_decode_frame(AVCodecContext *avctx, void *data,
97 97
             *o++ = (av_reverse[buf[6] & 0xf0] << 28) |
98 98
                    (av_reverse[buf[5]]        << 20) |
99 99
                    (av_reverse[buf[4]]        << 12) |
100
-                   (av_reverse[buf[3] & 0x0f] <<  8);
100
+                   (av_reverse[buf[3] & 0x0f] <<  4);
101 101
             buf += 7;
102 102
         }
103 103
         *data_size = (uint8_t*) o - (uint8_t*) data;
... ...
@@ -120,7 +120,7 @@ static int s302m_decode_frame(AVCodecContext *avctx, void *data,
120 120
                     av_reverse[buf[0]];
121 121
             *o++ = (av_reverse[buf[4] & 0xf0] << 12) |
122 122
                    (av_reverse[buf[3]]        <<  4) |
123
-                    av_reverse[buf[2] & 0x0f];
123
+                   (av_reverse[buf[2]]        >>  4);
124 124
             buf += 5;
125 125
         }
126 126
         *data_size = (uint8_t*) o - (uint8_t*) data;