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 29th October 2008, 07:26   #1  |  Link
toboda
Registered User
 
Join Date: Dec 2005
Posts: 23
x264 and slicing

Hi,

can anyone enlighten me about slicing in x264 encodes?
As already mention in a former post, I'm trying to generate
BR compliant streams from DPX files in 1920x1080.
After analysing material encoded with x264, one of the probs
that occured was, that the encoded pics consisted of only 1 slice but were supposed to consist of 4 (according to BR spec).
Is there any "switch" in x264 that let's me configure slicing? What could be the problem with a stream that only contains 1 slice per picture instead of 4? The encodes I made so far played fine on SA-Players and even Scenerists MUI Generator parses them without errors...

Thanks for your help!
toboda is offline   Reply With Quote
Old 29th October 2008, 10:11   #2  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,393
There is no problem with 1 slice. Regardless of what you might have been told, even if you have read the spec with your own eyes, I don't believe multislice is really required. And if it is, I still won't consider that any reason to include support in x264.
akupenguin is offline   Reply With Quote
Old 29th October 2008, 10:31   #3  |  Link
Gabriel_Bouvigne
L.A.M.E. developer
 
Gabriel_Bouvigne's Avatar
 
Join Date: Dec 2001
Location: Paris - France
Posts: 276
Could you please point us to the BR spec which requires the use of 4 slices?
Gabriel_Bouvigne is offline   Reply With Quote
Old 29th October 2008, 11:41   #4  |  Link
toboda
Registered User
 
Join Date: Dec 2005
Posts: 23
I had a short file analysed by a replication facility and they reported back the problem with slicing. I questioned them as well, what exactly could happen to the final disc, if the pictures in the videostream have only 1 slice and not 4.
I'll let you know when they answer me.
The reason for all this is that quite a few people seemed to have probs to replicate their BRs due to uncomplianed video so I thought it would be a good idea to check beforehand.
I haven't seen the spec sheet myself thus I can just give to you what they told me.

Greetz
toboda is offline   Reply With Quote
Old 29th October 2008, 23:22   #5  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
The main reasons I can think of for an uncompliant stream is bad ref or B-Frame number choice, VBV over/underflows, and improper keyint / min keyint. I don't think slicing has anything to really do with it.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 30th October 2008, 00:31   #6  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,811
Quote:
Originally Posted by Sagekilla View Post
The main reasons I can think of for an uncompliant stream is bad ref or B-Frame number choice, VBV over/underflows, and improper keyint / min keyint. I don't think slicing has anything to really do with it.
Well, maybe slices are required on BlueRay, because they want to make sure that decoders, which use slice-based multi-threading, can make use of their multi-threading capabilities. Such decoders may fail to decode 1-slice streams fast enough for smooth playback. That's at least the only reason I can think of to make 4 slices mandatory in the specs. However I don't know anything about the actual BR specs, so this is just a guess...

Are all "original" BR releases multi-sliced? If there's at least one that is not, we know that I can't be mandatory
__________________
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 1st November 2008, 20:26   #7  |  Link
MrCommunistGen
Registered User
 
Join Date: Aug 2006
Posts: 30
Quote:
Originally Posted by LoRd_MuldeR View Post
Are all "original" BR releases multi-sliced? If there's at least one that is not, we know that I can't be mandatory
Or that there are non-compliant discs out there.

-mcg
MrCommunistGen is offline   Reply With Quote
Old 1st November 2008, 20:33   #8  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by MrCommunistGen View Post
Or that there are non-compliant discs out there.
Oh, we already know this to be true. Many Blu-ray discs violate the MV range restriction in the spec.
Dark Shikari is offline   Reply With Quote
Old 1st November 2008, 21:17   #9  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,811
Standard compliant or not: If there's a significant number of none-sliced BR discs out there, then players will have to support them or customers will complain

And in that case it should be okay to produce none-sliced discs with "as-is" x264 ...
__________________
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 November 2008, 06:20   #10  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,377
Blu-ray does require slices with H.264 (VC-1 doesn't have that requirement for Bluray, which is one reason VC-1 is so popular with HD pogo stick competition highlight discs).

IIRC, it H.264 on Blu-ray requries at least 3 slices. It always struck me as odd that it was an odd number.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Instant Video

My Compression Book

Amazon Instant Video is hiring! PM me if you're interested.
benwaggoner is online now   Reply With Quote
Old 2nd November 2008, 06:57   #11  |  Link
Sulik
Registered User
 
Join Date: Jan 2002
Location: San Jose, CA
Posts: 215
Blu-ray requires 4 slices for level 4.1 content (less than 4 is allowed for level 4.0 and below)
Sulik is offline   Reply With Quote
Old 4th November 2008, 06:11   #12  |  Link
toboda
Registered User
 
Join Date: Dec 2005
Posts: 23
Could you explain why this is required? As I already mentioned:
My encodes with x264 play without probs on SA-Players. The only reason I can think of is the following:
The copy protection on the replicated disc is so heavy on the decoding unit that it requires the picture to be sliced in order to allow fluent decoding of 4.1 material. Note that this is only
wild speculation. I still haven't got any feedback from the repliction facility, execpt that they're looking into it...

Greetz
toboda is offline   Reply With Quote
Old 10th November 2008, 23:29   #13  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,426
Quote:
Originally Posted by toboda
Could you explain why this is required?
More slices, smother decoding, even on PC
shon3i is offline   Reply With Quote
Old 10th November 2008, 23:35   #14  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by shon3i View Post
More slices, smother decoding, even on PC
How so? DXVA decoding doesn't care about slices, and all good software decoders use frame-based multithreading, which is strictly superior to slice-based multithreading, performance-wise.
Dark Shikari is offline   Reply With Quote
Old 11th November 2008, 00:25   #15  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,426
Well nowdays on PC decoding is much easy, and most decoders know to use all resources, but on Blu-Ray SAP's slices are required.
shon3i is offline   Reply With Quote
Old 11th November 2008, 01:51   #16  |  Link
Tack
Freevo Developer
 
Join Date: May 2007
Location: Waterloo, Ontario
Posts: 118
Quote:
Originally Posted by Dark Shikari View Post
[...] and all good software decoders use frame-based multithreading, which is strictly superior to slice-based multithreading, performance-wise.
... still waiting for libavcodec to become a "good software decoder." Do we know when Alexander Strange's work will be completed (if necessary) and merged?
Tack is offline   Reply With Quote
Old 11th November 2008, 02:00   #17  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by Tack View Post
... still waiting for libavcodec to become a "good software decoder."
Indeed
Quote:
Originally Posted by Tack View Post
Do we know when Alexander Strange's work will be completed (if necessary) and merged?
Talk to him about it. I know he recently updated it to patch on latest ffmpeg trunk.
Dark Shikari is offline   Reply With Quote
Old 11th November 2008, 02:04   #18  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,811
Quote:
Originally Posted by Tack View Post
... still waiting for libavcodec to become a "good software decoder." Do we know when Alexander Strange's work will be completed (if necessary) and merged?
Check out ffmpeg-mt, there is some great speed improvement in ffdshow-mt builds already!

Code:
E:\HD\Crowd Run 2160p UHD CRF22 x264-CtrlHD.mkv

[ffdshow r2301]
User: 7s, kernel: 2s, total: 10s, real: 80s, fps: 50.0, dfps: 6.2
User: 8s, kernel: 1s, total: 9s, real: 87s, fps: 50.8, dfps: 5.7
User: 7s, kernel: 2s, total: 9s, real: 79s, fps: 50.2, dfps: 6.3

[ffdshow-mt r2307]
User: 8s, kernel: 0s, total: 8s, real: 37s, fps: 61.8, dfps: 13.4
User: 8s, kernel: 0s, total: 8s, real: 37s, fps: 61.5, dfps: 13.5
User: 7s, kernel: 0s, total: 8s, real: 37s, fps: 62.5, dfps: 13.5

[DivX H.264 Dec Beta-3]
User: 3s, kernel: 0s, total: 4s, real: 28s, fps: 122.1, dfps: 17.4
User: 3s, kernel: 0s, total: 3s, real: 28s, fps: 126.0, dfps: 17.4
User: 3s, kernel: 0s, total: 4s, real: 28s, fps: 125.0, dfps: 17.3

[CoreAVC Decoder 1.8.5]
No numbers available, because CoreAVC refuses to play this file
__________________
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; 11th November 2008 at 02:11.
LoRd_MuldeR is offline   Reply With Quote
Old 11th November 2008, 07:20   #19  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,426
@Dark Shikari, what about slice patch which done by Mojtaba Hosseini/Etienne Bomcke?, can be improved?
shon3i is offline   Reply With Quote
Old 11th November 2008, 07:32   #20  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by shon3i View Post
@Dark Shikari, what about slice patch which done by Mojtaba Hosseini/Etienne Bomcke?, can be improved?
I will not probably commit a slicing patch until ffmpeg-mt is merged to trunk.

I do not want people using slicing for parallelism.
Dark Shikari is offline   Reply With Quote
Reply

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 16:15.


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