ajdahlenburg / ffmbc

Automatically exported from code.google.com/p/ffmbc
0 stars 0 forks source link

DisplayYOffset missing from CDCI Essence Descriptor for IMX targets #65

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

If you encode imx30/imx50 foramt files, there is this descriptor missing from 
the mxf structure, causing some programs (ex.: Grassvalley Edius) displaying 
FFMBC encoded imx files displayed 32 pixels shifted down. If you rewrap the 
FFMBC produced imx file with some other mxf tool (like FlipFactory) the file 
displays correctly.

According to The MXF book:
DisplayYOffset Int32 Opt - Offset from sampled to display height - Omit, unless 
it's known that vertical blanking has been encoded in which case set the 
correct value 

What is the expected output? What do you see instead?

Analyzing the FFMBC produced imx file using MXFAnalyzerLight there is no 
SimpleElement named <DisplayYOffset> in the CDCI Essence Descriptor section. 
Analyzing any other imx format mxf files produced by any other program there is.

What version of the product are you using? On what operating system?
FFMBC-0.7-rc3

Please provide any additional information below:

I suspect something like this should be present in libavfilter/mxfenc.c:
{ 0x320B, 
{0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0E,0x00,0x00,0x00
}}, /* DisplayYOffset */

and

mxf_write_local_tag(pb, 4, 0x320B);
    if (st->codec->height == 608) // PAL + VBI
        avio_wb32(pb, 16);
    else
        avio_wb32(pb, 0);

Original issue reported on code.google.com by mihaly.b...@gmail.com on 28 Oct 2011 at 3:10

GoogleCodeExporter commented 8 years ago
In the mean time I managed to modify libavformat/mxfenc.c to produce valid mxf 
which include the DisplayYOffset tag. 

According to the MXF reference 
(http://read.pudn.com/downloads166/doc/fileformat/759223/mxf/SMPTE%20377M-2003%2
0Television%20Material%20Exchange%20Format%20(MXF)%20File%20Format%20Specificati
on%20(Standard)%5BP1.PDF)

It says DisplayYOffset: 
"Offset from Sampled to Display Height (see 
E.2.20) 
[RP210 Specifies the Y offset of the presented 
image relative to the sampled image in pixels] "

So I suppose we must also include Sampled Width/Height.
See the attached diff file.

(I'm not sure about if I have to add 32 or just 16 to the size at line 810)
mxf_write_generic_desc(s, st, key, 
size+8+8+8+8+32+8+8+5+16+sc->interlaced*(4+5)+12+20);

Original comment by mihaly.b...@gmail.com on 2 Nov 2011 at 2:19

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, do you need all the tags for the file to work ? Or only DisplayYOffset ?

Original comment by baptiste...@gmail.com on 2 Nov 2011 at 8:24

GoogleCodeExporter commented 8 years ago
As per definition "Offset from Sampled to Display", I suppose we need all of 
them (Sampled Width, Sampled Height, DisplayYOffset, DisplayXOffset)
I've tried with setting only DisplayYOffset, but Edius failed to open the file, 
however VLC was able to play it, and also MXFAnalyzerLight was able to parse 
it. Imho it's not a big issue to include all four parameters, isn't it?

regards, Mihaly

Original comment by mihaly.b...@gmail.com on 2 Nov 2011 at 10:28

GoogleCodeExporter commented 8 years ago
Should be implemented in rc5, can you please verify ?

Original comment by baptiste...@gmail.com on 12 Jan 2012 at 5:53