Log in

View Full Version : mbaff decoding in libavcodec is here


bond
25th May 2006, 21:20
pengvado has written a patch for adding mbaff decoding to libavcodec, thanks a lot :)

http://students.washington.edu/lorenm/src/x264/ffh264_mbaff.0.diff

seeing the bbc using mbaff in their hdtv channel it might be that we will see mbaff interlacing more often in the future?

enjoy

Nick [D]vB
26th May 2006, 01:02
Pengvado is a GOD and should be worshiped as such! :)

Thanks for the heads-up Bond. VLC is not quite there yet though:

http://nightlies.videolan.org/build/win32/trunk-20060526-0001/

The BBC streams now play but freeze after a few seconds :(

Interestingly, some 4Mbps SD resolution H.264 streams [also using MBAFF] taken from the French DVB-T trail all play perfectly!

Lets hope it gets fixed soon...

BTW, do you know if libavcodec already supports all the other features of the High Profile?

foxyshadis
26th May 2006, 01:24
lavc supports anything x264 can put out, sometimes just with a couple months' delay. Since pengvado himself updates its AVC decoding most of the time. ;)

W3ird_N3rd
26th May 2006, 04:43
Finally, been waiting for that!

When will this get into ffdshow? (no, I'm no programmer, otherwise I would try to do it myself..)

And what CPU speed could I expect to be required for playing 1080i content? And if there is a CPU fast enough, does that mean that soon it will be possible to watch HighDef MPEG4 DVB with Linux?

Exciting!!

Manao
26th May 2006, 05:22
And what CPU speed could I expect to be required for playing 1080i contentAt least an AMD 64 4000+.

W3ird_N3rd
26th May 2006, 05:37
At least an AMD 64 4000+.
A singlecore?

I wanted to buy a 4400+ (S939), that's not going to be enough?

I would need a 4800+/FX-60, at least? Damn.. Don't have that much money..

Manao
26th May 2006, 06:52
Yes, single cores only, since lavc isn't multithreaded. With a 3500+, I'm just able to play 1080i @ 4.5 Mbps CBR in realtime. 4.5 is really a low bitrate for such a high definition, and CBR means the bitrate is fairly constant. I fear to imagine how hard a two passes ABR @ 6 mbps would be to decode.

W3ird_N3rd
26th May 2006, 06:58
I'm especially concerned about Linux.. I want to make a dualboot soon, and it would be great if I could watch High-Def content over DVB. For Windows I already bought the Cyberlink decoder, so no real problems there. But I don't know of any h.264 decoder for Linux, apart from libav.

Sigh.. Guess I'll just buy a 4400+ and wait for multithreading support.

Remind me to make a donation to libav when I have some money left again..

Revgen
26th May 2006, 07:32
vB']Pengvado is a GOD and should be worshiped as such! :)

Thanks for the heads-up Bond. VLC is not quite there yet though:

http://nightlies.videolan.org/build/win32/trunk-20060526-0001/

The BBC streams now play but freeze after a few seconds :(

Interestingly, some 4Mbps SD resolution H.264 streams [also using MBAFF] taken from the French DVB-T trail all play perfectly!

Lets hope it gets fixed soon...

BTW, do you know if libavcodec already supports all the other features of the High Profile?


It's too slow for the samples you originally posted. Cyberlink is faster.

Hopefully it improves.

BTW my CPU: AMD 4600+ X2 Dual-Core

foxyshadis
26th May 2006, 08:12
I'm especially concerned about Linux.. I want to make a dualboot soon, and it would be great if I could watch High-Def content over DVB. For Windows I already bought the Cyberlink decoder, so no real problems there. But I don't know of any h.264 decoder for Linux, apart from libav.

Sigh.. Guess I'll just buy a 4400+ and wait for multithreading support.

Remind me to make a donation to libav when I have some money left again..
Core is coming to linux, as is lavc smp, in due time. The more developers get dual cores the more they'll want it. =D

Nick [D]vB
26th May 2006, 13:22
It's too slow for the samples you originally posted. Cyberlink is faster. Hopefully it improves.

BTW my CPU: AMD 4600+ X2 Dual-Core

Strange, the BBC samples seem to play at full speed on my system, until they freeze that is... :(

I have a single core Athlon64 3700+ [SanDiego 1Mb] over-clocked to just over 3GHz [~20% faster than an FX-55 for 1/5th of the price!]

W3ird_N3rd
26th May 2006, 14:17
It seems that when I install that nightly I simply can't play movies at all anymore. I can drag them into VLC, or use the menu, they won't load. No matter what format/codec. Also the last screen of the installer is hardly readable. I wonder where I can report those bugs. Let's take a look..
Core is coming to linux, as is lavc smp, in due time. The more developers get dual cores the more they'll want it. =D
Hope that'll bring a solution :).
vB']Strange, the BBC samples seem to play at full speed on my system, until they freeze that is... :(

I have a single core Athlon64 3700+ [SanDiego 1Mb] over-clocked to just over 3GHz [~20% faster than an FX-55 for 1/5th of the price!]
Libav can't use Revgen's dualcore. Compared to 1 core at 2400Mhz and 512KB of cache, your OCed 3700+ is a lot faster.

Nick [D]vB
26th May 2006, 15:45
Libav can't use Revgen's dualcore. Compared to 1 core at 2400Mhz and 512KB of cache, your OCed 3700+ is a lot faster.

Revgen should be able to get his chip to 2.8GHz without much trouble. Apart from the extra cache and a new memory controller [neither of which should make to much difference] the SanDiego also supports SSE3, do you know if libavc uses these additional instruction sets?

Does anyone know how to contact Pengvado? I am hoping he might be interested in some feed-back, I also have a lot of MBAFF samples for him to test with if he wants.

Sharktooth
26th May 2006, 16:03
extra cache and better memory controller will make some difference... while SSE3 wont.

W3ird_N3rd
26th May 2006, 16:43
vB']Revgen should be able to get his chip to 2.8GHz without much trouble.
Don't say that.. Overclocking is a game of luck, and also depending on a lot of other factors.

You probably don't know anything about his cooling, his motherboard (and thus voltage/HT-bus options), his stepping, his PSU and I bet you didn't check his horoscope - your success in overclocking depends on all of these factors.
Apart from the extra cache and a new memory controller [neither of which should make to much difference] the SanDiego also supports SSE3, do you know if libavc uses these additional instruction sets?
Both the 3700+ and 4600+ support SSE3 and there has AFAIK been no noticeable change in memory controller since the Venice/San Diego, the Manchester/Toledo uses the same controller, although everything might be set up a bit different for dualcore.

Libav afaik doesn't do anything with SSE3, only up to SSE2 (depending on compiling options?).

Nick [D]vB
26th May 2006, 17:09
I bet you didn't check his horoscope
LOL, I'm a bit of a die-hard when it comes to OC'ing so for "without much trouble" read "without liquid nitrogen" :D

I have heard the 4400 and 4600 cores OC a lot better than the 3800's though.

Both the 3700+ and 4600+ support SSE3...
Sorry I didn't phrase my reply very clearly, I realise the newer cores also support SSE3, I was just hoping libavc could make use of it.

What is the chance of libavc supporting multi-threading in the near future? Dual core seems to be catching on fast now...

.

akupenguin
26th May 2006, 17:11
vB']Sorry I didn't phrase my reply very clearly, I realise the newer cores also support SSE3, I was just hoping libavc could make use of it.
No. libavcodec doesn't even use SSE2, because MMX is faster (for AMD).

Revgen
26th May 2006, 17:12
vB']Revgen should be able to get his chip to 2.8GHz without much trouble.

I'd rather wait until an MBAFF capable decoder takes advantage of my other core. It looks like CoreAVC will do that soon with MBAFF support. And like I said earlier, the cyberlink decoder (while still slow) is faster, so I'd say it's a code efficiency issue. Nothing wrong with that. I'm sure akupenguin ( AKA pengvado) will improve upon it. Also OC'ing Dual-Cores is a lot more risky than single-cores.

vB']
Strange, the BBC samples seem to play at full speed on my system, until they freeze that is...

Freezing is the result of the decoder taking too long to process sections of the video. I consider this slow. And VLC does it more than cyberlink at least for me.

lcx
26th May 2006, 19:14
H.264 decoding is one of the requirements of DirectX video acceleration (DXVA) 2.0
DXVA 2.0 is a part of DX10.

I expect the processor requirements will go down once these DX10 cards become widely available.

JuanC
27th May 2006, 04:28
H.264 decoding is one of the requirements of DirectX video acceleration (DXVA) 2.0
DXVA 2.0 is a part of DX10.

I expect the processor requirements will go down once these DX10 cards become widely available.

Microsoft Will Not Release DirectX 10 for Windows XP (http://www.xbitlabs.com/news/video/display/20060525104034.html): "... Both ATI Technologies and Nvidia Corp. planned to release hardware that supports DirectX 10 capabilities as early as in the second half 2006, however, if there will be no API, which unveils the features of the hardware, the companies may reconsider their plans ..."

bob0r
27th May 2006, 13:05
ffh264_mbaff.1.diff (http://students.washington.edu/lorenm/src/x264/ffh264_mbaff.1.diff)

Elias
27th May 2006, 16:15
May I ask what "mbaff decoding" is?

Nick [D]vB
27th May 2006, 16:35
No. libavcodec doesn't even use SSE2, because MMX is faster (for AMD).

That is interesting, of course it is best to use what is fastest I was just wondering what hardware would give the best performance with the current code.

Waiting for DXVA2 is not going to help all the european users wanting to watch the WorldCup in a few weeks, we are all hoping CoreAVC will be ready but it would be great if we were able to use Mplayer and VLC instead.

Unfortunately the BBC are using very high bitrates which has caused problems for many decoders, with 20Mbps streams the latest build of VLC plays about 15 frames and then stalls for ~5 seconds, if I enable frame dropping the streams are more watchable but this is not ideal.

Do you think there is much scope for optimising your MBAFF patch further? Does the patch bob0r posted above offer any improvements at high bitrates? Thank you for taking the time to fix MBAFF support, I know a lot of people appreciate all your hard work.

Thanks again,
Nick

videomixer9
27th May 2006, 21:50
sadly this patch isn't really easily applable to ffdshows h264 part, oddly enough I got it fixed so that it compiles properly but ffdshow just refuses to decode any h264 video after that, not crashing or anything but just not progressing through the frames ... I found out the status of ffdshow code and tried to remerge back the differences made to it but that also didn't work properly ... guess I just wait for milan to add this as his modifications are still a mystery to me.

futurex
29th May 2006, 03:02
May I ask what "mbaff decoding" is?

i would like to ask this too :thanks:

foxyshadis
29th May 2006, 03:10
A form of interlaced encoding.

http://forum.doom9.org/showthread.php?t=96598

Nick [D]vB
29th May 2006, 14:02
It seems the patch was developed for the new French IPTV system, that would explain why it is only working with low bitrate streams at the moment.

http://download.videolan.org/pub/testing/freehd/

I hope it is still being worked on...

Manao
29th May 2006, 14:22
that would explain why it is only working with low bitrate streamsNo. It is working with low bitrate because low bitrates are faster to decode. As I said on another thread, you'll need a computer that doesn't exist yet to play 1920x1080i @ 10 mbps with libavcodec/vlc/mplayer/ffdshow. An A64 3200+ allows to decode 960x1080i @ 4.7 mbps, nothing more. If you double both the resolution and the bitrate, you double the decoding time, so you'll need a A64 6400+.

Nick [D]vB
29th May 2006, 14:36
No. It is working with low bitrate because low bitrates are faster to decode.
I realise that, but if it was only intended for use with IPTV systems there would be no need to make it efficient enough to cope with with higher bitrates. CoreAVC can play 20Mbps streams on current [high-end] hardware, we will just have to wait for MBAFF support to see what kind of performance impact it has for them...

BetaBoy
29th May 2006, 16:36
vB'] CoreAVC can play 20Mbps streams on current [high-end] hardware, we will just have to wait for MBAFF support to see what kind of performance impact has for them...

We are predicting a launch of CoreAVC 1.1 with MBAFF on June 7-8th. Anyone that has the hardware capable of handling Interlaced content like MBAFF. Please email me with your D9 forum ID and email address and if you have the time between June 4-6 for testing. If you do not have the time or the hardware, please do not both to email me.

SeeMoreDigital
29th May 2006, 17:09
Bummer.... that's me and my 1-core 2.8Ghz P4 out then ;)

Daodan
29th May 2006, 17:21
So what would be these requirements? Is a Venice 3200+ @ 2300 mhz enough? It plays 1080p x264 up to 6.5mbit using the Core 1.0, hmm, guess it doesn't meet the requirements on second thought.

Sagittaire
29th May 2006, 19:27
We are predicting a launch of CoreAVC 1.1 with MBAFF on June 7-8th. Anyone that has the hardware capable of handling Interlaced content like MBAFF. Please email me with your D9 forum ID and email address and if you have the time between June 4-6 for testing. If you do not have the time or the hardware, please do not both to email me.

Perhaps a special plugin for VLC ... ???

bond
29th May 2006, 19:35
this thread is about libavcodec! no coreavc talk in here!

BetaBoy
29th May 2006, 20:09
bond... sry... pls move my post #833925 to the CoreAVC thread... thx

SeeMoreDigital
29th May 2006, 20:31
bond... sry... pls move my post #833925 to the CoreAVC thread... thxAnd mine too... I guess!

BetaBoy
30th May 2006, 02:07
bond... nm... i'll post it in that thread....

eggtimer
30th May 2006, 15:50
Even if libavcodec cannot do H.264 High Profile 1080i decoding in real-time on current hardware, it is still useful to have the compatibility so as to use it for non-realtime re-encodes.

popper
17th December 2007, 11:26
sadly this patch isn't really easily applable to ffdshows h264 part, oddly enough I got it fixed so that it compiles properly but ffdshow just refuses to decode any h264 video after that, not crashing or anything but just not progressing through the frames ... I found out the status of ffdshow code and tried to remerge back the differences made to it but that also didn't work properly ... guess I just wait for milan to add this as his modifications are still a mystery to me.

did a new MBAFF patch ever get released that works for the BBC content given the faster machines today?.

an update might be welcome for the FOSS option use?.

clsid
17th December 2007, 13:23
Instead of reviving ancient threads you could have tried the latest version of ffdshow. It has MBAFF support.