[Ffmpeg-devel] Re: [Fwd: Re: DV Metadata Patch]

Baptiste Coudurier baptiste.coudurier
Wed Aug 23 11:32:56 CEST 2006


Hi

Brian Brice wrote:
> [...]
>  
> +static int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c, uint8_t* buf)
> +{
> +    uint8_t aspect = 0;
> +
> +    /* Its hard to tell what SMPTE requires w.r.t. APT, but Quicktime needs it.
> +     * We set it based on pix_fmt value but it really should be per DV profile */
> +    int apt = (c->sys->pix_fmt == PIX_FMT_YUV422P ? 1 : 0);

Not that hard. Only YUV420P for pal (defined in IEC 61834) sets apt as
0. SMPTE 314M defines apt as 1.

> +    case dv_video_source:
> +          buf[1] = 0xff; /* reserved -- always 1 */
> +          buf[2] = (1 << 7) | /* B/W: 0 - b/w, 1 - color */
> +                   (1 << 6) | /* following CLF is valid - 0, invalid - 1 */
> +                   (3 << 4) | /* CLF: color frames id (see ITU-R BT.470-4) */
> +                   0xf; /* reserved -- always 1 */
> +          buf[3] = (3 << 6) | /* reserved -- always 1 */
> +                   (c->sys->dsf << 5) | /*  system: 60fields/50fields */
> +                   (apt << 2); /* signal type video compression */

Only YUV422P (DV50) has STYPE set to 1.

[...]

I sent a patch on the mailing list: [PATCH] dv pixel format encoding fix
which should fix that.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list