[Ffmpeg-devel] libswscale cleanups and warning fixes

Luca Abeni lucabe72
Sun Dec 24 14:09:03 CET 2006


Hi all,

here are some patches to remove some warnings during libswscale build,
and some other cleanups:

1) remove_void_pointers-1.diff: eliminates void pointers arithmetic from
libswscale. Respect to the last version I posted, I fixed some missing
parenthesis, and I verified that the generated code before and after
applying the patch is exactly the same. I went for this solution
(instead of removing "entry_size *" where c->table_gV is initalized)
because it does not change the generated code, so I can verify that is
is correct. If some other solution is preferrable, let me know and I'll
update the patch. I also added yuv2rgb.c to the patch (I initially
missed it because I was not compiling it).

2) unused_var.diff: add some attribute_unused. Fixes some warnings, and
does not change the generated code (I checked that)

3) int_pointer.diff: add some casts to int32_t to remove warnings. I
assume the casts are correct, because I copied them from similar code
(some lines after the patched code). Again, the generated code does not
change.

4) cast_fix.diff: this one changes the generated code. But after reading
it, I believe the previous code is incorrect, and the new one looks
correct to me (of course, I can be wrong ;-). Unfortunately, I found no
way to test this part of code.
Kostya, if I understand correctly you are the author of this code... Can
you have a look?

5) minmax_remove.diff: change all the occurrences of "FFMIN(FFMAX())" to
clip_uint8() or clip()

If one of these patches must be changed, or is useless, let me know and
I'll fix it / drop it.


			Thanks,
				Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_void_pointers-1.diff
Type: text/x-patch
Size: 3539 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061224/18248953/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unused_var.diff
Type: text/x-patch
Size: 1317 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061224/18248953/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: int_pointer.diff
Type: text/x-patch
Size: 1680 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061224/18248953/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cast_fix.diff
Type: text/x-patch
Size: 571 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061224/18248953/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minmax_remove.diff
Type: text/x-patch
Size: 3646 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061224/18248953/attachment-0004.bin>



More information about the ffmpeg-devel mailing list