IPB

Welcome Guest ( Log In | Register )

2 Pages V  < 1 2  
Reply to this topicStart new topic
samples where aps or ape has a problem
Dibrom
post Apr 3 2003, 18:17
Post #26


Founder


Group: Admin
Posts: 2958
Joined: 26-August 02
From: Nottingham, UK
Member No.: 1



QUOTE (2Bdecided @ Apr 1 2003 - 02:24 AM)
So maybe he had a very specific problem in mind, or maybe he was just trying to stop people messing with the --alt-presets.

Dibrom - please tell us!

At the time I was creating the alt-presets for 3.90.2, I did come across 1 file where -Z actually did make quality worse. I don't remember what this file was anymore though, and I only came across this issue once... so when I made that statement, it was with a specific issue in mind, though I don't know entirely how representative it was. The point I was trying to make though was that with the lack of apparent samples where -Z improved things beyond the fixes I already implemented internally, it wasn't worth taking the chance. Now that there have been many more files to pop up which cause problems without -Z, I'd realize the situation differently.
Go to the top of the page
+Quote Post
DickD
post Apr 3 2003, 20:15
Post #27





Group: Members
Posts: 265
Joined: 12-January 03
Member No.: 4542



Just guessing (sorry!) but perhaps -Z could make things worse when the bitrate hits 320kbps (but could do with more) and it's forced to devote bits to satisfying -Z rather than minimising more obvious distortions? Still don't know which samples, but I guess some of the codec killers are especially high bitrate (e.g. artificial or noisy ones like badvilbel and fatboy?) and might suffer slightly. Still, -Z is only wasting a few kbps in those frames where APS acts differently, so could it really be this reason that quality might suffer?

Perhaps APS-Z should be tested more thoroughly? (Though I'm not sure I'd volunteer to ABX badvilbel for subtle changes!). It's sounding like it quite probably that it's a promising, though relatively minor improvement on an already excellent setting.

This post has been edited by DickD: Apr 3 2003, 20:18
Go to the top of the page
+Quote Post
2Bdecided
post Apr 4 2003, 10:53
Post #28


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (JohnV @ Apr 3 2003 - 04:57 PM)
It has been said many times that Gpsycho has often for example better pre-echo control than plain vanilla nspsytune preset, so I don't know if that's anything new. Many times it has been said that the non-codelevel tweaked presets aren't necessarely always performing better than some other switches with a bunch of samples. The --alt-preset cbr 128 also suffers (although prolly not quite similarly) from the use of noise shaping type 2. Try the samples listed in this thread using --alt-preset cbr 128 -Z although this may not be ideal overall... And since GPsycho uses noise shaping type 1 by default, it performs very well with those samples which fail with ns-type2...

Yes, I know the relative strengths and weaknesses of gpsycho vs nspsytune are very very old news - I remember discussions in the r3mix forum!

Where --alt-preset cbr 128 is worse than -h -b 128, I think it's almost entirely due to nspsytune, since -Z does almost nothing to help. (On a quick check, it sounds like it does something on awe32, but not on the others). And, as you say, adding -Z to ap cbr 128 would probably cause problems elsewhere.

I know you're doing some tweaking, and introducing new presets in the current lame alphas - and also (obviously) that ABR beats CBR - but while the current FAQ recommendations still stand, can the FAQ include alternatives at 128kbps? It might be honest to suggest that FhG is worth a try. Not on a page two links down, but actually there in the list of recomended settings.

Cheers,
David.
Go to the top of the page
+Quote Post
2Bdecided
post Apr 4 2003, 11:11
Post #29


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (Dibrom @ Apr 3 2003 - 05:17 PM)
The point I was trying to make though was that with the lack of apparent samples where -Z improved things beyond the fixes I already implemented internally, it wasn't worth taking the chance.  Now that there have been many more files to pop up which cause problems without -Z, I'd realize the situation differently.

So, you're basically saying that, on the current evidence, we should use -Z?


You and JohnV have removed any serious quality worries, but there was also the issue of bloat. I've read that -Z may increase the bitrate. Maybe I don't have the right test samples, but this is barely happening here - it's a 1kbps increase.

Can someone who has a CD which produces a low bitrate using aps try encoding it again with aps -Z please?


DickD - yes! Will someone else listen to aps -Z please? I'm a good listener, but I'm in a noisy environment and I can't hear above 16kHz - so other people really need to check what I'm saying! It doesn't have to be badvilbel - there's plenty of other fun samples - or just grab a CD at random.

Cheers,
David.
Go to the top of the page
+Quote Post
Gabriel
post Apr 4 2003, 11:20
Post #30


LAME developer


Group: Developer
Posts: 2950
Joined: 1-October 01
From: Nanterre, France
Member No.: 138



David, would you try adding --athtype 0 to preset 128?

This could be a workaround against the source of the problem.
My idea is:
Gpsycho estimates tonality up to cwlimit (around 8kHz by default). Upper freqs are all considered to be noise sounds and not tonal sounds. As noise is generating more masking, upper freqs have more masking than lower freqs.
If I'm not wrong, Nspsytune is computing tonality up to the higher relevant part (sfb20?), so higher freqs have less masking than with Gpsycho.

Athtype 0 would increase the masking for the higher freqs. This is obviously not the right solution. Imo the right thing to do would be to have non linear spreading for Nspsytune.
Go to the top of the page
+Quote Post
Wombat
post Apr 4 2003, 11:27
Post #31





Group: Members
Posts: 950
Joined: 7-October 01
Member No.: 235



I use aps -Z for a long time now. I donīt encode much these days.
When i only used aps i stumbled across samples that are bad from time
to time. Most annoying is the Liebestod sample - it is that ugly without
-Z i donīt want to risk any other song to get the same problems. Even if
there would be a possibility another sample may get "a bit" worse. (havenīt found one)

I never stumbled over a really annoying artifact with MY music since i use
aps -Z. I bet with plain aps i would have more samples to offer.

How much the real bitrate differences are, i canīt tell.
Go to the top of the page
+Quote Post
JohnV
post Apr 4 2003, 12:43
Post #32





Group: Developer
Posts: 2797
Joined: 22-September 01
Member No.: 6



QUOTE (2Bdecided @ Apr 4 2003 - 01:11 PM)
You and JohnV have removed any serious quality worries, but there was also the issue of bloat. I've read that -Z may increase the bitrate. Maybe I don't have the right test samples, but this is barely happening here - it's a 1kbps increase.

Can someone who has a CD which produces a low bitrate using aps try encoding it again with aps -Z please?


DickD - yes! Will someone else listen to aps -Z please? I'm a good listener, but I'm in a noisy environment and I can't hear above 16kHz - so other people really need to check what I'm saying! It doesn't have to be badvilbel - there's plenty of other fun samples - or just grab a CD at random.

Yes, using aps/ape -Z increases bitrate but not always. Also one have to understand that there are only some positions on a track where noise-shaping 1 and noise-shaping 2 can sound different, the positions where one or both noise shaping types use scalefactor_scale.

Noise Shaping 1 (APS/APE -Z):
When Lame notices that all scalefactors are even numbered, it halves the values thus saving some bits in coding. This is quality wise "lossless" and is no different outcome than using no scalefac_scale at all (except for the bit saving).

So when Noise Shaping type 1 is used, only lossless bitrate saving happens in certain places. (You can see with EncSpot how many percent of the track is encoded using scalefac_scale).


Noise Shaping 2:
Noise Shaping 2 adds another trick for bitrate saving. When the encoder decides to use scalefac_scale (not necessarely in same places as with NS1), the scalefactor values are doubled. Since scalefactors are used to control the reduction of quantization stepsizes (which control how much noise per SFB is present), the dynamics is larger for the stepsize adjustment. It can go more closer to the "edge" of allowed noise, which of course saves bits.

With Noise Shaping 2, Lame should use scalefac_scale only when it's "safe". Obviously this is not always succeeding, and NS2 scalefac_scale can introduce even quite bad audible distortion sometimes, especially when using vbr-old nspsytune. The masking threshold/allowed noise is not perfect because of the imperfect psychoacoustics, and sometimes it fails when it has the chance to go more closer to the edge. I'd think with better psychoacoustics NS2 would work ok.

Now because of code level tweaking, APS/APE use less often Noise Shaping 2 than without code-level tweaking, but it's still not enough to be totally "safe".

IMO NS2, because it's not safe, is not the right type for VBR coding. But CBR acts differently and low bitrate CBR can gain quality from the bitrate savings given by NS2 scalefac_scaling.


--------------------
Juha Laaksonheimo
Go to the top of the page
+Quote Post
CiTay
post Apr 4 2003, 15:16
Post #33


Administrator


Group: Admin
Posts: 2376
Joined: 22-September 01
Member No.: 3



Okay, i changed the List of recommended LAME settings. What about the "fast" switches though?
Go to the top of the page
+Quote Post
2Bdecided
post Apr 4 2003, 16:25
Post #34


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (Gabriel @ Apr 4 2003 - 10:20 AM)
David, would you try adding --athtype 0 to preset 128?

Gabriel, it doesn't seem to help. Actually, I don't think it helps at all. Sorry!


I'll list the samples where I think --alt-preset cbr 128 is surprisingly bad, as it might help someone to listen or tune...

awe32_20sec - obvious noise
vangelis1 - start of notes replaced by noise
testsignal2 - softening of drum hits
youcantdothat - the intro is wobbley (though the vocal is much better than gpsycho could ever manage!)
fatboy and spahm wink.gif - really - they're arguably worse than -h -b 128

The first two are obvious, the next two are subtle, and the last two are debatable. I know I shouldn't be encoding any of them at 128kbps - but anyway, I hope this information helps!


Cheers,
David.
Go to the top of the page
+Quote Post
2Bdecided
post Apr 4 2003, 16:31
Post #35


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



JohnV - thanks for that long explanation. It would explain (kind of) what I've seen by inverse mix pasting: occasional places where --aps adds MUCH more noise than --APS -Z, though (to my ears) in most of these places, it "gets away with it". We're catching the few where it doesn't.

CiTay - thanks. I hope that meets with everyone's agreement.

I haven't listened to the fast presets - I'll try to find time to try next week. Whereas the 128 stuff is blindingly obvious, the aps -Z stuff does require ABX with some serious concentration - if someone else can do it, I'd be very happy!

Cheers,
David.
Go to the top of the page
+Quote Post
ff123
post Apr 4 2003, 16:50
Post #36


ABC/HR developer, ff123.net admin


Group: Developer (Donating)
Posts: 1396
Joined: 24-September 01
Member No.: 12



2BDecided,

Thanks for that list of samples.

I'll probably update my 128 link to show that the preset's weaknesses, and also make it clear that no one codec can be the best for all files.

ff123
Go to the top of the page
+Quote Post
user
post Apr 11 2003, 14:02
Post #37





Group: Members
Posts: 873
Joined: 12-October 01
From: the great wide open
Member No.: 277



--alt-preset fast standard / extreme ?

dev0:

" Think about adding -Z to the fast presets too. It should result in a quality gain there too.

dev0 "



Correct ?

This post has been edited by user: Apr 11 2003, 14:02


--------------------
www.High-Quality.ch.vu -- High Quality Audio Archiving Tutorials
Go to the top of the page
+Quote Post
Frank Klemm
post Apr 11 2003, 15:41
Post #38


MPC Developer


Group: Developer
Posts: 543
Joined: 15-December 01
From: Germany
Member No.: 659



QUOTE (JohnV @ Apr 4 2003 - 01:43 PM)
Yes, using aps -Z increases bitrate but not always. Also one have to understand that there are only some positions on a track where noise-shaping 1 and noise-shaping 2 can sound different, the positions where one or both noise shaping types use scalefactor_scale.

Noise Shaping 1 (APS -Z):
When Lame notices that all scalefactors are even numbered, it halves the values thus saving some bits in coding. This is quality wise "lossless" and is no different outcome than using no scalefac_scale at all (except for the bit saving).

So when Noise Shaping type 1 is used, only lossless bitrate saving happens in certain places. (You can see with EncSpot how many percent of the track is encoded using scalefac_scale).


Noise Shaping 2:
Noise Shaping 2 adds another trick for bitrate saving. When the encoder decides to use scalefac_scale (not necessarely in same places as with NS1), the scalefactor values are doubled. Since scalefactors are used to control the reduction of quantization stepsizes (which control how much noise per SFB is present), the dynamics is larger for the stepsize adjustment. It can go more closer to the "edge" of allowed noise, which of course saves bits.

With Noise Shaping 2, Lame should use scalefac_scale only when it's "safe". Obviously this is not always succeeding, and NS2 scalefac_scale can introduce even quite bad audible distortion sometimes, especially when using vbr-old nspsytune. The masking threshold/allowed noise is not perfect because of the imperfect psychoacoustics, and sometimes it fails when it has the chance to go more closer to the edge. I'd think with better psychoacoustics NS2 would work ok.

Now because of code level tweaking, APS/APE use less often Noise Shaping 2 than without code-level tweaking, but it's still not enough to be totally "safe".

IMO NS2, because it's not safe, is not the right type for VBR coding. But CBR acts differently and low bitrate CBR can gain quality from the bitrate savings given by NS2 scalefac_scaling.

Using some simple math you find out the following equation:

optimal_Stepsize = 17.312... dB / Number_of_spectral_lines

6 dB steps are optimal for 3 bundeled spectral lines.
3 dB steps are optimal for 6 bundeled spectral lines.
2 dB steps are optimal for 9 bundeled spectral lines.


--------------------
-- Frank Klemm
Go to the top of the page
+Quote Post
2Bdecided
post Apr 11 2003, 16:30
Post #39


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (user @ Apr 11 2003 - 01:02 PM)
--alt-preset fast standard / extreme ?
dev0:

" Think about adding -Z to the fast presets too. It should result in a quality gain there too.

I wasn't completely ignoring the question (it's already been asked in this thread) - I was just avoiding it long enough for someone else to do the listening wink.gif Busy week this week. Remind me next Tuesday - or someone else can try - please?

Cheers,
David.
Go to the top of the page
+Quote Post

2 Pages V  < 1 2
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: 16th April 2014 - 15:51