Commit Graph

31116 Commits

Author SHA1 Message Date
Ronald S. Bultje
93a10dd561 swscale: fix overflow in 16-bit vertical scaling.
We operated on 31-bits, but with e.g. lanczos scaling, values can
add up to beyond 0x80000000, thus leading to output of zeroes. Drop
one bit of precision fixes this.
2011-07-11 03:51:46 +02:00
Ronald S. Bultje
71a04bc19d swscale: fix crash in 8-bpc bilinear output without alpha.
We accessed the alpha array even it wasn't used and didn't
exist, hence leading to a NULL pointer segfault.
(cherry picked from commit bf2cba4532)
2011-07-11 03:51:46 +02:00
Ronald S. Bultje
ac9ac45aca swscale: fix 16-bit scaling when output is 8-bits.
We would use the second half of the U plane buffer, rather than the
V plane buffer, to output the V plane pixels.
2011-07-11 03:51:46 +02:00
Michael Niedermayer
08b57574c6 sws: fix non native endian 9-15 bit input with 16bit out 2011-07-11 03:51:10 +02:00
Michael Niedermayer
ca78fa24b7 sws: disable scale16 when int32 is used 2011-07-11 03:51:10 +02:00
Michael Niedermayer
987e4c1787 sws: fix rgb -> 16bit 2011-07-11 03:51:10 +02:00
Michael Niedermayer
b5ff61695f sws: fix uv overwrite in 32bt 2011-07-11 03:51:10 +02:00
Michael Niedermayer
d2c910b9a4 sws: fix gray16_1 2011-07-11 03:51:10 +02:00
Michael Niedermayer
9470205414 sws:ix yuv2rgb48_1_c_template() 2011-07-11 03:51:10 +02:00
Michael Niedermayer
ae05dd8731 sws: fix 16/32 bug from merge 2011-07-11 03:51:10 +02:00
Ronald S. Bultje
948ccdadf4 swscale: for >8bit scaling, read in native bit-depth.
For 9/10bit, it means we don't have to upscale to 16bit before
actual scaling or pixel format conversion, and thus a performance
gain.
2011-07-11 03:51:10 +02:00
Michael Niedermayer
f2db5602ba Merge branch 'ronalds_buggy_gt8bit_sws'
* ronalds_buggy_gt8bit_sws:
  swscale: fix another yuv range conversion overflow in 16bit scaling. (cherry picked from commit 81cc7d0bd1)
  swscale: fix yuv range correction when using 16-bit scaling. (cherry picked from commit e0b8fff6c7)
  swscale: implement >8bit scaling support.

Conflicts:
	libswscale/swscale.c
	libswscale/utils.c
	libswscale/x86/swscale_template.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>
2011-07-11 03:49:33 +02:00
Ronald S. Bultje
afb9d4e8f1 swscale: fix another yuv range conversion overflow in 16bit scaling.
(cherry picked from commit 81cc7d0bd1)
2011-07-01 03:07:37 +02:00
Ronald S. Bultje
ebb0d60353 swscale: fix yuv range correction when using 16-bit scaling.
(cherry picked from commit e0b8fff6c7)
2011-07-01 03:07:18 +02:00
Michael Niedermayer
9251942ca7 Fix mpeg4 padding bug detection with more than 128bit trash and slices.
Fixes ticket302
The second hunk is from anatoly

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-01 03:04:46 +02:00
Carl Eugen Hoyos
315f0e3fd8 Fix possible double free when encoding using xvid. 2011-07-01 02:38:28 +02:00
Carl Eugen Hoyos
dec126a932 Fix internal buffer size for 2bpp and 4bpp raw video. 2011-07-01 02:34:33 +02:00
Jeff Downs
a09918335f Make all option parsing functions match the function pointer type through which they are called.
All option parsing functions now match the function pointer signature through
which they are called (int f(const char *, const char *), thereby working
reliably on all platforms.
Prefix all option processing functions with opt_
2011-06-30 11:49:48 -04:00
Stefano Sabatini
5a931a158f lavu: bump minor and add APIchanges entry for AV_PICTURE_TYPE_NONE
The symbols was added in the git commit
5129336714.
2011-06-30 11:12:05 +02:00
Carl Eugen Hoyos
3713cf11c6 Fix linesize for some rawvideo samples with odd width. 2011-06-30 09:02:14 +02:00
Ronald S. Bultje
45f6ffe5e9 swscale: implement >8bit scaling support.
This means that precision is retained when scaling between sample
formats with >8 bits per component (48bit RGB, 16bit grayscale,
9/10/16bit YUV).
2011-06-30 04:45:00 +02:00
Michael Niedermayer
8c0cbb0848 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rational-test: Add proper main() declaration to fix gcc warnings.
  configure: Add vdpau and dxva2 to configure results output.
  Remove unused, never built libavutil/pca.[ch]
  matroskadec: forward parsing errors to caller.
  av_find_stream_info: simplify EAGAIN handling.
  aacenc: Fix determination of Mid/Side Mode.
  psymodel: Remove the single channel analysis function
  aacenc: Implement dummy channel group analysis that just calls the single channel analysis for each channel.
  psymodel: Add channels and channel groups to the psymodel.
  ARM: remove check for PLD instruction
  fate: move amr[nw]b test rules into separate files
  ogg: fix double free when finding length of small chained oggs.
  swscale: implement >8bit scaling support.
  build: fix creation of tools dir with make 3.81
  build: Mark all-yes Makefile target as phony.
  pixfmt: fix YUV422/444 wrong endian comment
  build: create output directories as needed
  Add new yuv444 pixfmts to avcodec_align_dimensions2

Conflicts:
	Makefile
	configure
	libavutil/pca.c
	libavutil/pca.h
	libavutil/pixfmt.h
	libswscale/swscale.c
	libswscale/utils.c
	libswscale/x86/swscale_template.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>
2011-06-30 04:32:24 +02:00
Michael Niedermayer
623bf96678 avcodec: increase padding, fixes ticket313
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-30 02:17:24 +02:00
Diego Biurrun
812f2376ee rational-test: Add proper main() declaration to fix gcc warnings. 2011-06-30 01:35:47 +02:00
Diego Biurrun
c562ba4c3d configure: Add vdpau and dxva2 to configure results output. 2011-06-30 01:04:18 +02:00
Mans Rullgard
cfa68a3381 Remove unused, never built libavutil/pca.[ch]
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-29 23:49:03 +01:00
Ami Fischman
5dd514af93 matroskadec: forward parsing errors to caller.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-29 15:27:55 -07:00
Ami Fischman
59ca3955fb av_find_stream_info: simplify EAGAIN handling.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-29 15:27:55 -07:00
Reimar Döffinger
e1a54304be Move SRC_PATH hack around to allow compilation from subdir again. 2011-06-30 00:02:09 +02:00
Carl Eugen Hoyos
08b4a667ef Set channel_layout if channels is set when transcoding. 2011-06-29 23:49:44 +02:00
Nathan Caldwell
98add74e85 aacenc: Fix determination of Mid/Side Mode.
In adjust_frame_information(), msc is incremented for each sfb in each
sub-window then compared against max_sfb which is for a single sub-window.

This resulted in frames using EIGHT_SHORT_SEQUENCE where the first few
sub-windows increment msc to a value that results in ms_mode == 2. Even
though only some of the bands are actually using Mid/Side.
2011-06-29 14:28:53 -07:00
Nathan Caldwell
d3a6c2ab7e psymodel: Remove the single channel analysis function 2011-06-29 14:28:53 -07:00
Nathan Caldwell
01344fe409 aacenc: Implement dummy channel group analysis that just calls the single channel analysis for each channel. 2011-06-29 14:28:53 -07:00
Nathan Caldwell
0bc01cc9fe psymodel: Add channels and channel groups to the psymodel. 2011-06-29 14:28:52 -07:00
Mans Rullgard
a3e1f80e8b ARM: remove check for PLD instruction
PLD is present in ARMv5TE and later, which is checked for separately.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-29 21:57:03 +01:00
Mans Rullgard
0291ce840c fate: move amr[nw]b test rules into separate files
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-29 19:22:58 +01:00
Ronald S. Bultje
9ed6cbc3ee ogg: fix double free when finding length of small chained oggs.
ogg_save() copies streams[], but doesn't keep track of free()'ed
struct members. Thus, if in between a call to ogg_save() and
ogg_restore(), streams[].private was free()'ed, this would result
in a double free -> crash, which happened when e.g. playing small
chained ogg fragments.
2011-06-29 09:45:52 -07:00
Ronald S. Bultje
ef1ee362b3 swscale: implement >8bit scaling support.
This means that precision is retained when scaling between sample
formats with >8 bits per component (48bit RGB, 16bit grayscale,
9/10/16bit YUV).
2011-06-29 09:45:52 -07:00
Mans Rullgard
f68069868b build: fix creation of tools dir with make 3.81
GNU make 3.81 apparently does not support order-only prerequisites
with pattern rules, and thus fails to create the tools directory
if it is missing.  Naming the objects explicitly in the rule makes
it work properly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-29 12:06:46 +01:00
Diego Biurrun
e2542dcc6e build: Mark all-yes Makefile target as phony. 2011-06-29 12:15:52 +02:00
Can Wu
86c3c1abf0 pixfmt: fix YUV422/444 wrong endian comment
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-29 11:56:56 +02:00
Mans Rullgard
5e27ec28f0 build: create output directories as needed
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-29 09:14:56 +01:00
Carl Eugen Hoyos
4d08dfefa9 Remove gcc 2.95.3 remnants. 2011-06-29 10:07:39 +02:00
Jason Garrett-Glaser
da55ee6ccc Add new yuv444 pixfmts to avcodec_align_dimensions2
Fixes draw_edges crashes with high-bit-depth 4:4:4 decoding.
2011-06-29 01:00:49 -07:00
Michael Niedermayer
9e17d051ac swscale: Fix yuv422p10
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-29 05:56:46 +02:00
Michael Niedermayer
bb9d5171a7 Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  swscale: Add Doxygen for hyscale_fast/hScale.
  fate: enable lavfi-pixmt tests on big endian systems
  PPC: swscale: disable altivec functions for unsupported formats
  fate: merge identical pixdesc_be/le tests
  swscale: Add Doxygen for yuv2planar*/yuv2packed* functions.
  build: call texi2pod.pl with full path instead of symlink
  build: include sub-makefiles using full path instead of symlinks
  swscale: update big endian reference values after dff5a835.
  wavpack: skip blocks with no samples
  cosmetics: remove outdated comment that is no longer true
  build: replace some addprefix/addsuffix with substitution refs
  avutil: Remove unused arbitrary precision integer code.
  configure: Drop check for availability of ten assembler operands.
  aacenc: Save channel configuration for later use.
  aacenc: Fix codebook trellising for zeroed bands.
  swscale: change prototypes of scaled YUV output functions.
  swscale: re-add support for non-native endianness.
  swscale: disentangle yuv2rgbX_c_full() into small functions.
  swscale: split yuv2packed[12X]_c() remainders into small functions.
  swscale: split yuv2packedX_altivec in smaller functions.
  ...

Conflicts:
	Makefile
	configure
	libavcodec/x86/dsputil_mmx.c
	libavfilter/Makefile
	libavformat/Makefile
	libavutil/integer.c
	libavutil/integer.h
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/x86/swscale_template.c
	tests/ref/lavfi/pixdesc_le
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-29 05:23:12 +02:00
Ronald S. Bultje
4578435f35 swscale: Add Doxygen for hyscale_fast/hScale. 2011-06-29 01:20:34 +02:00
Mans Rullgard
b0da4903dd fate: enable lavfi-pixmt tests on big endian systems
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-28 23:35:00 +01:00
Mans Rullgard
635930d466 PPC: swscale: disable altivec functions for unsupported formats
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-28 23:22:31 +01:00
Michael Niedermayer
dbe5f0172b amrnbdec: we dont want dtx samples anymore and give the user a hint towards how to play such files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-28 23:12:56 +02:00