Skip to main content

Topic: samples where aps or ape has a problem (Read 72233 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Dibrom
  • [*][*][*][*][*]
  • Administrator
samples where aps or ape has a problem
Reply #25
Quote
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.

  • DickD
  • [*][*][*][*]
samples where aps or ape has a problem
Reply #26
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.
  • Last Edit: 03 April, 2003, 02:18:48 PM by DickD

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
samples where aps or ape has a problem
Reply #27
Quote
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.

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
samples where aps or ape has a problem
Reply #28
Quote
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.

  • Gabriel
  • [*][*][*][*][*]
  • Developer
samples where aps or ape has a problem
Reply #29
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.

  • Wombat
  • [*][*][*][*][*]
samples where aps or ape has a problem
Reply #30
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.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

  • JohnV
  • [*][*][*][*][*]
  • Developer
samples where aps or ape has a problem
Reply #31
Quote
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.
  • Last Edit: 15 April, 2003, 12:37:31 PM by JohnV
Juha Laaksonheimo

  • CiTay
  • [*][*][*][*][*]
  • Administrator
samples where aps or ape has a problem
Reply #32
Okay, i changed the List of recommended LAME settings. What about the "fast" switches though?

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
samples where aps or ape has a problem
Reply #33
Quote
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  - 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.

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
samples where aps or ape has a problem
Reply #34
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.

  • ff123
  • [*][*][*][*][*]
  • Developer (Donating)
samples where aps or ape has a problem
Reply #35
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

  • user
  • [*][*][*][*][*]
samples where aps or ape has a problem
Reply #36
--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 ?
  • Last Edit: 11 April, 2003, 09:02:52 AM by user
www.High-Quality.ch.vu -- High Quality Audio Archiving Tutorials

  • Frank Klemm
  • [*][*][*][*][*]
  • Developer
samples where aps or ape has a problem
Reply #37
Quote
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.
  • Last Edit: 11 April, 2003, 11:02:54 AM by CiTay
--  Frank Klemm

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
samples where aps or ape has a problem
Reply #38
Quote
--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  Busy week this week. Remind me next Tuesday - or someone else can try - please?

Cheers,
David.