[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8
From: |
imad imadero |
Subject: |
[Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file |
Date: |
Sun, 15 Sep 2019 05:44:46 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 |
Follow-up Comment #7, bug #56889 (project octave):
Hi everyone,
details about the issue are depicted as follow:
the main code:
Fs=8000;
filename='test.wav'
y=ones(1,32)*256;
for k=1:32
y(k)=258-k;% some overflowing values to make sure uint8 parses all values
end
audiowrite(filename,uint8(y),Fs,'BitsPerSample',8);
yi= audioread(filename,'native');
1) we exucute this code using matlab, the file generated is named as
test.matlab.wav, it's content is showed in the hexfile editor under the name
test.matlab.wav
2) we execute the same code under Octave, the file generated is named as
test.octav.wav wich is different from the one generated by Matlab, to see the
difference looking at the byte index "44" from which the difference emerges.
3) we read the file test.matlab.wav using octave;; wrong results from
audioread as well !! the same problem ( values 0,253,254,255 are parsed to 255
and 0). audioread under matlab read the file correctly.
the output of audioread funtion using octave to read the file
test.matlab.wav:
y_matlab =
252
252
252
251
250
249
248
247
246
245
244
243
242
241
240
239
238
237
236
235
234
233
232
231
230
229
228
227
226
225
224
223
thanks every one
(file #47516, file #47517, file #47518, file #47519)
_______________________________________________________
Additional Item Attachment:
File name: hex.matlab.png Size:14 KB
<https://savannah.gnu.org/file/hex.matlab.png?file_id=47516>
File name: hex.octave.png Size:13 KB
<https://savannah.gnu.org/file/hex.octave.png?file_id=47517>
File name: test.matlab.wav Size:0 KB
<https://savannah.gnu.org/file/test.matlab.wav?file_id=47518>
File name: test.octave.wav Size:0 KB
<https://savannah.gnu.org/file/test.octave.wav?file_id=47519>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56889>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, anonyme, 2019/09/14
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, Rik, 2019/09/14
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, imad imadero, 2019/09/14
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, Mike Miller, 2019/09/14
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, imad imadero, 2019/09/14
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, imad imadero, 2019/09/14
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, Rik, 2019/09/14
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file,
imad imadero <=
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, imad imadero, 2019/09/15
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, Rik, 2019/09/15
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, Rik, 2019/09/15
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, imad imadero, 2019/09/15
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, Rik, 2019/09/15
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, imad imadero, 2019/09/15
- [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file, Rik, 2019/09/16