[FFmpeg-user] IMX50 NTSC framesize differs to the SMPTE 356M-2001 Standard - why?

tim nicholson nichot20 at yahoo.com
Tue Jun 9 08:58:53 CEST 2015


On 08/06/15 17:53, Christoph Gerstbauer wrote:
> 
> 
> Am 08.06.15 um 17:24 schrieb Michael Niedermayer:
>> On Wed, Jun 03, 2015 at 04:28:48PM +0200, Christoph Gerstbauer wrote:
>>>>> yes, this happens because 50mbit/sec is not correct
>>>>> a max framesize of 208541 results in a bit rate of max
>>>>> 49.999840 mbit/sec, IIUC thats what the spec means by 50mbit/sec
>>>> The spec actually says "Up to 50Mb/s" and "Up to 208541" that being the
>>>> highest value that comes out below the the 50Mb/s. So I tend to agree
>>>> with Michael.
>>>>
>>> Hi, i have made a short excel calulation and I think that these
>>> settings/syntaxes should be the correct ones for PAL/NTSC D-10:
>>> Do you agree?
>>>
>>>
>>>     
>>>     
>>>     
>>>     
>>>     
>>>     
>>>     minrate
>>>
>>>     
>>>     framerate     max coded     bits/byte     bufsize    
>>>     maxrate
>>>
>>>     
>>>     
>>>     framesize (Bytes)    
>>>     rc_init_occupancy     video bitrate
>>> IMX50     PAL     25     250000     8     2000000    
>>>     50000000
>>>
>>>     
>>>     
>>>        
>>>     
>>>     
>>>     
>>> IMX40     PAL     25     200000     8     1600000    
>>>     40000000
>>>
>>>     
>>>     
>>>        
>>>     
>>>     
>>>     
>>> IMX30     PAL     25     150000     8     1200000    
>>>     30000000
>>>
>>>     
>>>     
>>>        
>>>     
>>>     
>>>     
>>>
>>>     
>>>     
>>>        
>>>     
>>>     
>>>     
>>>
>>>     
>>>     
>>>        
>>>     
>>>     
>>>     
>>> IMX50     NTSC     29,97003     208541     8     1668328    
>>>     49999840,16
>>>
>>>     
>>>     
>>>        
>>>     
>>>     
>>>
>>> IMX40     NTSC     29,97003     166833     8     1334664    
>>>     39999920,08
>> i seem to have missed this reply, my question is basicylly the same
>> as tims, where does the limit resulting in 39999920 come from ?
> Hi, I compared different encoder IMX40 formats, and all of these format
> has a pkt size of 166833bytes (=1 frame for IMX40).
> -> 166833*8*(30000/1001) = 39999920bits

Approximately!

>> is there some specification that limits the VBV buffer size to a
>> lower value for "40mbit/sec" than "50mbit/sec" ?
> Maybe I didnt understand the using of the VBV buffer?
> I thought the VBV buffer size is always ONE frame. So it differs in size
> when using the 50, 40 or 30 mbit format. Is this wrong?

I think this is correct, I think Michael's question was slighly confusing.

> 
> from SMPTE S356M - 2001 - Type D-10 Stream Specifications:
> 
> " The vbv_delay parameter shall be constrained to a *1-frame* delay for
> each GOP by defining the following values:
> 
> 525/60 systems
> 
> – picture_header: vbv_delay = 0BBBh
> 
> 625/50 systems
> 
> – picture_header: vbv_delay = 0E10h"
>

But why does having a 1 frame delay, and therefore one frame buffer
which requires different buffer sizes for PAL and NTSC due to the frame
rate difference, require the bit rates to be different? The only reason
this is the case for the nominal 50M Operating point is because having
exactly 50M at 30000/1001 would lead to frames larger than the maximum
coded frame size. At lower bit rates this is not an issue.

so buffer size = 40000000 x 1001/30000 = 1334667 (approx)

Given the frame rates getting integer values all round is impossible and
even your figures contain rounding errors. So there will always be some
fudging somewhere. Quite how the coder copes with these slightly
incomatible constraints I am unclear.

> [..]

-- 
Tim.
Key Fingerprint 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83


More information about the ffmpeg-user mailing list