Commit Graph

298 Commits

Author SHA1 Message Date
siretart 26dbd2fc7c Fix compilation on powerpc with --disable-altivec
in case altivec is disabled, even compilation of code using altivec
keywords or asm must be avoided.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30869 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-09 08:07:34 +00:00
stefano 5f43c89d8b Avoid duplication of usePal() macro.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30856 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-06 11:50:54 +00:00
benoit 11d73c297d libswscale: Extend the unaccelerated path of the unscaled yuv2rgb special
converter with support for rgb444 output format.
Patch by Janusz Krzysztofik jkrzyszt chez tis icnet pl


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30841 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-05 08:32:54 +00:00
cehoyos 487b94aa88 Support BGR555, BGR565, RGB555 and RGB565 foreign endian output in
libswscale.

Patch by Alexis Ballier, alexis D ballier A gmail


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30840 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-04 16:57:04 +00:00
stefano ff232e1f6f Fill the r, g, b values used for computing the c->pal_yuv table in the
case where the source format is PIX_FMT_GRAY8.

This is required as PIX_FMT_GRAY8 has been declared as a paletted
format in FFmpeg r22191, fix GRAY8 -> RGB conversion.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30826 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-04 00:31:13 +00:00
stefano 81b1285123 Implement shuffle_bytes_abcd() functions and use them for shuffling
bytes when converting between RGB32 variants.

In particular fix the argb -> rgba and abgr -> bgra conversions.

See the thread:
Subject: [FFmpeg-devel] [RFC] RGB32 / BGR32 ethernal bug
Date: Tue, 26 Jan 2010 01:06:18 +0100


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30501 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-03 23:46:00 +00:00
stefano 279a334729 Reindent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30467 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 21:58:09 +00:00
stefano 9058c03d7a Use a consistent convention for the names of the internal wrapper
functions. Improve readability.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30466 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 21:56:33 +00:00
michael 156399b7aa Use isAnyRGB() where possible
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30435 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-26 08:03:28 +00:00
michael 378e6bf192 Rename isRGB() and isBGR() as their meaning is confusing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30433 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-26 07:40:14 +00:00
stefano 196fea8c3b Fix mis-computation of the needsDither variable erroneously introduced
in r30419, which was causing a swscale-example regression.

Also increase my liter count by 20.0 units.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30431 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-24 21:28:17 +00:00
stefano 213092c8dc Use av_get_bits_per_pixel() for computing the bits per pixel of the
source and destination format, cache those values in the newly added
SwsContext:srcFormatBpp and SwsContext:dstFormatBpp fields, and remove
the fmt_depth() function.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30419 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-24 12:55:05 +00:00
ramiro c9c95b9046 Indent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30413 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-24 03:02:40 +00:00
ramiro d9f2d9d62c Split swscale.c into scaler code (swscale.c) and utility code (utils.c).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30411 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-24 02:08:22 +00:00
mru 134976ee4d Move array specifiers outside DECLARE_ALIGNED() invocations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30385 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-22 03:26:30 +00:00
conrad 450cef62b0 More const-correctness for sws_scale
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30381 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-21 09:52:11 +00:00
stefano e8da74db1f Split overly long line.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30378 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-19 22:36:46 +00:00
benoit de1ca7fb29 Make const prototypes for input sources of sws_scale_* stricter.
Patch by Alexis Ballier gmailify($firstname, $familyname)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30374 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-19 16:30:20 +00:00
ramiro d4e79342c1 Remove useless forward declaration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30371 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-19 11:35:04 +00:00
stefano 91e4519ed0 Remove stray '\' at the end of macro definitions.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30362 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 23:29:31 +00:00
stefano c60f68724c Remove duplicated or pointless newlines.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30361 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 23:17:47 +00:00
stefano aadf8843d7 Factorize error message logging, log it if the converter cannot be
set.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30360 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 23:07:37 +00:00
stefano 6db184bb80 Reindent after the last commit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30359 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 23:02:20 +00:00
stefano 3c54865aea Make the pal2rgbWrapper set and use the converter in pal2rgbWrapper
only if the input format is paletted.

Fix potential crashes/weirdness if the input format is non-paletted.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30358 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 23:00:01 +00:00
mru 1a8479b95e Remove double const
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30357 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 19:26:35 +00:00
stefano acd1a4075d Factorize error message logging in rgb2rgbWrapper().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30356 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 15:11:25 +00:00
mru 1d08d54a97 Reindent
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30350 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 14:25:19 +00:00
mru 9c1aafc17c Remove inline from initFilter()
It makes no sense having that function inlined.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30349 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 14:25:17 +00:00
stefano f9569e1114 Add a const qualifier in a cast, fix the gcc warning:
swscale.c: In function ‘sws_scale’:
swscale.c:2968: warning: cast discards qualifiers from pointer target type


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30341 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 00:26:29 +00:00
stefano 21a572c8de Add a const qualifier in a cast, fix the gcc warning:
swscale.c: In function ‘planarCopy’:
swscale.c:2256: warning: cast discards qualifiers from pointer target type


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30340 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 00:21:50 +00:00
stefano d11d2ab242 Fix typo, "get rid off" -> "get rid of".
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30338 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-16 22:49:00 +00:00
stefano 68544d15da Revert r30331, which broke compilation.
swScale_C is not templated if any optimization is to be used and
!runtime_cpudetect.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30334 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-16 19:51:26 +00:00
stefano 5cd08a9945 Factorize the code which calls the non optimized C functions in
getSwsFunc().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30331 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-16 19:19:54 +00:00
stefano 5ffab28a7c Prefer "to %s%s" over "to%s %s", slightly more readable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30330 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-16 19:14:29 +00:00
stefano d77dc477c5 Simplify code in sws_getContext() which logs if the destination format
support dithering, remove the const char *dither variable and use a
literal string instead.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30329 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-16 19:11:03 +00:00
ramiro 14fe9544f9 Reuse h{lum,chr}Filter{,Pos} variables for MMX2 fast_bilinear horizontal scaler.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30327 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-16 18:39:06 +00:00
stefano 5d8bd54019 Factorize code which logs the source and destination formats in
sws_getContext().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30326 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-16 18:36:21 +00:00
stefano 4644bd6293 Simplify reset_ptr(): employ usePal() macro rather than enumerating
all the paletted formats.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30317 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-16 11:08:16 +00:00
ramiro 87e34c3f3f Don't initialize normal horizontal filter if MMX2 filter is used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30313 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-15 19:50:59 +00:00
zuxy 0bd2e793c1 Const correctness for src pointer. Remove all constness related warnings in
libswscale.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30306 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-15 08:51:51 +00:00
stefano 32c03dd8c2 Fix typo.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30304 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-15 00:39:25 +00:00
ramiro 8af165c26f Remove unused clip_table code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30303 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-14 19:12:42 +00:00
ramiro 1cda8b002f Add const qualifier to rgb48 to YV12 functions' src.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30301 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-14 06:19:45 +00:00
ramiro dadbe620d6 Add missing parameter to rgb48 to YV12 functions.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30300 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-14 06:19:10 +00:00
reimar c894574236 Ignore 0-height slice in sws_scale, otherwise a final 0-height slice will
cause libswscale to assume the incorrect slice order and complain about
slices starting in the middle.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30246 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-08 19:31:33 +00:00
stefano 3f1a03feb1 Implement sws_isSupportedInput() and sws_isSupportedOutput().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30236 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-07 19:07:47 +00:00
stefano 763360ccad Prefer enum PixelFormat over int for the type of the format parameter
of getSubSampleFactors().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30184 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-03 15:20:07 +00:00
stefano e8d92b1e66 Prefer "*FUNC_NAME(" over "* FUNC_NAME(" for the
swscale_configuration() and swscale_license() functions, consistent
with the rest of FFmpeg.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30180 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-03 14:35:20 +00:00
stefano e786fb79c5 Simplify usePal() macro, make it use av_pix_fmt_descriptors.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30172 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-03 00:22:49 +00:00
stefano f192bfea2a Simplify getSubSampleFactors(), make it use the values provided by
av_pix_fmt_descriptors().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30171 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-03 00:09:24 +00:00