Commit Graph

325 Commits

Author SHA1 Message Date
Luca Barbato 896a22b851 Uniform *ToY and *ToUV function signatures
Originally committed as revision 27636 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-18 00:26:37 +00:00
Luca Barbato 3a5ba0c33f Split mono2Y in monowhite and monoblack
Originally committed as revision 27635 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-18 00:24:32 +00:00
Luca Barbato e48a79c91a Factorize unit32_t* casts for palette pointer
Originally committed as revision 27634 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-18 00:22:53 +00:00
Michael Niedermayer d616c8ae3d Fix segfault with rgb24 and full_internal_chrome due to non existing alpha
byte being written after the array.

Originally committed as revision 27628 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-16 03:49:54 +00:00
Michael Niedermayer a64a062fb9 Avoid using floating point for calculating filter coefficients.
Originally committed as revision 27612 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-15 03:33:09 +00:00
Michael Niedermayer 8588e1484e Avoid some explicit types in sizeof().
Originally committed as revision 27611 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-14 19:29:14 +00:00
Michael Niedermayer 22129c78d7 Use av_mallocz() instead of for() =0;
Originally committed as revision 27610 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-14 19:25:16 +00:00
Michael Niedermayer 45e18be87d Move dither tables from yuv2rgb to swscale, they have been written by me and
can be used under LGPL.

Originally committed as revision 27609 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-14 18:00:49 +00:00
Benjamin Zores a35acd7f8c Fix libswscale build after r27561 if --enable-runtime-cpudetection is used.
Originally committed as revision 27602 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 16:13:04 +00:00
Michael Niedermayer 14014d47cb Fix indention.
Originally committed as revision 27600 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 13:41:47 +00:00
Michael Niedermayer 43c164788c Rename yuv2rgb variables to avoid name clashes with the ones used by bfin asm.
Originally committed as revision 27599 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 11:52:03 +00:00
Michael Niedermayer f433c8abd3 Disable mmx routines that are not bitexact when the user wants
bitexact ones.

Originally committed as revision 27597 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 03:12:15 +00:00
Michael Niedermayer ef423a6618 Make horizontal mmx scaling code match C code.
Originally committed as revision 27596 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 02:18:12 +00:00
Michael Niedermayer 88bc5a64f6 Ensure that additional filter coeffs that exist due to alignment
are 0 if bitexact mode is requested.

Originally committed as revision 27595 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 02:04:10 +00:00
Michael Niedermayer 84c1253513 yvu9toyv12Wrapper is not bitexact so disable it when the user wants
bitexactness to C.

Originally committed as revision 27594 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 23:52:37 +00:00
Michael Niedermayer 881c429407 Make the horizontal C scaler code clip only against INT16_MAX not 0,
this decreases the difference between C and MMX, its also faster.

Originally committed as revision 27593 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 22:29:21 +00:00
Michael Niedermayer ceb700babb Add bitexact flag.
Originally committed as revision 27592 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 21:46:53 +00:00
Michael Niedermayer b82ecd6258 The yuv->rgb tables are too small for cliping to be avoidable,
thus revert the respective optimization. The table generator code
has to be rewritten anyway one day by some volunteer because its
not LGPL, fixing the GPL table generator thus seems like wasted time.

Originally committed as revision 27591 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 21:25:42 +00:00
Michael Niedermayer 78454dfc01 Fix another 1000l bug in the mono input code.
Originally committed as revision 27590 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 18:05:57 +00:00
Michael Niedermayer 6c80eb1626 Add support for PIX_FMT_YUV440P.
Originally committed as revision 27589 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 17:51:13 +00:00
Michael Niedermayer 4bb9adcff1 10000l PIX_FMT_MONOWHITE check was really a || 1.
Thats what happens when one does not do the full set of tests before each commit
and just quickly goes over the diff thinking, "hey its a trivial change".

Originally committed as revision 27588 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 17:28:36 +00:00
Michael Niedermayer 3d05e078ee Support mono as input format.
Originally committed as revision 27587 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 16:46:38 +00:00
Michael Niedermayer ec1bca2a0f Add support for PIX_FMT_MONOWHITE as output format.
Originally committed as revision 27586 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 16:01:17 +00:00
Michael Niedermayer 0885770455 rgb24toyv12 isnt accuratly rounding, so disable it as well when the
user asks for accurate rounding.

Originally committed as revision 27585 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 04:40:51 +00:00
Michael Niedermayer 4155ece530 Do not use the unscaled yuv->rgb converters if SWS_ACCURATE_RND is set,
because they do not accurately round.

Originally committed as revision 27584 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 02:05:37 +00:00
Michael Niedermayer fd5c57b813 100000000000000l, forgot to commit header change for r27580.
Originally committed as revision 27583 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 22:02:15 +00:00
Michael Niedermayer e09d7eef37 Fix typo that lead to averaging of the same pixel in rgb24ToUV_half().
Originally committed as revision 27582 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 14:47:18 +00:00
Michael Niedermayer 8e7ba004ed Remove mistakely commited code i used for testing.
Originally committed as revision 27581 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 14:40:29 +00:00
Michael Niedermayer f0faee4c63 Implement full horizontal chroma for rgb/bgr24/32 output.
Originally committed as revision 27580 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 14:39:12 +00:00
Michael Niedermayer bdf397ba4b Do not do unneeded cliping in YSCALE_YUV_2_PACKEDX_C.
Originally committed as revision 27579 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 03:22:39 +00:00
Michael Niedermayer e69bd29425 Factorize yuv2packedXinC().
Originally committed as revision 27578 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 02:36:51 +00:00
Michael Niedermayer 7b5d7b9e85 Set rgb2yuv constants more accurately, makes no real difference though.
Originally committed as revision 27577 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 01:49:35 +00:00
Michael Niedermayer 85a51e6bd5 Fix chroma yuv->rgb tables for jpeg style yuv, this was missed as it
only affects the C code while mmx uses different tables.

Originally committed as revision 27576 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 00:09:01 +00:00
Michael Niedermayer 5fe4aad711 Correct normalization constant for the vertical filter, iam not
completely sure why this was at such incorrect value, but i could
not find any problems when it was set correctly.

Originally committed as revision 27575 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 23:23:47 +00:00
Michael Niedermayer ac0ad72981 Make the 2point linear interpolation coefficients correct even for the
nearly never occuring 0.0, 1.0.

Originally committed as revision 27574 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 22:41:55 +00:00
Michael Niedermayer 33a67bd6c7 Fix overflow.
Originally committed as revision 27573 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 20:47:16 +00:00
Michael Niedermayer ff9a056d1a Fix build failure due to %%eip on x86_64.
Originally committed as revision 27569 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 17:50:49 +00:00
Michael Niedermayer 6b79dbce0c Change RGB2YUV_SHIFT from 16 to 15 to make it able to work
with 16bit signed constants (like SIMD might use).

Originally committed as revision 27568 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 16:39:56 +00:00
Michael Niedermayer ba83d86299 Add bgr/rgb15/16/32->UV-half to the macro so theres less code duplication
at the source level.

Originally committed as revision 27567 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 13:55:51 +00:00
Michael Niedermayer a0baa07aef Factorize RGB/BGR15/16/32->UV by using the preprocessor.
Originally committed as revision 27566 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 03:56:06 +00:00
Michael Niedermayer 214892ee42 Factorize rgb/bgr15/16/32->Y by using the preprocessor.
Originally committed as revision 27565 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 03:42:45 +00:00
Michael Niedermayer 2f60f6297c Make SWS_FULL_CHR_H_INP work.
Originally committed as revision 27564 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 02:28:38 +00:00
Diego Biurrun 58f0ec5ff6 spelling/wording cosmetics
Originally committed as revision 27563 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-10 00:02:31 +00:00
Michael Niedermayer cbcb408ff6 More accurate rounding for 8bit inputs.
Originally committed as revision 27562 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-09 23:39:32 +00:00
Michael Niedermayer dfb09bd1d4 Rewrite bgr24->yuv mmx code, the new code is cleaner, more accurate,
and does not throw half the chroma away.

Originally committed as revision 27561 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-09 23:30:06 +00:00
Michael Niedermayer 0f5d4aa83b Add table of rgb->yuv convertion coefficients.
Originally committed as revision 27558 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-09 18:01:25 +00:00
Michael Niedermayer 35ab2b6445 More correct rounding for the rgb/bgr->yuv converters.
Originally committed as revision 27557 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-09 16:55:58 +00:00
Michael Niedermayer aa13b0fc55 Prevent overflows during mpeg->jpeg yuv.
Originally committed as revision 27552 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-09 03:35:07 +00:00
Michael Niedermayer 6bc0c7928a Fix jpeg yuv.
Fixes issue504.

Originally committed as revision 27547 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-08 12:36:38 +00:00
Michael Niedermayer 59ded10ca2 Fix typo in comment.
Originally committed as revision 27546 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-08 00:52:22 +00:00