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
Register FAQ Calendar Today's Posts Search

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,392
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: 13,248
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
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
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,666
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: 13,248
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 ...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
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: 4,770
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 Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd November 2008, 06:57   #11  |  Link
Sulik
Registered User
 
Join Date: Jan 2002
Location: San Jose, CA
Posts: 216
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,419
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,666
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,419
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, 07:41   #17  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
dfps is the one that matters in LoRd_MuldeR's chart, right?
Snowknight26 is offline   Reply With Quote
Old 11th November 2008, 14:15   #18  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Snowknight26 View Post
dfps is the one that matters in LoRd_MuldeR's chart, right?
I think so. Also "real:" tells you how much time it actually took to decode the entire file. The less, the better.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 2nd December 2008, 18:07   #19  |  Link
Willyfan
Registered User
 
Willyfan's Avatar
 
Join Date: Sep 2008
Location: Brescia, ITALY
Posts: 30
As yoy say, the patch is not cleanly. Tomorrow morning I'll try to modify by hand the part unsuccesful.
Many thanks
Willyfan is offline   Reply With Quote
Old 11th November 2008, 17:43   #20  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
D_S is right. open source developement is quite different than commercial developement. ppl tend to not code stuff unless that stuff is strictly necessary.
if they add slicing to x264, ffmpeg-mt (frame based threaded decoding) will suddenly become useless (coz they already have slice based threaded decoding) and will be not completed/commited.
and since slicing will reduce the encoding quality, it's not an optimal solution since ppl will start to use slicing for multithreaded DECODING...

Last edited by Sharktooth; 11th November 2008 at 17:45.
Sharktooth is offline   Reply With Quote
Reply


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 05:40.


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