[FFmpeg-devel] [PATCH] MJPEG/AVI1 to JPEG/JFIF byte stream format filter
Nicolas George
nicolas.george
Thu Nov 4 20:19:55 CET 2010
Le quartidi 14 brumaire, an CCXIX, Michael Niedermayer a ?crit?:
> does ISO C gurantee that sizeof() is what we want it to be ?
What the C standard states is mostly this:
[#3] When applied to an operand that has type char, unsigned
char, or signed char, (or a qualified version thereof) the
result is 1. When applied to an operand that has array
type, the result is the total number of bytes in the
array.75)
[#6] EXAMPLE 2 Another use of the sizeof operator is to
compute the number of elements in an array:
sizeof array / sizeof array[0]
Unless I am mistaken, the only thing that could go wrong here would be if
sizeof(uint8_t) was not 1. I can add the relevant division if you want, but
a lot of lav* code assume, implicitly or explicitly that uint8_t is the same
as unsigned char, so I do not think this would do any good.
New version, with fixed spelling of bitstream, and copy-pasted paragraph
about configure --disable-bsf.
By the way, the effects of this bitstream can be tested with the following
file from the sample collection:
http://samples.mplayerhq.hu/V-codecs/MJPEGs/MVI_3774.AVI
$ ./ffmpeg_g -i /tmp/MVI_3774.AVI -vcodec copy -vframes 1 /tmp/mjpeg%d.jpg
$ display /tmp/mjpeg1.jpg
display: Huffman table 0x00 was not defined `/tmp/mjpeg1.jpg' @ error/jpeg.c/EmitMessage/233.
$ ./ffmpeg_g -i /tmp/MVI_3774.AVI -vcodec copy -vframes 1 -vbsf mjpeg2jpeg -y /tmp/mjpeg%d.jpg
$ display /tmp/mjpeg1.jpg
> besides this this patch looks ok to me
> also if you want write access and agree to our development policy then contact
> diego
I have just re-read the development policy. If I am granted write access to
the repository, I will try, to the best of my ability, to abide to this
policy.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-mjpeg2jpeg-20101104-1924-01-bsfdoc.diff
Type: text/x-diff
Size: 2049 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101104/db71d038/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-mjpeg2jpeg-20101104-1924-02-mjpeg2jpeg.diff
Type: text/x-diff
Size: 8752 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101104/db71d038/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101104/db71d038/attachment.pgp>
More information about the ffmpeg-devel
mailing list