Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th June 2009, 10:38   #1  |  Link
Sidi
Registered User
 
Join Date: Jun 2009
Posts: 1
H.264 scaled decoding?

Does anybody know if is it possible to improve H.264 decoding performance in simmilar manner than JPEG? I mean scaling during decode (for example to 1/8), which speeds up at least two times on IJL. Is there any decoder that supports anything like this?
Or is there any other mean of making this process faster (other than I-Frame decoding only), even with lower quality? Lets say it is Baseline H.264.
Sidi is offline   Reply With Quote
Old 25th June 2009, 22:09   #2  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,685
One way that I know of is to turn in-loop deblocking off.
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 25th June 2009, 22:21   #3  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,966
It should be noted that turning off in-loop deblocking for a H.264 stream that was encoded with in-loop deblocking enabled, will not only cause more visible blocks. It will cause corrupted output! That's because deblocking is part of H.264 encoding process. P-Frames and B-Frames reference deblocked frames. Skipping the deblocking causes "wrong" references frames, so the error sums up from frame to frame...
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 25th June 2009 at 22:27.
LoRd_MuldeR is offline   Reply With Quote
Old 30th June 2009, 16:06   #4  |  Link
Shevach
Video compressionist
 
Join Date: Jun 2009
Location: Israel
Posts: 117
More idea.

You can discard pictures which are not used for reference (provided that an input stream contains non-reference pictures).
Shevach is offline   Reply With Quote
Old 30th June 2009, 16:46   #5  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,966
Quote:
Originally Posted by Shevach View Post
You can discard pictures which are not used for reference (provided that an input stream contains non-reference pictures).
Why should a stream contain pictures that are neither referenced nor displayed?

I think any picture, referenced or not, will be displayed at least. So you can't simply "discard" any pictures.

That would result in missing pictures and produce jumpy output!

What you can do: Skip the deblocking part on non-referenced pictures (all b-frames, unless b-pyramid is used).
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 30th June 2009 at 17:58.
LoRd_MuldeR is offline   Reply With Quote
Old 1st July 2009, 08:40   #6  |  Link
Shevach
Video compressionist
 
Join Date: Jun 2009
Location: Israel
Posts: 117
Quote:
Originally Posted by LoRd_MuldeR View Post
Why should a stream contain pictures that are neither referenced nor displayed?
Perhaps I was mis-understood.
I suggested to discard pictures which are not used for reference despite these pictures are displayed. Thus the decoding process can be accelerated.
I think this is a popular action implemented in many decoders to cope with performance peaks.

Frankly speaking a stream can contain dangling fields which some decoders do not display.
Shevach is offline   Reply With Quote
Old 1st July 2009, 16:18   #7  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,966
So you want to "discard" pictures that are not used for reference. But you still want to display these pictures

How do you want to display a picture that has been discarded ???

As said in my previous post: I believe the only the thing you can do is skipping the deblocking on non-referenced frames, but not discard those frames entirely!

Furthermore I think skipping the deblocking on non-referenced frames won't give that much speed-up. The only frames that aren't referenced are b-frames.

And even that is only the case with b-pyramid disabled. With b-pyramid b-frames may be referenced by other b-frames as well.

Last but not least deblocking is not the most compute-intensive task. CABAC decoding is, given that CABAC is used...
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 1st July 2009 at 16:27.
LoRd_MuldeR is offline   Reply With Quote
Old 1st July 2009, 16:42   #8  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Quote:
Originally Posted by LoRd_MuldeR View Post
So you want to "discard" pictures that are not used for reference. But you still want to display these pictures

How do you want to display a picture that has been discarded ???
No, he suggested skipping those frames completely, i.e. dropping them within the decoder. As you said, this causes jumpiness, but one could argue that it's still "improved decoding performance at lower quality".

Edit: By the way, libavcodec already does have this option. Try -lavdopts skipframe=nonref with MPlayer.

Quote:
Last but not least deblocking is not the most compute-intensive task. CABAC decoding is, given that CABAC is used...
The relative time required for these tasks depends a lot on the frame resolution and bitrate though. I'd guess that at low bitrates deblocking would be harder than CABAC with current software implementations.

Last edited by nm; 1st July 2009 at 16:50.
nm is offline   Reply With Quote
Old 1st July 2009, 16:59   #9  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,966
Quote:
Originally Posted by nm View Post
No, he suggested skipping those frames completely, i.e. dropping them within the decoder. As you said, this causes jumpiness, but one could argue that it's still "improved decoding performance at lower quality".
That's true. Some dropped frame here and there may still be better than a complete desync.

Quote:
Originally Posted by nm View Post
The relative time required for these tasks depends a lot on the frame resolution and bitrate though. I'd guess that at low bitrates deblocking would be harder than CABAC with current software implementations.
Yeah, but I think decoding performance hardly becomes a problem for SD content. More for HD content (720p or 1080p).

And then the bitrate probably is high enough to make CABAC the performance bottleneck...
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 2nd July 2009, 12:03   #10  |  Link
Shevach
Video compressionist
 
Join Date: Jun 2009
Location: Israel
Posts: 117
Nm is right. I suggested to discard non-reference pictures and consequently don't display them.
Before discarding of pictures a decoder should care the very particular case when in a single complementary field pair one field is used for reference while another not. Indeed, in such case how the frame can be displayed if one of the two fields is absent.

As usual a removal of non-reference frames causes jerkiness artifacts. Although in case of significant motion or a scene cut the removal several frames is not noticeable.
Shevach is offline   Reply With Quote
Reply

Tags
decoding, scaling, speed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.