1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

1979 Commits

Author SHA1 Message Date
Michael Niedermayer
42f2cf1597 libswscale/tests/swscale: Fix uninitialized variables
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7796f290653349a4126f2d448d11bb4440b9f257)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-20 03:41:33 +02:00
Michael Niedermayer
48c51b796a swscale/swscale_unscaled: Try to fix Rgb16ToPlanarRgb16Wrapper() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e57d99dd4e0d8fe2992da0d65b563580e35ce728)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
26eccf4bd8 swscale/swscale_unscaled: Fix packed_16bpc_bswap() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 47bc1bdafb0950ccf128eaa491d8fd7cc0978813)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-18 00:18:11 +02:00
Michael Niedermayer
4ccb97650a swscale/utils: Fix chrSrcHSubSample for GBRAP16
Fixes part of Ticket5264

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 67e5bd0c501f7568fc8d93284d0f7eb40663ab06)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-24 00:04:51 +01:00
Michael Niedermayer
a3d698dcb1 swscale/input: Fix GBRAP16 input
Fixes part of Ticket5264

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit df36257a53561a51af969a6ea6319dd2579509b9)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-24 00:04:17 +01:00
Michael Niedermayer
21a6b7930e swscale/x86/output: Fix yuv2planeX_16* with unaligned destination
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f6492a2ea8df80be0ed9591aee4019cef0e36e99)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-17 05:17:35 +01:00
Michael Niedermayer
530192b0e0 swscale/x86/output: Move code into yuv2planeX_mainloop
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d07f6e5f1c36be675e0900edba3e40a32f05f0f4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-17 05:17:18 +01:00
Michael Niedermayer
6897859b5a swscale/swscale: Add some sanity checks for srcSlice* parameters
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 321e85e1769ca1fc1567025ae264760790ee7fc9)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
f121ed611e swscale/x86/rgb2rgb_template: Fix planar2x() for short width
Fixes: 451b3e0cf956c0bd2f27ed753ac24050/asan_heap-oob_2873c01_3231_7ed10a9464d15f0d57277f5917c566a8.AVI

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8a9aaab2695e0f9921db946a3b9f14bea880167)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
6eb76b34ca swscale/swscale_unscaled: Fix odd height inputs for bayer_to_yv12_wrapper()
Fixes: 372d2df1f04b49e25f109f07f90b1505/asan_heap-oob_2835d2e_8501_99e0114d7ba3a6db885d0b4684d200c1.cine
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 757248ea3cd917a7755cb15f817a9b1f15578718)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
034edcec6d swscale/swscale_unscaled: Fix odd height inputs for bayer_to_rgb24_wrapper()
Fixes: 372d2df1f04b49e25f109f07f90b1505/asan_heap-oob_2835d2e_8501_99e0114d7ba3a6db885d0b4684d200c1.cine
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ad3b6fa7d83db7de951ed891649af93a47e74be5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-28 15:53:53 +01:00
Michael Niedermayer
07da25548f swscale/vscale: Check that 2 tap filters are bilinear before using bilinear code
Fixes: out of array reads
Fixes: 07e8b9c5d348ccdf7add0f37de20cf6c/asan_heap-oob_27e8df7_6849_e56653f768070ec8cb52f587048444c2.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit eb7802afefb7af4da50bc56818cdab9da07de7d0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 12:30:41 +01:00
Michael Niedermayer
be9b89314f swscale: Move VScalerContext into vscale.c
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7b6e6895f2cbfa90a39874d03e2fac392bcbd33b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 12:30:41 +01:00
Michael Niedermayer
cdac68fbab swscale/utils: Detect and skip unneeded sws_setColorspaceDetails() calls
This avoids running various table inits unnecessarily

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cc538e9dbd14b61d1ac8c9fa687d83289673fe90)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 12:30:41 +01:00
Michael Niedermayer
1fd9556062 swscale/yuv2rgb: Increase YUV2RGB table headroom
This makes SWS more robust
Fixes: 07650a772d98aa63b0fed6370dc89037/asan_heap-oob_27ddeaf_2657_2c81ff264dee5d9712cb3251fb9c3bbb.264
Fixes: out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8f3a9a8c278acf886f70a1d743bc07b6f9c7b51a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 12:30:40 +01:00
Michael Niedermayer
c781a1e14b swscale/yuv2rgb: Factor YUVRGB_TABLE_LUMA_HEADROOM out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5e5f82a28737fba4402259617500911cc37e3674)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 12:30:40 +01:00
Michael Niedermayer
14c63dc9b0 swscale/utils: Use normal bilinear scaler if fast cannot be used due to tiny dimensions
Fixes Ticket4960

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1edf129cbc897447a289ca8b045853df5df1bab3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 12:30:40 +01:00
Michael Niedermayer
0a6324fe93 swscale/utils: Fix intermediate format for cascaded alpha downscaling
Fixes Ticket4926

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b83d8be6bff7d645469a623aee0b380541da15cf)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 12:30:40 +01:00
Michael Niedermayer
20a48eaaf1 swscale/x86/rgb2rgb_template: Fallback to mmx in interleaveBytes() if the alignment is insufficient for SSE*
This also as a sideeffect fixes the non aligned case

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a066ff89bcbae6033c2ffda9271cad84f6c1b807)
2015-12-15 11:16:22 +01:00
Michael Niedermayer
31aeb96533 swscale/x86/rgb2rgb_template: Do not crash on misaligend stride
Fixes Ticket5013

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 80bfce35ccd11458e97f68f417fc094c5347070c)
2015-12-15 11:16:10 +01:00
Michael Niedermayer
af44545613 swscale/utils: Fix for runtime error: left shift of negative value -1
Fixes: c106b36fa36db8ff8f3ed0c82be7bea2/asan_heap-oob_32699f0_6321_467b9a1d7e03d7cfd310b7e65dc53bcc.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 325b59368dae3c3f2f5cc39873002b4cf133ccbc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-06 02:51:27 +01:00
Pedro Arthur
bb3b4ad460 swscale: fix ticket #4881
When scaling only a slice of a frame the output was written always
in the first lines leaving the rest of the frame black.
(cherry picked from commit 5bd62a1b3c3356b84818efca3fcaf52da27a32af)
2015-10-13 20:11:42 +02:00
Pedro Arthur
01bf0a178d swscale: fix ticket #4877
(cherry picked from commit a8602dde5e0a9858b9cee7e3788bef8efc43d950)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Pedro Arthur
a8d0dcbafa swscale: fix ticket 4850
(cherry picked from commit 77367f61b38dbdf17c31aa6a6b3edccb2ebf5354)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Michael Niedermayer
9801c9524a swscale/swscale: Fix "unused variable" warning
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0ae40c5a70490f102f7b1c62018746d3b424fa07)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 13:15:42 +02:00
Pedro Arthur
3059562aa1 swscale: re-enable gamma
+added gamma conversion to refactored code
2015-09-04 19:00:20 -03:00
Pedro Arthur
f67aff3ad7 swscale: added proper error check for ff_init_filters 2015-09-04 19:00:20 -03:00
Michael Niedermayer
1acd6311a1 swscale/utils: If cascaded contexts are used forward sws_setColorspaceDetails() to the first context
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-31 02:00:55 +02:00
Michael Niedermayer
8e05f9217a swscale/utils: Split scaling if possible and yuv->yuv with different matrixes is requested
This uses a RGB intermediate, a more optimal solution would be to perform the rematrixing
directly in subsampled YUV, this is quite a bit more complicated though

Fixes Ticket4805

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-31 02:00:19 +02:00
Timothy Gu
68a9c8ac77 swscale: Silence an unused variable warning
Also remove a pair of extraneous ifdeffery.
2015-08-25 17:40:06 -07:00
Ganesh Ajjanagadde
eb3cfa7dd3 swscale/alphablend: fix pointer cast
Commit 7c72a4bbd3a0ca421c7419abad2fb65aa713dd8b was slightly wrong

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-08-22 20:11:48 +00:00
Michael Niedermayer
7c72a4bbd3 swscale/alphablend: Fix pointer type warnings
Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-21 12:14:08 +02:00
Pedro Arthur
62d176de12 swscale: refactor vertical scaler 2015-08-19 10:43:52 -03:00
Pedro Arthur
4545906f60 swscale: Fixed typos
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-18 22:56:50 +02:00
Pedro Arthur
ed80dec621 swscale: fixed compiler warnings
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-18 22:56:50 +02:00
Pedro Arthur
0f3687d6fb swscale: add license headers and copyrights
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-18 22:56:50 +02:00
Pedro Arthur
737aa902f0 swscale: process horizontal lines in batches
Process more lines in a single pass to improve performance

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-18 01:33:32 +02:00
Pedro Arthur
e0a3173a94 swscale: refactor horizontal scaling
+ split color conversion from scaling
- disabled gamma correction, until it's refactored too

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-18 01:33:32 +02:00
Michael Niedermayer
3afca32561 swscale/swscale-test: Fix slice height in random reference data creation.
Found-by: Pedro Arthur <bygrandao@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-17 03:08:10 +02:00
Michael Niedermayer
0f9d46b70d swscale/alphablend: Support chroma subsampling
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-09 18:04:46 +02:00
Michael Niedermayer
c5ebeaa308 swscale/alphablend: Support SWS_ALPHA_BLEND_CHECKERBOARD
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-09 17:11:53 +02:00
Michael Niedermayer
87100e828a swscale/alphablend: Factor target computation out of the loops
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-09 16:09:30 +02:00
Michael Niedermayer
f28ba31b1b swscale/alphablend: Fix big endian formats on LE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-09 15:59:12 +02:00
Michael Niedermayer
b7faa9d314 swscale/alphablend: support packed pixel formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-09 15:58:43 +02:00
Michael Niedermayer
c64f01227f swscale/swscale: Document param[0..1]
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-09 14:33:19 +02:00
Michael Niedermayer
d0e0757e9a swscale: Implement alphablendaway for planar 4:4:4 formats
Fixes Ticket4746

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-08 13:24:52 +02:00
Michael Niedermayer
c382d9e8cb swscale: Add sws_alloc_set_opts()
This simplifies allocating and initializing swscale contexts with custom options.
The function is internal currently but could be moved into the public header

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-08 13:08:16 +02:00
Michael Niedermayer
1909a9151c swscale/output: Fix "warning: assignment from incompatible pointer type"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-25 03:15:56 +02:00
Paul B Mahol
3cb8eee6f7 swscale: ayuv64le output support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-24 03:45:48 +00:00
Paul B Mahol
052f64ecb2 swscale: ayuv64le input support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-24 03:44:58 +00:00