From fiji at ayup.limey.net Mon Sep 15 05:46:13 2008 From: fiji at ayup.limey.net (Ben Bennett) Date: Mon, 15 Sep 2008 08:46:13 -0400 Subject: [ID3 Dev] synchsafe integers In-Reply-To: <9f47d5f70809150105r48314c74q45d62f861f9d1189@mail.gmail.com> References: <48CB762A.8070202@gmx.de> <9f47d5f70809150105r48314c74q45d62f861f9d1189@mail.gmail.com> Message-ID: <20080915124613.GA14923@ayup.limey.net> On Mon, Sep 15, 2008 at 01:35:01PM +0530, Dhanraj Birader wrote: > If bit 7 is zero then keep it as it is. No! Otherwise you can not correctly convert back since multiple synchsafe ints would map to the same number. > On Sat, Sep 13, 2008 at 1:43 PM, Daniel Wechsler wrote: > > Bit 7 must always be 0, so 1111 1111 becomes 0000 0001 0111 1111. > > > > But what is if bit 7 is already 0? Do I have to add a 0, too? [0000 0001 > > 0111 1111 -> 0000 0010 0111 1111] Yes. That is correct. Before Conversion After Conversion -------------------- -------------------- 0000 0000 1111 1111 0000 0001 0111 1111 0000 0001 0111 1111 0000 0010 0111 1111 If you did not convert the second one, then you would be unable to tell what '0000 0001 0111 1111' mapped to. Hope that helps. -ben --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org From daaaaaaniel at gmx.de Sat Sep 13 01:13:30 2008 From: daaaaaaniel at gmx.de (Daniel Wechsler) Date: Sat, 13 Sep 2008 10:13:30 +0200 Subject: [ID3 Dev] synchsafe integers Message-ID: <48CB762A.8070202@gmx.de> Hello out there, I'm new here! My question concerns the synchsafe integers, which were used for saving the tag- and framesize. Bit 7 must always be 0, so 1111 1111 becomes 0000 0001 0111 1111. But what is if bit 7 is already 0? Do I have to add a 0, too? [0000 0001 0111 1111 -> 0000 0010 0111 1111] Or stays it like it is? (I'm sorry for my bad english, I'm from Germany^^) Thank you, Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org From jmartin_92 at verizon.net Sat Sep 13 01:24:38 2008 From: jmartin_92 at verizon.net (Jim) Date: Sat, 13 Sep 2008 04:24:38 -0400 Subject: [ID3 Dev] synchsafe integers In-Reply-To: <48CB762A.8070202@gmx.de> References: <48CB762A.8070202@gmx.de> Message-ID: <48CB78C6.5010303@verizon.net> Daniel Wechsler wrote: > Hello out there, I'm new here! > > My question concerns the synchsafe integers, which were used for saving > the tag- and framesize. > Bit 7 must always be 0, so 1111 1111 becomes 0000 0001 0111 1111. > > But what is if bit 7 is already 0? Do I have to add a 0, too? [0000 > 0001 0111 1111 -> 0000 0010 0111 1111] > Or stays it like it is? > > (I'm sorry for my bad english, I'm from Germany^^) > Thank you, Daniel Yes, you have it right. In a synchsafe integer, only bits 0 thru 6 are used. You do need to shift that zero from bit 7 to bit 0 of the next byte. Otherwise the synchsafe integer will not be properly decoded. --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org From mark at maseurope.net Mon Sep 15 07:26:20 2008 From: mark at maseurope.net (Mark Smith) Date: Mon, 15 Sep 2008 15:26:20 +0100 Subject: [ID3 Dev] synchsafe integers In-Reply-To: <20080915124613.GA14923@ayup.limey.net> References: <48CB762A.8070202@gmx.de> <9f47d5f70809150105r48314c74q45d62f861f9d1189@mail.gmail.com> <20080915124613.GA14923@ayup.limey.net> Message-ID: <026BDD0C-E9F9-40DC-912B-1F86EE1FD220@maseurope.net> It helped me to consider that a sync-safe integer is a 28 bit int, that is stored in a 32 bit container, such that bits 7, 15, 23 and 31 are always cleared, and not used in the representation of the number. Best, Mark On 15 Sep 2008, at 13:46, Ben Bennett wrote: > On Mon, Sep 15, 2008 at 01:35:01PM +0530, Dhanraj Birader wrote: >> If bit 7 is zero then keep it as it is. > > No! Otherwise you can not correctly convert back since multiple > synchsafe ints would map to the same number. > > >> On Sat, Sep 13, 2008 at 1:43 PM, Daniel Wechsler >> wrote: >>> Bit 7 must always be 0, so 1111 1111 becomes 0000 0001 0111 1111. >>> >>> But what is if bit 7 is already 0? Do I have to add a 0, too? >>> [0000 0001 >>> 0111 1111 -> 0000 0010 0111 1111] > > Yes. That is correct. > > Before Conversion After Conversion > -------------------- -------------------- > 0000 0000 1111 1111 0000 0001 0111 1111 > 0000 0001 0111 1111 0000 0010 0111 1111 > > If you did not convert the second one, then you would be unable to > tell what '0000 0001 0111 1111' mapped to. > > Hope that helps. > > -ben > > --------------------------------------------------------------------- > To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > For additional commands, e-mail: id3v2-help at id3.org > --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org From dhanraj at nextbitcpu.com Mon Sep 15 01:05:01 2008 From: dhanraj at nextbitcpu.com (Dhanraj Birader) Date: Mon, 15 Sep 2008 13:35:01 +0530 Subject: [ID3 Dev] synchsafe integers In-Reply-To: <48CB762A.8070202@gmx.de> References: <48CB762A.8070202@gmx.de> Message-ID: <9f47d5f70809150105r48314c74q45d62f861f9d1189@mail.gmail.com> Hi, If bit 7 is zero then keep it as it is. regards Dhanraj. On Sat, Sep 13, 2008 at 1:43 PM, Daniel Wechsler wrote: > Hello out there, I'm new here! > > My question concerns the synchsafe integers, which were used for saving the > tag- and framesize. > Bit 7 must always be 0, so 1111 1111 becomes 0000 0001 0111 1111. > > But what is if bit 7 is already 0? Do I have to add a 0, too? [0000 0001 > 0111 1111 -> 0000 0010 0111 1111] > Or stays it like it is? > > (I'm sorry for my bad english, I'm from Germany^^) > Thank you, Daniel > > --------------------------------------------------------------------- > To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > For additional commands, e-mail: id3v2-help at id3.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhanraj at nextbitcpu.com Tue Sep 16 01:41:25 2008 From: dhanraj at nextbitcpu.com (Dhanraj Birader) Date: Tue, 16 Sep 2008 14:11:25 +0530 Subject: [ID3 Dev] synchsafe integers In-Reply-To: <20080915124613.GA14923@ayup.limey.net> References: <48CB762A.8070202@gmx.de> <9f47d5f70809150105r48314c74q45d62f861f9d1189@mail.gmail.com> <20080915124613.GA14923@ayup.limey.net> Message-ID: <9f47d5f70809160141n4b9963acmae40ea12d61bf548@mail.gmail.com> Ya u r right because while extracting we need to extract only 28bits. Thank u........ regards Dhanraj biradar On Mon, Sep 15, 2008 at 6:16 PM, Ben Bennett wrote: > On Mon, Sep 15, 2008 at 01:35:01PM +0530, Dhanraj Birader wrote: > > If bit 7 is zero then keep it as it is. > > No! Otherwise you can not correctly convert back since multiple > synchsafe ints would map to the same number. > > > > On Sat, Sep 13, 2008 at 1:43 PM, Daniel Wechsler > wrote: > > > Bit 7 must always be 0, so 1111 1111 becomes 0000 0001 0111 1111. > > > > > > But what is if bit 7 is already 0? Do I have to add a 0, too? [0000 > 0001 > > > 0111 1111 -> 0000 0010 0111 1111] > > Yes. That is correct. > > Before Conversion After Conversion > -------------------- -------------------- > 0000 0000 1111 1111 0000 0001 0111 1111 > 0000 0001 0111 1111 0000 0010 0111 1111 > > If you did not convert the second one, then you would be unable to > tell what '0000 0001 0111 1111' mapped to. > > Hope that helps. > > -ben > > --------------------------------------------------------------------- > To unsubscribe, e-mail: id3v2-unsubscribe at id3.org > For additional commands, e-mail: id3v2-help at id3.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daaaaaaniel at gmx.de Sat Sep 13 01:25:27 2008 From: daaaaaaniel at gmx.de (Daniel Wechsler) Date: Sat, 13 Sep 2008 10:25:27 +0200 Subject: [ID3 Dev] synchsafe integers In-Reply-To: <48CB78C6.5010303@verizon.net> References: <48CB762A.8070202@gmx.de> <48CB78C6.5010303@verizon.net> Message-ID: <48CB78F7.1060209@gmx.de> Wow! That's a fast answer! Thank you --------------------------------------------------------------------- To unsubscribe, e-mail: id3v2-unsubscribe at id3.org For additional commands, e-mail: id3v2-help at id3.org