[FFmpeg-devel] [PATCH] Re-implement ff_fill_linesize() using pixdescs info

Stefano Sabatini stefano.sabatini-lala
Fri Mar 5 01:21:58 CET 2010


Hi, as discussed here:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/99224/focus=99279

The idea is to make simpler/more general the code of ff_fill_linesize(),
I have a similar patch for ff_fill_pointer().

The test shows some difference between the old and the new
implementation for odd sizes, the new implementation looks more
correct in all cases.

In attachment the test program and the patch meant for review.

Regards.
-- 
FFmpeg = Fundamentalist and Funny Muttering Power Extroverse God
-------------- next part --------------
Mismatch for pixel format 'uyyvyy411' with size 1
ff_fill_linesize : 1 0 0 0
ff_fill_linesize2: 2 0 0 0

Mismatch for pixel format 'bgr4' with size 1
ff_fill_linesize : 0 0 0 0
ff_fill_linesize2: 1 0 0 0

Mismatch for pixel format 'rgb4' with size 1
ff_fill_linesize : 0 0 0 0
ff_fill_linesize2: 1 0 0 0

Mismatch for pixel format 'nv12' with size 1
ff_fill_linesize : 1 2 0 0
ff_fill_linesize2: 1 1 0 0

Mismatch for pixel format 'nv21' with size 1
ff_fill_linesize : 1 2 0 0
ff_fill_linesize2: 1 1 0 0

Mismatch for pixel format 'yuv420p16le' with size 1
ff_fill_linesize : 2 2 2 0
ff_fill_linesize2: 2 1 1 0

Mismatch for pixel format 'yuv420p16be' with size 1
ff_fill_linesize : 2 2 2 0
ff_fill_linesize2: 2 1 1 0

Mismatch for pixel format 'yuv422p16le' with size 1
ff_fill_linesize : 2 2 2 0
ff_fill_linesize2: 2 1 1 0

Mismatch for pixel format 'yuv422p16be' with size 1
ff_fill_linesize : 2 2 2 0
ff_fill_linesize2: 2 1 1 0

Mismatch for pixel format 'uyyvyy411' with size 25
ff_fill_linesize : 37 0 0 0
ff_fill_linesize2: 38 0 0 0

Mismatch for pixel format 'bgr4' with size 25
ff_fill_linesize : 12 0 0 0
ff_fill_linesize2: 13 0 0 0

Mismatch for pixel format 'rgb4' with size 25
ff_fill_linesize : 12 0 0 0
ff_fill_linesize2: 13 0 0 0

Mismatch for pixel format 'nv12' with size 25
ff_fill_linesize : 25 26 0 0
ff_fill_linesize2: 25 25 0 0

Mismatch for pixel format 'nv21' with size 25
ff_fill_linesize : 25 26 0 0
ff_fill_linesize2: 25 25 0 0

Mismatch for pixel format 'yuv420p16le' with size 25
ff_fill_linesize : 50 26 26 0
ff_fill_linesize2: 50 25 25 0

Mismatch for pixel format 'yuv420p16be' with size 25
ff_fill_linesize : 50 26 26 0
ff_fill_linesize2: 50 25 25 0

Mismatch for pixel format 'yuv422p16le' with size 25
ff_fill_linesize : 50 26 26 0
ff_fill_linesize2: 50 25 25 0

Mismatch for pixel format 'yuv422p16be' with size 25
ff_fill_linesize : 50 26 26 0
ff_fill_linesize2: 50 25 25 0

Mismatch for pixel format 'uyyvyy411' with size 27
ff_fill_linesize : 40 0 0 0
ff_fill_linesize2: 41 0 0 0

Mismatch for pixel format 'bgr4' with size 27
ff_fill_linesize : 13 0 0 0
ff_fill_linesize2: 14 0 0 0

Mismatch for pixel format 'rgb4' with size 27
ff_fill_linesize : 13 0 0 0
ff_fill_linesize2: 14 0 0 0

Mismatch for pixel format 'nv12' with size 27
ff_fill_linesize : 27 28 0 0
ff_fill_linesize2: 27 27 0 0

Mismatch for pixel format 'nv21' with size 27
ff_fill_linesize : 27 28 0 0
ff_fill_linesize2: 27 27 0 0

Mismatch for pixel format 'yuv420p16le' with size 27
ff_fill_linesize : 54 28 28 0
ff_fill_linesize2: 54 27 27 0

Mismatch for pixel format 'yuv420p16be' with size 27
ff_fill_linesize : 54 28 28 0
ff_fill_linesize2: 54 27 27 0

Mismatch for pixel format 'yuv422p16le' with size 27
ff_fill_linesize : 54 28 28 0
ff_fill_linesize2: 54 27 27 0

Mismatch for pixel format 'yuv422p16be' with size 27
ff_fill_linesize : 54 28 28 0
ff_fill_linesize2: 54 27 27 0

Mismatch for pixel format 'uyyvyy411' with size 2345
ff_fill_linesize : 3517 0 0 0
ff_fill_linesize2: 3518 0 0 0

Mismatch for pixel format 'bgr4' with size 2345
ff_fill_linesize : 1172 0 0 0
ff_fill_linesize2: 1173 0 0 0

Mismatch for pixel format 'rgb4' with size 2345
ff_fill_linesize : 1172 0 0 0
ff_fill_linesize2: 1173 0 0 0

Mismatch for pixel format 'nv12' with size 2345
ff_fill_linesize : 2345 2346 0 0
ff_fill_linesize2: 2345 2345 0 0

Mismatch for pixel format 'nv21' with size 2345
ff_fill_linesize : 2345 2346 0 0
ff_fill_linesize2: 2345 2345 0 0

Mismatch for pixel format 'yuv420p16le' with size 2345
ff_fill_linesize : 4690 2346 2346 0
ff_fill_linesize2: 4690 2345 2345 0

Mismatch for pixel format 'yuv420p16be' with size 2345
ff_fill_linesize : 4690 2346 2346 0
ff_fill_linesize2: 4690 2345 2345 0

Mismatch for pixel format 'yuv422p16le' with size 2345
ff_fill_linesize : 4690 2346 2346 0
ff_fill_linesize2: 4690 2345 2345 0

Mismatch for pixel format 'yuv422p16be' with size 2345
ff_fill_linesize : 4690 2346 2346 0
ff_fill_linesize2: 4690 2345 2345 0

Mismatch for pixel format 'uyyvyy411' with size 234545
ff_fill_linesize : 351817 0 0 0
ff_fill_linesize2: 351818 0 0 0

Mismatch for pixel format 'bgr4' with size 234545
ff_fill_linesize : 117272 0 0 0
ff_fill_linesize2: 117273 0 0 0

Mismatch for pixel format 'rgb4' with size 234545
ff_fill_linesize : 117272 0 0 0
ff_fill_linesize2: 117273 0 0 0

Mismatch for pixel format 'nv12' with size 234545
ff_fill_linesize : 234545 234546 0 0
ff_fill_linesize2: 234545 234545 0 0

Mismatch for pixel format 'nv21' with size 234545
ff_fill_linesize : 234545 234546 0 0
ff_fill_linesize2: 234545 234545 0 0

Mismatch for pixel format 'yuv420p16le' with size 234545
ff_fill_linesize : 469090 234546 234546 0
ff_fill_linesize2: 469090 234545 234545 0

Mismatch for pixel format 'yuv420p16be' with size 234545
ff_fill_linesize : 469090 234546 234546 0
ff_fill_linesize2: 469090 234545 234545 0

Mismatch for pixel format 'yuv422p16le' with size 234545
ff_fill_linesize : 469090 234546 234546 0
ff_fill_linesize2: 469090 234545 234545 0

Mismatch for pixel format 'yuv422p16be' with size 234545
ff_fill_linesize : 469090 234546 234546 0
ff_fill_linesize2: 469090 234545 234545 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new-ff-fill-linesize-test.patch
Type: text/x-diff
Size: 3108 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100305/b6509044/attachment.patch>



More information about the ffmpeg-devel mailing list