Commit Graph

1623 Commits

Author SHA1 Message Date
Michael Niedermayer
dbcf7e9ef7 Merge commit '7f75f2f2bd692857c1c1ca7f414eb30ece3de93d'
* commit '7f75f2f2bd692857c1c1ca7f414eb30ece3de93d':
  ppc: Drop unnecessary ff_ name prefixes from static functions
  x86: Drop unnecessary ff_ name prefixes from static functions
  arm: Drop unnecessary ff_ name prefixes from static functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 18:21:35 +02:00
Michael Niedermayer
2514b80045 sws: share xyzgamma tables.
They are currently always constant and thus theres no point to
store them in the context.
This makes the context 16kb smaller

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 17:52:18 +02:00
Diego Biurrun
7f75f2f2bd ppc: Drop unnecessary ff_ name prefixes from static functions 2013-04-30 16:10:06 +02:00
Michael Niedermayer
cb23b06e5e sws: fix typo in xyz2rgb matrix use.
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 19:57:45 +02:00
Michael Niedermayer
24ec7a5e04 sws: Check for malloc failure of rgb0_tmp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 19:31:16 +02:00
Michael Niedermayer
0c47c9028b sws: support xyz input
The implementation is heavily based on Matthias Buerchers and Nicolas Bertrands vf_xyz2rgb.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 19:30:01 +02:00
Michael Niedermayer
45f1cf88a8 sws: remove hack to support partial convert / xyz bswaping
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 19:20:06 +02:00
Michael Niedermayer
2fa08abdb6 sws: enable xyz12, this for now is just for swaping between le and be
Needed for fixing fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 15:53:20 +02:00
Michael Niedermayer
7f17e0ff6a sws: add 16bit gbrp formats to packed_16bpc_bswap()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 15:35:04 +02:00
Michael Niedermayer
f5cca47fde sws: extend packed_16bpc_bswap code to handle planar formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 15:28:00 +02:00
Carl Eugen Hoyos
99818ac4d3 Fix libswscale compilation with --disable-optimizations on x86-32.
Fixes ticket #2477.
2013-04-18 12:47:16 +02:00
Michael Niedermayer
13bbfb8fda sws: Skip ff_yuv2rgb_c_init_tables() when the output is YUV
Fixes "20bpp not supported by yuv2rgb" warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-16 17:50:43 +02:00
Michael Niedermayer
f05cfb654f sws/fill_rgb2yuv_table: use ROUNDED_DIV
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-16 11:33:40 +02:00
Michael Niedermayer
bcf643486f sws/fill_rgb2yuv_table: increase precission to 32bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-16 11:33:40 +02:00
Michael Niedermayer
2fa11a94a3 sws/fill_rgb2yuv_table: avoid 2 divisions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-16 11:13:20 +02:00
Michael Niedermayer
003bf33747 sws: fix alignment of rgb2yuv
This should fix mingw32 fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-16 05:59:47 +02:00
Michael Niedermayer
3950236332 sws/x86: update RENAME(rgb24toyv12)() to using the user provided rgb2yuv table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 21:44:50 +02:00
Michael Niedermayer
357da7ed42 sws: remove forgotten FAST_BGR2YV12 define
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 11:04:52 +02:00
Michael Niedermayer
920dd84bf1 sws/x86: remove 8bit rgb2yuv coefficient case for rgb24toyv12 special converter
This simplifies the code and improves quality at the expense of a slight
slowdown of a rarely used function (no fate test uses it).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 03:19:52 +02:00
Michael Niedermayer
a37fd7f957 sws: Update rgb24toyv12_c() to user supplied rgb2yuv tables
As the function arguments change, we also change the function name
to ensure that anyone using this (non public) function doesnt end
with hard to debug crashes. The new name also has a proper prefix.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 03:08:37 +02:00
Michael Niedermayer
8e27c6ebbb sws/"rgb2rgb": drop RGB2YUV_SHIFT
Fixes a warning and increases the precission the coefficients

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 02:27:14 +02:00
Michael Niedermayer
2a5d1cb2d9 sws/x86: update rgba->yuv to use user supplied table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 01:31:01 +02:00
Michael Niedermayer
17ad06c753 sws/x86: update rgb/bgr->yuv code to use provided coefficient table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 01:31:01 +02:00
Michael Niedermayer
9aafb95ae2 sws: init input_rgb2yuv_table depending on yuv colorspace
For the default table we keep using the exact previous
coefficients, this way individual functions can be updated seperately
without breaking fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 01:30:15 +02:00
Michael Niedermayer
3662e49dde sws: move RGB2YUV_SHIFT to swscale_internal.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 01:23:29 +02:00
Michael Niedermayer
d4956b0bfb sws/input: replace hardcoded rgb2yuv coefficients by table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-14 20:04:55 +02:00
Michael Niedermayer
41ebb64511 swscale/output: fix alpha scale in the new functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-14 16:57:09 +02:00
Michael Niedermayer
a4b5e45e2b sws/output: add yuv2rgb_full_1_c_template()
7500->4500 cycles on sandybridge

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-14 16:57:09 +02:00
Michael Niedermayer
9204a7dc8e sws/output: add +yuv2rgb_full_2_c_template()
8100 cycles -> 5800 cycles on sandybridge

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-14 15:32:11 +02:00
Michael Niedermayer
662664551c sws/output: factor yuv2rgb_write_full() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-14 13:29:58 +02:00
James Almer
89388a953a Replace all occurrences of PRI in sscanf() calls with SCN
Signed-off-by: James Almer <jamrial@gmail.com>
2013-04-10 09:56:48 +02:00
Michael Niedermayer
63a97d5674 Merge commit 'b6649ab5037fb55f78c2606f3d23cea0867cdeaa'
* commit 'b6649ab5037fb55f78c2606f3d23cea0867cdeaa':
  cosmetics: Remove unnecessary extern keywords from function declarations

Conflicts:
	libswscale/x86/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 11:20:41 +01:00
Diego Biurrun
b6649ab503 cosmetics: Remove unnecessary extern keywords from function declarations 2013-03-27 14:21:45 +01:00
Michael Niedermayer
0cfbfaaa12 Merge commit '7b89cd20d844cbe763ca34e63e99d110043cf241'
* commit '7b89cd20d844cbe763ca34e63e99d110043cf241':
  eamad: allocate a dummy reference frame when the real one is missing
  Replace remaining includes of audioconvert.h with channel_layout.h
  Replace some forgotten instances of PIX_FMT_* with AV_PIX_FMT_*.

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 15:44:15 +01:00
Anton Khirnov
542b83fc90 Replace some forgotten instances of PIX_FMT_* with AV_PIX_FMT_*. 2013-03-08 07:42:09 +01:00
Derek Buitenhuis
c87c2d0d02 swscale: Add support for unscaled 8-bit Packed RGB -> Planar RGB
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-02-27 09:51:43 -05:00
Derek Buitenhuis
57c4c25596 swscale: Add support for unscaled 8-bit Packed RGB -> Planar RGB
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-02-27 09:46:39 -05:00
Michael Niedermayer
e4eedb983d swscale-test: fix 3 pointer type warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-26 16:50:32 +01:00
Michael Niedermayer
5e947aeb59 sws/x86: improve rounding for yuv2yuvX
This tries to compensate for the errors introduced by
the rounding of pmulhw

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-15 23:33:04 +01:00
Martin Storsjö
d192ac3e03 swscale: Disallow conversion to GBRP16
This reverts parts of d6d5ef5534, that didn't work right. (The
tests that were added failed on big endian, and the output looked
garbled on little endian as well.)

This is due to the fact that the intermediate scaling values (from
e.g. hScale8To19_c or hScale16To19_c) are stored as int32_t and
thus requires a separate output function, while yuv2gbrp_full_X_c
only interprets it as int16_t.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-11 20:03:16 +02:00
Michael Niedermayer
02b3ac87f8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  sws: disable yuv2rgb warning for planar rgb.

Conflicts:
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-10 14:17:06 +01:00
Michael Niedermayer
f2b89f21cc Merge commit '7b41c24c5fa221b55a9302efaf1a9eeb38b12551'
* commit '7b41c24c5fa221b55a9302efaf1a9eeb38b12551':
  sws: dont enable chrSrcHSubSample for planar RGB

Conflicts:
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-10 14:07:27 +01:00
Michael Niedermayer
d1d9b93e9a Merge commit 'e58013dd8f00e17dd98ba64e41c72f1d152f6608'
* commit 'e58013dd8f00e17dd98ba64e41c72f1d152f6608':
  sws: use planarRgbToRgbWrapper only for 8bit per component

Conflicts:
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-10 13:55:51 +01:00
Michael Niedermayer
42431a557e Merge commit 'd6d5ef5534d582f9dbaf18ac2605cf5bb72cd821'
* commit 'd6d5ef5534d582f9dbaf18ac2605cf5bb72cd821':
  sws: GBRP9, GBRP10, and GBRP16 output support

Conflicts:
	libswscale/output.c
	libswscale/utils.c
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-10 13:49:53 +01:00
Michael Niedermayer
813784a8bf sws: disable yuv2rgb warning for planar rgb.
planar rgb formats do not use the table

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-02-09 14:32:50 -05:00
Michael Niedermayer
7b41c24c5f sws: dont enable chrSrcHSubSample for planar RGB
This code path is not implemented and makes not much sense to implement
either.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-02-09 14:31:53 -05:00
Michael Niedermayer
e58013dd8f sws: use planarRgbToRgbWrapper only for 8bit per component
The function doesnt support >8bit currently

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-02-09 14:31:53 -05:00
Michael Niedermayer
d6d5ef5534 sws: GBRP9, GBRP10, and GBRP16 output support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-02-09 14:31:11 -05:00
Michael Niedermayer
4e2c63685e sws: dont write out of array on bigendian
Fixes Ticket2229

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-07 16:22:51 +01:00
Michael Niedermayer
353bd158f5 sws: Fix "warning: comparison of distinct pointer types lacks a cast"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-04 14:34:13 +01:00