HydrogenAudio

Lossy Audio Compression => Ogg Vorbis => Ogg Vorbis - Tech => Topic started by: NeDtHeOnE on 2006-04-02 07:59:05

Title: What do you mean by Channel coupling?
Post by: NeDtHeOnE on 2006-04-02 07:59:05
Does Vorbis 6ch has channel coupling support?

Vorbis stereo has channel coupling support .. But what good does it do?
Title: What do you mean by Channel coupling?
Post by: HotshotGG on 2006-04-02 19:30:16
Quote
Does Vorbis 6ch has channel coupling support?

Vorbis stereo has channel coupling support .. But what good does it do?


What what are you yelling about?  . There is no support for channel coupling with multichannel files encoded with Vorbis. If you do have a multichannel streams you need to use => -q 6 and up right now (where no channel coupling is used, it would be wise to use that anyway too). Stereo channel coupling mechanism is the most important part of libvorbis, due to the fact that's where the encoder get's it's most significant gains in terms of entropy coding.  This is if you want to look at it in technical sense.
Title: What do you mean by Channel coupling?
Post by: NeDtHeOnE on 2006-04-03 06:02:04
But AAC 6 channel Audio has channel coupling...

Does that mean it is better 2 encode to 6 Ch AAC than 6 Ch Vorbis?
Title: What do you mean by Channel coupling?
Post by: kjoonlee on 2006-04-03 06:55:27
Quote
If you do have a multichannel streams you need to use => -q 6 and up right now (where no channel coupling is used, it would be wise to use that anyway too).[a href="index.php?act=findpost&pid=378242"][{POST_SNAPBACK}][/a]

What do you mean? Running oggenc -q-1 on 6 ch audio will give you uncoupled output.
Title: What do you mean by Channel coupling?
Post by: LaserSokrates on 2006-04-03 07:38:52
Yes, however at these low bitrates, channel coupling gives you extra compression in a minimal loss in quality (I think... I could be stroke for TOS #8 here), however at q6 it's no more neccessary. So at q6 and up, it doesn't matter if you have 5.1 material for which oggenc can't use channel coupling because oggenc wouldn't use it anyway. But as nedtheone is focused on small filesizes, this solution doesn't help him.
Title: What do you mean by Channel coupling?
Post by: kjoonlee on 2006-04-03 07:44:16
LaserSokrates, for stereo files made by oggenc, channel coupling is always in use.
Title: What do you mean by Channel coupling?
Post by: LaserSokrates on 2006-04-03 14:25:57
I mixed it up. For -q 6 and up, it's lossless channel coupling. However, I don't know the real difference, but I imagine lossless channel coupling could be something like LAME's joint stereo (which is lossless, despite what some people claim).
Title: What do you mean by Channel coupling?
Post by: shadowking on 2006-04-03 15:34:02
I found something usefull here:

http://www.xiph.org/vorbis/doc/stereo.html (http://www.xiph.org/vorbis/doc/stereo.html)
Title: What do you mean by Channel coupling?
Post by: Firon on 2006-04-04 22:33:33
Wasn't it changed to -q5 and up, LaserSokrates? Below that, it was lossy. I forget if it was -q5 or -q6, I know it was one then changed to the other at some point...
Title: What do you mean by Channel coupling?
Post by: kjoonlee on 2006-04-05 02:44:27
It was changed from

-q4.99 and below is lossy
-q5 and up is lossless

to

-q5.99 and below is a mix between lossy and lossless
-q6 and up is lossless
Title: What do you mean by Channel coupling?
Post by: shadowking on 2006-04-05 02:57:52
So coupling is like an advanced Mid Side coding. At Q6 its on in 'lossless' mode and in LAME mid side is also lossless I assume... In MPC mid side settings below --ms 15 are also lossy ?
Title: What do you mean by Channel coupling?
Post by: Firon on 2006-04-05 22:46:09
Thank you for clearing that up for me, kjoonlee.
Title: What do you mean by Channel coupling?
Post by: HotshotGG on 2006-04-12 21:28:03
Quote
What do you mean? Running oggenc -q-1 on 6 ch audio will give you uncoupled output.


This is news to me  .  Did John33 fix it or something? also it's in the wiki don't people read that damn thing? this is why it was created in the first place so we could make the clarification and distinction easier.  If that's the case then I need to change that.
Title: What do you mean by Channel coupling?
Post by: NeDtHeOnE on 2006-08-07 16:06:08
Ok I am back..

I've a question over here.. Is it good if i encode an ac3 6ch 448 kbps audio to an ogg vorbis 6ch audio at -q -1.0

Umm that would be around ~180 kbps nominal ...

n what about AAC at same bitrate..?

thx
Title: What do you mean by Channel coupling?
Post by: SebastianG on 2006-08-07 17:28:52
(...) with Vorbis. If you do have a multichannel streams you need to use => -q 6 and up right now (where no channel coupling is used, (...)

Are you sure? I thought that at -q6 and above the left and right channels are still interleaved and VQ-coded which accounts for inter-channel redundancy. So, either I'm wrong or you and me have different definitions of "channel coupling" in mind.

SebastianG
Title: What do you mean by Channel coupling?
Post by: haregoo on 2006-08-07 17:35:06
Ok I am back..

I've a question over here.. Is it good if i encode an ac3 6ch 448 kbps audio to an ogg vorbis 6ch audio at -q -1.0

Current aoTuV is tuned only for stereo (http://www.hydrogenaudio.org/forums/index.php?showtopic=34915&st=25&p=314089&#entry314089).
There is no point encoding ac3 to vorbis 6ch.
Title: What do you mean by Channel coupling?
Post by: NeDtHeOnE on 2006-08-07 18:01:40
So u mean to say its useless to encode to vorbis 6 ch? What if i want to preserve the 6 channel stream. which codec should i use? and seriously there is no way for good quality 6ch vorbis audio??
Title: What do you mean by Channel coupling?
Post by: haregoo on 2006-08-07 18:50:43
What if i want to preserve the 6 channel stream. which codec should i use?

I also have the same question.

Best bet is ac3 at this time.(no quality decrease and reasonable bitrate)
Title: What do you mean by Channel coupling?
Post by: HotshotGG on 2006-08-07 18:51:12
Quote
So you mean to say its useless to encode to vorbis 6 ch? What if I want to preserve the 6 channel stream. which codec should I use? seriously there is no way for good quality 6ch vorbis audio??


Here is the deal. If you want to encode multichannel Vorbis streams, use a -q 6 and up. It's mentioned in the wiki. No channel coupling is used above -q 6. libvorbis needs to be rewritten in order to couple appropriate channel mappings for 5.1 and ambisonics below a -q 5. Rather than focus the developement efforts on consistently retuning the encoder, someone should focus on improving the source code to deal with that. The problem? nobody wants to do, because it's a time consuming task. 
Title: What do you mean by Channel coupling?
Post by: NeDtHeOnE on 2006-08-07 18:56:48
If i use -q6 then what do u think will be the file size? Bigger than the original AC3???
Title: What do you mean by Channel coupling?
Post by: HotshotGG on 2006-08-07 19:08:02
Quote
If I use -q6 then what do you think will be the file size? Bigger than the original AC3???


First of all attempt to speak in proper English and lastly don't be so abrupt and dismissive. It's not like you plan on releasing torrents or anything  . I am just keeping you informed on the situation
Title: What do you mean by Channel coupling?
Post by: NeDtHeOnE on 2006-08-07 19:16:54
Not again!

I dont know why people from this forum tend to humiliate me all the time!

I love vorbis! i use it all the time for music or movie backup. All i want  to ask is whether 6ch vorbis encoding is worth for movie backup?

I am sorry for my poor english. I am from India. I am trying my level best. And I know I am improving. I've seen people who want to improve and never do anything.
Title: What do you mean by Channel coupling?
Post by: HotshotGG on 2006-08-07 19:21:29
Quote
I love vorbis! i use it all the time for music or movie backup. All I want to ask is whether 6ch vorbis encoding is worth for movie backup?

I am sorry for my poor english. I am from India. I am trying my level best. And I know I am improving. I've seen people who want to improve and never do anything.


I understand that  . If you use a -q 6. You can't use less then a -q 6 right now as it stands.  I have mentioned it several times before in this thread in the past.  This is the type of thing that's difficult to improve, but it requires internal working knowledge of the low-level stuff. That's how it is.

Quote
Are you sure? I thought that at -q6 and above the left and right channels are still interleaved and VQ-coded which accounts for inter-channel redundancy. So, either I'm wrong or you and me have different definitions of "channel coupling" in mind.


I am pretty sure interleaving is still done. I have to dig through the source code again it's been a while. Everytime I look through it I figure out something new that I add in the wiki, so people aren't left in the dark. It's bit esoteric, because it's written in C and there are scarce comments here and there. You have to kind of guess what's going on.
Title: What do you mean by Channel coupling?
Post by: NeDtHeOnE on 2006-08-07 19:28:34
Thankyou very much HotshotGG! Ok Now can you please tell me more about AAC 6ch encoding sir?
Title: What do you mean by Channel coupling?
Post by: HotshotGG on 2006-08-07 19:34:21
Quote
Thankyou very much HotshotGG! Ok Now can you please tell me more about AAC 6ch encoding sir?


What questions did you have in mind? I don't use AAC very often, but if you were going to create a multichannel files for your movie that's the best way to go for what you plan on doing.  EDIT: There are different implementations that support surround encoding. I know for a fact the Nero implementation does.
Title: What do you mean by Channel coupling?
Post by: SebastianG on 2006-08-07 19:42:25
Quote
(...) I thought that at -q6 and above the left and right channels are still interleaved and VQ-coded which accounts for inter-channel redundancy(...)

I am pretty sure interleaving is still done. (...)

So, what's your definition of "channel coupling" then? You said at -q6 there is no channel coupling. 

EDIT: I checked the HA wiki (http://wiki.hydrogenaudio.org/index.php?title=Channel_coupling) on this. I think it needs some improvement regarding Vorbis (Maybe I'll do tomorrow). Quoting: "Lossless coupling is equivalent to independent encoding of the two channels ('dual stereo' in MP3), but with the benefit of additional space-saving. It does polar mapping/channel interleaving using the residue vectors." WTF? How can it be independent coding of two channels if SPM + channel interleaved VQ is in use? BTW: Square Polar Mapping doing any good is a lie that's surprisingly still around.
Title: What do you mean by Channel coupling?
Post by: HotshotGG on 2006-08-07 19:57:16
Quote
So, what's your definition of "channel coupling" then? You said at -q6 there is no channel coupling.

EDIT: I checked the HA wiki on this. I think it needs some improvement regarding Vorbis (Maybe I'll do tomorrow). "lossless coupling = independant coding of L/R like dual stereo for MP3?  What's with all the "coupling" then ?  BTW: Square Polar Mapping doing any good is a lie that's surprisingly still around.



Yeah your right I do sound confusing there. I didn't rewrite the section someone else did. We can just call it "lossless". I thought interleaving was still a form of coupling to reduce redundancy? I meant coupling as in phase/point stereo coupling. There are no internal mappings for point/phase couplings for the five channels. You will get some artifacts if you attempt to encode 5 channels now, with what's already in there. Coupling is always done on the channels. Yes, square polar mapping doesn't do much good either. I guess maybe it has something to do with the VQ? you probably know more about the math, behind it then I do.  I know how VQ books work, I have never actual played around with them though. If you looked at it you would probably be able to figure out what sort of mappings routines need to be written to couple 5.1 channels using point/phase routines. It requires an extensive 5.1 setup though. I don't know how one would go about performing blind tests either. 

Quote
It does polar mapping/channel interleaving using the residue vectors." WTF? How can it be independent coding of two channels if SPM + channel interleaved VQ is in use?


Interleaving is independent of both channels is that what you are getting at? I thought interleaving was a form of coupling. I guess we need to work on this.
Title: What do you mean by Channel coupling?
Post by: SebastianG on 2006-08-07 20:05:34
Yeah your right I do sound confusing there. I meant coupling as in phase/point stereo coupling.

Ok, the way I see it is: coupling = joint coding (ie exploit redundancy (possibly by interleaving+VQ or M/S) + maybe a little loss like Point Stereo)

Yes, square polar mapping doesn't do much good either. I guess maybe it has something to do with the VQ? you probably know more about the math, behind it then I do.  I know how VQ books work, I have never actual played around with them though 

Since the current codebooks are made of vectors with INTEGER samples the difference between having SPM enabled and not is -- from a code book point of view -- only this one: The symbols are rearranged. No gain. No loss. You could merge [SPM+CodeBook] into another code book without having the need to turn on SPM. SPM -- initially(*) designed to decorrelate -- failed doing so (decorrelating) because of |angle| being bounded by a multiple of |magnitude|. Example: mag=0 => angle=0. (mag=0 & ang!=0 is impossible). Exploiting this relationship is done via VQ. So, decorrelating is actually done via channel interleaved VQ

edit: (*) just guessing. It may has been designed to allow certain stereo tricks. But since SPM produces two non-inpenendant outputs you better do channel interleaved VQ anyway which sort of makes SPM dispensable
Title: What do you mean by Channel coupling?
Post by: SebastianG on 2006-08-07 20:20:36
Interleaving is independent of both channels is that what you are getting at?

It is, but if you then VQ code the interleaved residue vector then, of course, the channels aren't coded independently anymore.

I thought interleaving was a form of coupling.

I like to think so, yes. As it allows to exploit redundancy via VQ coding.
Title: What do you mean by Channel coupling?
Post by: NeDtHeOnE on 2006-08-07 20:39:57
Wow! Everything was just bouncer for me..
But I got HotshotGG's point for not going for 6ch vorbis .. because "There are no internal mappings for point/phase couplings for the five channels" and if you want to convert at -q6 or above , it'll be lossless encoding. So you've only one option, going for -q6 multi channel encoding which is same as encoding 6 mono channels and remuxing. SO for 6 channel audio someone has to work on point/phase couplings for the five channels.

Thankyou once again! And I think Channel coupling has been setup in AAC 6channel encoder.

:-)
Title: What do you mean by Channel coupling?
Post by: HotshotGG on 2006-08-07 21:17:54
Quote
It is, but if you then VQ code the interleaved residue vector then, of course, the channels aren't coded independently anymore.


After looking at the source code your explanation makes perfect sense to me now.