IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Testing for HF Boost in uncoupled stereo
QuantumKnot
post Feb 3 2004, 03:48
Post #1





Group: Developer
Posts: 1245
Joined: 16-December 02
From: Australia
Member No.: 4097



I need some people to test out this special compile of oggenc where q 2 to 10 now all use uncoupled stereo. There is a theory that point stereo is causing high frequency reverberations to concentrate toward the centre, leading to a distinct 'boost.

Download the oggenc at http://www.hydrogenaudio.org/forums/index....ndpost&p=179808

Test it on samples where you can distinctly hear the infamous high frequency boost in Vorbis, starting from q 2 and above, and compare with the official 1.0.1. Report your results here, describing:

- whether the HF boost is still there or not
- whether it has changed in nature, behaviour, etc.
- is it higher or lower?
- any other types of noise?
etc.

Please note that this oggenc is purely for testing only and the vendor tag has the word 'uncoupled'.

This post has been edited by QuantumKnot: Feb 3 2004, 03:52
Go to the top of the page
+Quote Post
sthayashi
post Feb 3 2004, 07:48
Post #2





Group: Members
Posts: 494
Joined: 16-April 03
From: Pittsburgh, PA
Member No.: 5997



Question: Is this completely uncoupled, or is it losslessly coupled?

I was kicking around the idea in my head to create/compile a version of OggEnc that used lossless stereo coupling at much lower bitrates for 5.1 -> Stereo downmixes using Dolby Pro Logic II (DPLII) The theory being that a DPLII decoder could upmix it with minimal surround problems, and would be ideal for reducing bitrate on OGMs while still preserving the 5.1 information.

It's an interesting idea that ought to be tested. Is this a realization of my idea?
Go to the top of the page
+Quote Post
QuantumKnot
post Feb 3 2004, 11:06
Post #3





Group: Developer
Posts: 1245
Joined: 16-December 02
From: Australia
Member No.: 4097



QUOTE (sthayashi @ Feb 3 2004, 04:48 PM)
Question:  Is this completely uncoupled, or is it losslessly coupled?

I was kicking around the idea in my head to create/compile a version of OggEnc that used lossless stereo coupling at much lower bitrates for 5.1 -> Stereo downmixes using Dolby Pro Logic II (DPLII)  The theory being that a DPLII decoder could upmix it with minimal surround problems, and would be ideal for reducing bitrate on OGMs while still preserving the 5.1 information.

It's an interesting idea that ought to be tested.  Is this a realization of my idea?

To be honest, I am not entirely certain since I'm not totally familiar with the stereo settings. What I have done is replicated the stereo mode in q 10 down to q 6, 5, 4, 3, and 2.

My guess is that it is totally uncoupled in q 9 and 10 and losslessly coupled in 6, 7 and 8. I hope someone more knowledgeable can confirm this. If so, then it wouldn't be hard to replicate these to lower quality rates for lossless coupling.
Go to the top of the page
+Quote Post
kjoonlee
post Feb 4 2004, 01:08
Post #4





Group: Members
Posts: 2526
Joined: 25-July 02
From: South Korea
Member No.: 2782



No channels were coupled in the early betas, and all stereo channels were coupled since RC2. (Xiphophorus libVorbis I 20010813)

Before 1.0 (Xiph.Org libVorbis I 20020717), q5 and above used lossless coupling, and below that used lossy coupling.

Starting with 1.0, q6 and above used lossless coupling, and below that used a mix between lossy and lossless, depending on the input.

IANAVG, but I would assume that QuantumKnot's experimental encoder uses lossless coupling for q2~10.


--------------------
http://blacksun.ivyro.net/vorbis/vorbisfaq.htm
Go to the top of the page
+Quote Post
QuantumKnot
post Feb 4 2004, 01:16
Post #5





Group: Developer
Posts: 1245
Joined: 16-December 02
From: Australia
Member No.: 4097



I need to understand how the adj_stereo structure works

CODE
typedef struct {
int   pre[PACKETBLOBS];
int   post[PACKETBLOBS];
float kHz[PACKETBLOBS];
float lowpasskHz[PACKETBLOBS];
} adj_stereo;


The last two members seem self-explanatory. But at q 9 and 10, pre[] and post[] are all zero. From q 6 to 8, there are some values in post[] and the rest, incl. pre[] are zero. At q 5 and below, we start to see some non-zero values in pre[]. I glanced at the stereo coupling code and didn't garner much from it.

I posted a question on vorbis-dev. No answer yet.
Go to the top of the page
+Quote Post
nyaochi
post Feb 4 2004, 02:51
Post #6





Group: Members
Posts: 169
Joined: 30-September 01
From: Tokyo, Japan
Member No.: 99



I don't understand adj_stereo structure either, but I can probably disable channel coupling by forcing uncoupled mode. Current libvorbis seems to use uncoupled modes (i.e., setup_44u.h) when number of channels is greater than 2 by carefully looking at vorbisenc.c (around lines 636):
CODE
 while(setup_list[i]){
   if(setup_list[i]->coupling_restriction==-1 ||
      setup_list[i]->coupling_restriction==ch){
      ...
    }
 }

This code fragment means libvorbis tries coupled mode first (e.g., coupling_restriction==2), and then uses uncoupled mode (coupling_restriction==-1). So we can skip coupled mode even when ch==2 by changeing coupling_restriction value. Here's a patch.
CODE
--- 1.0.1-official/vorbis/lib/modes/setup_44.h    2002-07-11 04:57:30.000000000 +0900
+++ 1.0.1-uc/vorbis/lib/modes/setup_44.h    2004-02-04 10:01:29.845691200 +0900
@@ -76,7 +76,7 @@
  10,
  rate_mapping_44_stereo,
  quality_mapping_44,
-  2,
+  0,
  40000,
  50000,
 
@@ -127,7 +127,7 @@
  1,
  rate_mapping_44_stereo_low,
  quality_mapping_44_stereo_low,
-  2,
+  0,
  40000,
  50000,

And here's a Win32-binary:
http://homepage3.nifty.com/nyaochi/temp/oggencuc.zip

HF boost still exist in uncoupled -q4 (slightly better but not impressive). sad.gif
Go to the top of the page
+Quote Post
QuantumKnot
post Feb 4 2004, 03:12
Post #7





Group: Developer
Posts: 1245
Joined: 16-December 02
From: Australia
Member No.: 4097



Ah well, so much for that theory. sad.gif

btw. Which sample do you think the high frequency boost is most obvious?

This post has been edited by QuantumKnot: Feb 4 2004, 05:26
Go to the top of the page
+Quote Post
QuantumKnot
post Feb 14 2004, 03:46
Post #8





Group: Developer
Posts: 1245
Joined: 16-December 02
From: Australia
Member No.: 4097



I've made a different modification to force lossless stereo coupling.

In psy.c, we have (line 1116)

QUOTE
if(l<sliding_lowpass){
  if((l>=limit && fabs(rM[l])<postpoint && fabs(rA[l])<postpoint) ||
        (fabs(rM[l])<prepoint && fabs(rA[l])<prepoint)){


    precomputed_couple_point(mag_memo[i][l],
        floorM[l],floorA[l],
        qM+l,qA+l);

    if(rint(qM[l])==0.f)acc+=qM[l]*qM[l];
  }else{
      couple_lossless(rM[l],rA[l],qM+l,qA+l);
  }


Essentially this is a mix of lossless and pont stereo where if the first condition is true, it uses the point coupling function, which at first glance, seems to set the angle to 0 (no diffuse information)

QUOTE
static void precomputed_couple_point(float premag,
      int floorA,int floorB,
      float *mag, float *ang){
 
  int test=(floorA>floorB)-1;
  int offset=31-abs(floorA-floorB);
  float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f;

  floormag*=FLOOR1_fromdB_INV_LOOKUP[(floorB&test)|(floorA&(~test))];

  *mag=premag*floormag;
  *ang=0.f;
}


Anyway, what I've done in the first code snippet is comment out everything except the couple_lossless() function, so it should use lossless coupling every time. smile.gif

I've uploaded a binary at http://www.hydrogenaudio.org/forums/index....ndpost&p=184474

Not much noticeable change compared to my first modification. Compared with the uncoupled/dual stereo version that nyaochi made, it seems (just from coding a few examples) lossless coupling only produces lower average bitrate than uncoupled at q > 4 but below 4, uncoupled stereo produces smaller files. I guess lossless coupling isn't always the best for all q.

Anyway, the uncoupled and lossless vorbis binaries will be useful for the video people who want to preserve Dolby Prologic information. Nyaochi's uncoupled vorbis seems to be the most scalable as my lossless version dies at q 0 and 1 for very obvious reasons (ie. other things I need to modify) smile.gif

This post has been edited by QuantumKnot: Feb 14 2004, 03:49
Go to the top of the page
+Quote Post

Reply to this 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: 26th July 2014 - 16:41