IPB

Welcome Guest ( Log In | Register )

flac 1.3.0 pre-release
romor
post Mar 4 2013, 07:56
Post #1





Group: Members
Posts: 670
Joined: 16-January 09
Member No.: 65630



Announced here: http://lists.xiph.org/pipermail/flac-dev/2...rch/003695.html

Git change log: https://git.xiph.org/?p=flac.git;a=summary


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
 
Start new topic
Replies
lvqcl
post Mar 14 2013, 17:53
Post #2





Group: Developer
Posts: 3361
Joined: 2-December 07
Member No.: 49183



Anybody knows how FLAC calculates MD5?

I took a 16-bit file and encoded it with FLAC, WavPack, TAK and OptimFrog. All encoders calculated MD5 = 00b0bff6862b518452b46ad994cbde11.
Then I converted it to a 24-bit file (padded with 8 zero bits). Again, all encoders agree on its checksum: 453f0af141959d709cccdc4723ff77ec.

So far so good. But then I changed wValidBitsPerSample field, and now FLAC disagrees with all other encoders.

CODE
valid_bits     WavPack, TAK, OptimFrog                 FLAC
16             453f0af141959d709cccdc4723ff77ec        00b0bff6862b518452b46ad994cbde11 (the same as for 16-bit file)
17             453f0af141959d709cccdc4723ff77ec        25234a864c084eb6c23c5f61ce5fdfc4
18             453f0af141959d709cccdc4723ff77ec        c207d52c70f3fda72595864f3d133f35
19             453f0af141959d709cccdc4723ff77ec        4b26f915fe3775ea165e58ba4fc4b1cd
20             453f0af141959d709cccdc4723ff77ec        daa325b376bfa803c849636fa1de0704
21             453f0af141959d709cccdc4723ff77ec        3d0670388b6919ab3ac79301b5c19996
22             453f0af141959d709cccdc4723ff77ec        cac12a2a39c14e20df4716f34ea145b7
23             453f0af141959d709cccdc4723ff77ec        086a82a505fac96241b50fd67c925f45
24             453f0af141959d709cccdc4723ff77ec        453f0af141959d709cccdc4723ff77ec (the same as in other encoders)

It seems that FLAC first shifts input PCM data by (BitsPerSample - ValidBitsPerSample) bits, and calculates MD5 of these altered data.
Go to the top of the page
+Quote Post
ktf
post Mar 14 2013, 18:05
Post #3





Group: Members
Posts: 359
Joined: 22-March 09
From: The Netherlands
Member No.: 68263



QUOTE (lvqcl @ Mar 14 2013, 17:53) *
Anybody knows how FLAC calculates MD5?


Last time I checked, it was a MD5 sum of the raw data.

However, it seems FLAC is the only one displaying the right behaviour here, see http://msdn.microsoft.com/en-us/library/wi...v=vs.85%29.aspx The other encoders use all 24 bits to calculate the MD5 sum, presumably because they ignore wValidbitspersample and just encode all 24 bits. The specification however says wValidbitspersample is used to pack for example 20-bit audio in WAV (which can only be 24-bit or 16-bit, nothing in between AFAIK), so it seems FLAC just ignores the other bits while the other encoders keep them.

At least that would explain why your MD5sum for 16 bits is the same as the one of wValidbitspersample = 16 and why the MD5sums differ between FLAC and the other encoders


--------------------
Music: sounds arranged such that they construct feelings.
Go to the top of the page
+Quote Post

Posts in this topic
- romor   flac 1.3.0 pre-release   Mar 4 2013, 07:56
- - FreaqyFrequency   Whoa. They've been on 1.2.1 for six years now...   Mar 4 2013, 07:59
|- - chi   QUOTE (FreaqyFrequency @ Mar 4 2013, 07:5...   Mar 4 2013, 10:51
- - skamp   Works fine on Arch Linux.   Mar 4 2013, 11:01
- - mudlord   As usual, Fidel Castro Loco ignored Windows.   Mar 4 2013, 11:36
|- - skamp   QUOTE (mudlord @ Mar 4 2013, 11:36) As us...   Mar 5 2013, 13:14
- - romor   mudlord, don't overkill. You spent so much ink...   Mar 4 2013, 11:52
- - AiZ   -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-...   Mar 4 2013, 12:13
|- - marc2003   QUOTE (AiZ @ Mar 4 2013, 11:13) flac-1.3....   Mar 5 2013, 03:46
|- - Brazil2   QUOTE (AiZ @ Mar 4 2013, 12:13) flac-1.3....   Mar 5 2013, 12:35
- - zfox   Configuration summary : FLAC version : .........   Mar 4 2013, 12:36
- - Case   Compiling it with MSVC required some modifications...   Mar 4 2013, 13:22
- - zfox   I encoded 5 full random jazz/rock albums (-8) and ...   Mar 4 2013, 13:27
- - ktf   QUOTE (zfox @ Mar 4 2013, 12:36) My own L...   Mar 4 2013, 20:20
|- - zfox   QUOTE (ktf @ Mar 4 2013, 22:20) Does the ...   Mar 4 2013, 21:36
|- - ktf   QUOTE (zfox @ Mar 4 2013, 21:36) Actually...   Mar 4 2013, 22:53
||- - C.R.Helmrich   QUOTE (ktf @ Mar 4 2013, 22:53) I tried a...   Mar 5 2013, 00:08
||- - zfox   QUOTE (ktf @ Mar 5 2013, 00:53) I tried a...   Mar 5 2013, 12:52
|- - eahm   QUOTE (zfox @ Mar 4 2013, 13:36) QUOTE (k...   Mar 5 2013, 01:05
- - eahm   Agree, 1% is a good improvement. Why still no 2GB...   Mar 4 2013, 21:14
|- - db1989   Yes, still being limited to 2 GB is a glaring prob...   Mar 4 2013, 21:22
|- - ktf   QUOTE (eahm @ Mar 4 2013, 21:14) Why stil...   Mar 4 2013, 21:23
|- - benski   QUOTE (ktf @ Mar 4 2013, 15:23) QUOTE (db...   Mar 4 2013, 21:34
- - eahm   But there is a "patch", I am using Case...   Mar 4 2013, 21:27
- - Kohlrabi   Maybe Case could provide the patch file instead of...   Mar 4 2013, 22:12
|- - Case   QUOTE (Kohlrabi @ Mar 4 2013, 23:12) Mayb...   Mar 5 2013, 13:12
- - kurtnoise   ./configure --enable-static --disable-shared   Mar 5 2013, 06:59
|- - marc2003   QUOTE (kurtnoise @ Mar 5 2013, 05:59) ./c...   Mar 5 2013, 10:37
- - zfox   Well, the first directory contains wav files that ...   Mar 5 2013, 07:35
- - Kohlrabi   The >4GB files patch can be found at kode54...   Mar 5 2013, 07:38
|- - romor   QUOTE (Kohlrabi @ Mar 5 2013, 08:38) The ...   Mar 5 2013, 08:11
- - zfox   Is it possible for John33's optimizations to a...   Mar 5 2013, 07:57
- - romor   [flac-dev] Answering the Hydrogen Audio thread   Mar 5 2013, 09:42
|- - C.R.Helmrich   QUOTE (romor @ Mar 5 2013, 09:42) [flac-d...   Mar 5 2013, 22:20
- - LRN   QUOTE (Erik de Castro Lopo)I will answer what I ca...   Mar 5 2013, 10:04
|- - ktf   QUOTE (LRN @ Mar 5 2013, 10:04) Depends o...   Mar 5 2013, 10:21
- - Xenion   If i may breathe a wish for 1.3 final in this thre...   Mar 5 2013, 14:09
|- - ktf   QUOTE (Xenion @ Mar 5 2013, 14:09) If i m...   Mar 5 2013, 18:45
|- - dgauze   QUOTE (ktf @ Mar 5 2013, 09:45) QUOTE (Xe...   Mar 5 2013, 19:36
|- - Xenion   QUOTE (ktf @ Mar 5 2013, 18:45) QUOTE (Xe...   Mar 5 2013, 22:22
- - romor   QUOTE On Tue, Mar 5, 2013 at 8:10 PM, Johnny Rosen...   Mar 5 2013, 20:36
- - hidn   nothing interesting in the new version   Mar 5 2013, 21:26
- - Wombat   The question to update metaflac as part of the pac...   Mar 5 2013, 23:00
- - ktf   QUOTE (zfox @ Mar 4 2013, 12:36) 03.flac:...   Mar 6 2013, 20:45
|- - ktf   QUOTE (ktf @ Mar 6 2013, 20:45) QUOTE (C....   Mar 13 2013, 14:57
|- - IgorC   QUOTE (ktf @ Mar 13 2013, 10:57) So now ...   Mar 18 2013, 20:17
- - zfox   QUOTE (ktf @ Mar 6 2013, 22:45) Have you ...   Mar 7 2013, 09:25
|- - ktf   QUOTE (zfox @ Mar 7 2013, 09:25) QUOTE (k...   Mar 7 2013, 09:41
|- - zfox   It's difficult to spot this file again in my l...   Mar 7 2013, 10:43
- - romor   flac-1.3.0pre2 release (link in first post) It st...   Mar 9 2013, 15:30
|- - benski   QUOTE (romor @ Mar 9 2013, 09:30) flac-1....   Mar 9 2013, 17:56
- - romor   patch works fine now, flac compiles out of the box   Mar 9 2013, 20:03
- - eahm   Can anyone please post the exe? ...or instructions...   Mar 9 2013, 20:17
- - romor   Here it is, flac-1.3.0pre2 exe with metaflac, comp...   Mar 9 2013, 20:33
|- - Musique-Rabbit   Thanks romor, the pre2 is working fine for me. The...   Mar 10 2013, 03:44
- - Mach-X   just out of curiosity does anyone here go all will...   Mar 10 2013, 07:05
|- - johnb   Why would you need to re-rip? Only recode (foobar ...   Mar 10 2013, 09:45
|- - Porcus   QUOTE (Mach-X @ Mar 10 2013, 07:05) ...   Mar 10 2013, 13:24
- - skamp   From what I can tell, there are no compression imp...   Mar 10 2013, 09:50
- - romor   Binary is provided as user asked for it, and it...   Mar 10 2013, 13:22
- - ktf   QUOTE (Musique-Rabbit @ Mar 10 2013, 03...   Mar 10 2013, 23:02
- - eahm   Also why the date is up to 2009 and not 2013?   Mar 11 2013, 00:24
|- - ktf   QUOTE (eahm @ Mar 11 2013, 00:24) Also wh...   Mar 11 2013, 08:26
- - SpaceAgeHero   Will this new release support compressing multiple...   Mar 11 2013, 08:57
|- - ktf   QUOTE (SpaceAgeHero @ Mar 11 2013, 08:57)...   Mar 11 2013, 10:10
|- - Maurits   QUOTE (ktf @ Mar 11 2013, 10:10) QUOTE (S...   Mar 11 2013, 11:24
- - lvqcl   QUOTE (Maurits @ Mar 11 2013, 14:24) Cons...   Mar 11 2013, 15:07
- - skamp   FLACCL, fpFLAC   Mar 11 2013, 15:25
|- - Maurits   QUOTE (lvqcl @ Mar 11 2013, 15:07) QUOTE ...   Mar 11 2013, 17:03
- - romor   That's quite a shift. Do you have a suspect?   Mar 13 2013, 15:13
|- - benski   QUOTE (romor @ Mar 13 2013, 09:13) That...   Mar 13 2013, 15:33
- - romor   Thanks @benski. For reference this should be it: d...   Mar 13 2013, 15:47
- - lvqcl   Anybody knows how FLAC calculates MD5? I took a 1...   Mar 14 2013, 17:53
|- - ktf   QUOTE (lvqcl @ Mar 14 2013, 17:53) Anybod...   Mar 14 2013, 18:05
- - lvqcl   When ValidBitsPerSample=16: yes, FLAC just throws ...   Mar 14 2013, 18:27
|- - ktf   QUOTE (lvqcl @ Mar 14 2013, 18:27) When V...   Mar 14 2013, 20:49
|- - Case   QUOTE (ktf @ Mar 14 2013, 21:49) Other ne...   Mar 17 2013, 13:58
|- - ktf   QUOTE (Case @ Mar 17 2013, 13:58) Edit: I...   Mar 18 2013, 09:11
|- - lvqcl   QUOTE (Case @ Mar 17 2013, 16:58) Edit: I...   Mar 18 2013, 15:31
||- - Case   QUOTE (lvqcl @ Mar 18 2013, 16:31) Does -...   Mar 19 2013, 20:56
|- - db1989   QUOTE (Case @ Mar 17 2013, 12:58) [coded ...   Mar 18 2013, 23:00
- - hidn   anyway, slower and less compression than flaccl   Mar 17 2013, 13:16
- - Porcus   15 percent increase in decoding speed? It is hardl...   Mar 19 2013, 23:27
- - birdie   I've compiled FLAC 1.3 pre3 with GCC 4.8 (vani...   Apr 4 2013, 11:44
- - birdie   It also crashes when compiled with GCC 4.5.4 witho...   Apr 4 2013, 11:52
|- - chi   QUOTE (birdie @ Apr 4 2013, 11:52) Guys, ...   Apr 4 2013, 18:38
- - birdie   GIT version has the same problems. Sigh.   Apr 4 2013, 12:02
|- - ktf   Static building never worked for me, but if you bu...   Apr 4 2013, 18:43
|- - chi   QUOTE (ktf @ Apr 4 2013, 18:43) but if yo...   Apr 4 2013, 19:57
|- - ktf   QUOTE (chi @ Apr 4 2013, 20:57) That...   Apr 4 2013, 22:28
- - Case   The problems birdie has look very much like broken...   Apr 6 2013, 12:27
|- - ktf   QUOTE (Case @ Apr 6 2013, 13:27) I upload...   Apr 8 2013, 09:07
- - Case   Ouch, thanks. I used such tiny files in testing th...   Apr 8 2013, 11:09
- - Case   Fixed the bug and repeating line bug with long fil...   Apr 8 2013, 19:40
|- - ktf   QUOTE (Case @ Apr 8 2013, 20:40) Fixed th...   Apr 8 2013, 20:06
- - Case   I should hire you as my personal beta-tester. I re...   Apr 8 2013, 20:57
- - eahm   New Winamp 5.70 Build 3364 Beta 4 * Updated: [lib...   Apr 9 2013, 20:59
|- - SpaceAgeHero   QUOTE (eahm @ Apr 9 2013, 21:59) Isn...   Apr 9 2013, 21:22
|- - benski   QUOTE (eahm @ Apr 9 2013, 14:59) New Wina...   Apr 10 2013, 00:34
- - Case   I uploaded a test binary with properly made long f...   Apr 10 2013, 08:29
2 Pages V   1 2 >


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th August 2014 - 10:33