IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
filtering without recompression, is this possible?
MugFunky
post Aug 5 2004, 09:31
Post #1





Group: Members
Posts: 493
Joined: 28-December 03
From: Melbourne, Aus
Member No.: 10767



hi. unfortunately i'm not up with the maths behind MDCT and such, but i'm wondering if it would be possible to perform simple frequency filtering on a transformed sound (like an ac3 file for instance) without having to decode, filter and re-encode (which i obviously don't want to do.)

i'm being driven mad by NTSC pilot tones that make it into foley tracks on my anime (like in "chobits", there's an extremely loud whine whenever a door is opened). ideally i'd like to build an analog notch filter and hook it into the "accessory" busbars on my amp, but i'm thinking that re-burning the DVDs is a possibility too (they're DVD-5 anyway, so i wouldn't be losing any quality)

i'm pretty sure no tools exist as yet to do what i want, but it'd be good to know it is possible in theory, perhaps by zero-ing coefficients or something (as i said, i don't know the maths behind mDCT).

This post has been edited by MugFunky: Aug 5 2004, 09:32
Go to the top of the page
+Quote Post
squid
post Aug 5 2004, 15:49
Post #2





Group: Members
Posts: 19
Joined: 15-June 03
From: Stockholm
Member No.: 7192



Yes, it is possible to perform filtering in the MDCT domain by zeroing or decreasing the amplitude of high frequency coefficients. I also don't know about any tool that does it though..

/Pontus
Go to the top of the page
+Quote Post
MugFunky
post Aug 5 2004, 16:24
Post #3





Group: Members
Posts: 493
Joined: 28-December 03
From: Melbourne, Aus
Member No.: 10767



aaaah. good. i'm not mad then.

i suppose outputting the stream after filtering would be a problem - especially for CBR encodes (like ac3). there'd be re-huffing and stuff to consider. you wouldn't want the files coming out at wrong bitrates.

i suppose it could also be implemented on the decoder side though. maybe it could be included in liba52 by a kind hearted coder (like DCTfilter is in ffdshow, on the video side of things, which does exactly this)
Go to the top of the page
+Quote Post
SebastianG
post Aug 5 2004, 19:34
Post #4





Group: Developer
Posts: 1317
Joined: 20-March 04
From: Göttingen (DE)
Member No.: 12875



some comments:

1) because of its "critical sampled"-property and the MDCT's spectrally overlapping bandpass filters, zeroing some coefficiets will introduce alias artefacts. it's not as good as doing the filtering process in the time domain by convolution.

2) AC3 does not make use of prefix codes (ie huffman codes), so it'll be possible to transcode AC3 to AC3 while zeroing some HF MDCT coeffs and keeping the same bitrate. BTW: It's not always possible to fully zero out any MDCT coeffs because of the different quantizers. low-SNR quantizers use reconstruction levels like (... -3 -2 -1 0 1 2 3 ...) while high-SNR-quantizers use reconstruction levels like (... -3.5 -2.5 -1.5 -0.5 0.5 1.5 2.5 3.5 ...) - no zero. Though, for the HF concent usually low-SNR quantizers are used.

Sebastian

PS: AC3 sucks, doesn't it ? - at least from a technical point of view. no entropy coding of the quantized mantissas, low temporal resolution which may lead to pre-echo artefacts and low spectral resolution of the filterbank. the blockswitch mechanism is pretty much useless, too.

This post has been edited by SebastianG: Aug 6 2004, 13:34
Go to the top of the page
+Quote Post
MugFunky
post Aug 6 2004, 15:35
Post #5





Group: Members
Posts: 493
Joined: 28-December 03
From: Melbourne, Aus
Member No.: 10767



hmm. ac3 is surprisingly good sometimes.

however, i know for a fact that some soundtracks (especially PAL) are decoded, sped up and re-encoded from the NTSC DVD. this practice should be made a hanging offence, but it happens. it's usually because of the copyright holders promising a digibeta master and multitrack tape, and then just sending the sodding DVD, often days before the release date.

however, most pre-echo i've heard on ac3 is due to the fold-down to 2 channel (i don't have a 5.1 setup). when i decode and listen to each channel separately it seems okay. try it with those "w00t, how cool is dolby, eh?" intros on some DVDs... you know, the ones with helicopters whizzing past, or flying drops of water, or even lost Egyptian tombs in sub-par 3d rendering. the helicopter one on "the matrix" r4 has rather obvious pre-echo on the snare drums, but it disappears if you listen to each channel separately.

i am shocked to find out that there's no lossless coding... that's rather inefficient for something that's designed for low bitrates (ever hear the commentry track on "fight club"? it's 96 kbps mono!)

[edit]

oh, about the aliasing, wouldn't this be something you could compensate for to some extent by messing with other coefficients? i suppose there wouldn't be much precision to work with (although getting rid of that awful noise would suit me. i'd much prefer aliasing so long as it isn't equal in volume to what i was removing).

This post has been edited by MugFunky: Aug 6 2004, 15:40
Go to the top of the page
+Quote Post
SebastianG
post Aug 8 2004, 14:35
Post #6





Group: Developer
Posts: 1317
Joined: 20-March 04
From: Göttingen (DE)
Member No.: 12875



QUOTE (MugFunky @ Aug 6 2004, 06:35 AM)
i am shocked to find out that there's no lossless coding... that's rather inefficient for something that's designed for low bitrates (ever hear the commentry track on "fight club"?  it's 96 kbps mono!)
*

Well, what's your definition of "lossless coding" ? :-)
If "lossless coding" involves VLC (variable lengths codes) then: NO.

AC3 is also a very unique architecture. I've never seen a hybrid forward/backward adaptive bit allocation mechanism anywhere else. And maybe VLCs are not worth the effort in this design (I don't know).

AC3 Specification

QUOTE (MugFunky @ Aug 6 2004, 06:35 AM)
[edit]
oh, about the aliasing, wouldn't this be something you could compensate for to some extent by messing with other coefficients?  i suppose there wouldn't be much precision to work with (although getting rid of that awful noise would suit me.  i'd much prefer aliasing so long as it isn't equal in volume to what i was removing).
*

a pure tone is not only present in one MDCT coefficient but also in the surrounding coeffs (because of the band pass filters not being perfect). I guess you could zero out the main coeff and multiply the two surrounding coeffs with 0.5 to get rid of the pilot tone without noticable aliasing. smile.gif

Sebastian
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: 19th April 2014 - 20:49