[Ffmpeg-devel] [PATCH] movenc should set depth in stsd atom

Limin Wang lance.lmwang
Thu Feb 8 03:55:28 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

* Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> [2007-02-07 21:13:56 +0100]:

> Hello,
> have not actually tested it, but since the demuxer reads bits_per_sample
> from that field I would expect it makes sense to write it there in the
> muxer...
> Comments?
> 
> Greetings,
> Reimar D?ffinger

> Index: libavformat/movenc.c
> ===================================================================
> --- libavformat/movenc.c	(revision 7876)
> +++ libavformat/movenc.c	(working copy)
> @@ -639,7 +639,7 @@
>      put_byte(pb, strlen(compressor_name));
>      put_buffer(pb, compressor_name, 31);
>  
> -    put_be16(pb, 0x18); /* Reserved */
> +    put_be16(pb, track->enc->bits_per_sample); /* depth */
By mp4 specs, I don't think it's expected.

depth would take one of the following values
      0x18 ?? the video sequence is in colour with no alpha
      0x28 ?? the video sequence is in grayscale with no alpha
      0x20 ?? the video sequence has alpha (gray or colour)

>      put_be16(pb, 0xffff); /* Reserved */
>      if(track->enc->codec_id == CODEC_ID_MPEG4)
>          mov_write_esds_tag(pb, track);


Thanks,
Limin
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRcqRIEztbf7dKiuoAQKwNQf+MmdCqm61Kg6QXCGw1qyj6pursRU5ZygP
9coUO2o4tcTWB3gL+fNinnzfEQm3SDf+hTd9cgOuX5CqYG6dgfzqtV8WYEdDStXE
mZAFPZRC4jYTNl+aWQAB9zlZxHBzrN4wRv/2RZWggaqS7kHmPWG5oylff4OCyvOa
V8F8jQOb4YxONFK0a2oSaCAFzWTWrrFRK14YUIl9pCx6IH42JBncS4gnFIMPB90Z
LWzls+wAuqTpApFDKClkLtaXSK/XIosoNqUB02XsEMC0AZSP7CiVZSP58vs7UFKi
LT5II/ZrcvrSNxS794X/1K8tnK1294x8aEy1RVm8tuJGQ7Kn3BSJyA==
=08P5
-----END PGP SIGNATURE-----




More information about the ffmpeg-devel mailing list