Commit Graph

22941 Commits

Author SHA1 Message Date
Paul B Mahol
cc0bd78413 exr: support more line orders
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-22 18:59:54 +00:00
Paul B Mahol
1178868683 exr: fix overflow check in lineoffset processing
Also read data size for raw compressions too and
make sure its value is sane.

Remove code that fills missing blocks with zeroes.
It is marginally useful and make implementation
of actually useful features harder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-22 18:59:54 +00:00
Paul B Mahol
88d7259fd2 exr: merge multiple if () blocks
Remove useless comments.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-22 18:59:54 +00:00
Paul B Mahol
3456891291 exr: check version too
Separate version from flags.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-22 18:59:54 +00:00
Michael Niedermayer
6f77122bf5 aac: reconfigure output on pop
Fixes Ticket1918

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-22 18:19:42 +01:00
Michael Niedermayer
21f68528e3 aacdec: dont pop random configurations
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-22 14:46:17 +01:00
Michael Niedermayer
b16bf913d8 dxva2: move _WIN32_WINNT handling to public header
This removes duplicate code

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-22 01:37:14 +01:00
Michael Niedermayer
29436c1ab2 libavcodec/mips/aacsbr_mips: fix ;;
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 23:06:30 +01:00
Mirjana Vulin
46d52a0b09 mips: optimization for float aac decoder (ps module)
Signed-off-by: Mirjana Vulin <mvulin@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 22:43:26 +01:00
Mirjana Vulin
8d2eb5fe58 mips: optimization for float aac decoder (sbr module)
Signed-off-by: Mirjana Vulin <mvulin@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 22:43:08 +01:00
Matt Wolenetz
82a4a4e7ca Fix Win64 AVX h264_deblock by not using redzone on Win64
Thanks-to: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 22:38:56 +01:00
Michael Niedermayer
04220b473e h264: ensure that get_format() is called when changing format but not otherwise.
Fixes Ticket2288

Tested-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 22:36:33 +01:00
Michael Niedermayer
8a6449167a avcodec_decode_audio4: check got_frame_ptr before handling initial skip
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 22:01:14 +01:00
Michael Niedermayer
8036ba299d h264: move next/last picture init to decode_slice_header
This is a regression introduced from the h264/mpegvideo split
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 20:24:31 +01:00
Michael Niedermayer
669d50b445 ec: check that reference pictures have matching parameters before using them.
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 16:38:24 +01:00
Michael Niedermayer
bdeb61ccc6 h264: check that luma and chroma depth match
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 15:02:09 +01:00
Matt Wolenetz
311443f6c7 x86: h264: Don't use redzone in AVX h264_deblock on Win64
This fixes crashes in chromium on win64 on machines with AVX
(crashes that apparently aren't triggered by fate).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-21 15:02:16 +02:00
Paul B Mahol
59015c1118 exr: constify s in rle_uncompress()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-21 12:02:18 +00:00
Paul B Mahol
a3d890527e exr: reset compression in decode_frame()
This fixes decoding of images if compression changes.
Regression since b040ffc84c.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-21 12:02:18 +00:00
Michael Niedermayer
6b8f21190d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dxva2: Add missing #define to make header compile standalone
  arm: vp8: Add missing #includes for header to compile standalone
  doc: filters: Correct BNF FILTER description

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 12:59:38 +01:00
Michael Niedermayer
551d8b58eb brender_pix: use a grayscale palette as fallback instead of a uninitialized one.
Improves: 3-0-CORPSE.PIX

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 00:26:50 +01:00
Michael Niedermayer
47e92153b6 mjpegdec: check for packed rgb mjpeg.
Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 00:03:36 +01:00
Carl Eugen Hoyos
c4dc6c4c86 Fix bits_per_coded_sample when encoding png with frame-level multithreading.
Fixes ticket #2290.
2013-02-20 22:54:21 +01:00
Michael Niedermayer
da7672b20a h264: Fix handling of changing reference counts between slices
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 19:53:54 +01:00
Michael Niedermayer
039f55c803 h264: call alloc_scratch_buffers() only once linesize is known
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 19:53:54 +01:00
Diego Biurrun
a0a1ac0f09 dxva2: Add missing #define to make header compile standalone 2013-02-20 14:24:07 +01:00
Diego Biurrun
3e85b46ecf arm: vp8: Add missing #includes for header to compile standalone 2013-02-20 14:24:07 +01:00
Michael Niedermayer
39b03932c2 Merge commit '8a11ce43d08352f7a290355ebb5b29c495ad9609'
* commit '8a11ce43d08352f7a290355ebb5b29c495ad9609':
  build: Ensure that output directories for header objects are created
  h264: Get rid of unnecessary casts

Conflicts:
	common.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 11:54:06 +01:00
Michael Niedermayer
088f20a332 Merge commit '2ed008204d5467be03a0a3af1e293b2f7038d0a0'
* commit '2ed008204d5467be03a0a3af1e293b2f7038d0a0':
  h264: Add add_pixels4/8() to h264dsp, and remove add_pixels4 from dsputil

Conflicts:
	libavcodec/dsputil.c
	libavcodec/h264.c
	libavcodec/h264_mb_template.c
	libavcodec/h264addpx_template.c
	libavcodec/h264dsp.c
	libavcodec/h264dsp.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 11:17:32 +01:00
u-bo1b@0w.se
8d1dd5bd50 cinepak: More correct Cinepak decoder.
change the treatment of the strip y coordinates which previously did
not follow the description (nor did it behave like the binary decoder
on files with absolute strip offsets).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 04:14:04 +01:00
Michael Niedermayer
a3adbedf9b cinepak: simplify
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 04:14:04 +01:00
u-bo1b@0w.se
4e635e10e2 cinepak: Use correct colorspace.
The new code is also faster and more robust.

As for the performance:

old decoder + conversion to rgb:         fps = 2618
old decoder, without converting to rgb:  fps = 4012

new decoder, producing rgb:              fps = 4502

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 04:13:33 +01:00
Michael Niedermayer
f5c00b347d avcodec_align_dimensions2: Ensure cinepak has large enough buffers.
This is partly redundant with the following patches, but its safer

Found-by: u-bo1b@0w.se
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 03:54:36 +01:00
Michael Niedermayer
c69315a5de cook: check js_subband_start for validity
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 00:20:03 +01:00
Martin Storsjö
26ee5ca03d h264: Get rid of unnecessary casts
This gets rid of a number of warnings about casts discarding
qualifiers from the pointer target, present since 7ebfb466a.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-20 00:25:29 +02:00
Michael Niedermayer
a5153b1d16 shorten: Fix signedness of comparission
Fixes out of array accessed

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 23:08:19 +01:00
Michael Niedermayer
ce153eef8f vc1dec: dont decode slices when the slice header failed to decode.
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 21:40:44 +01:00
Ronald S. Bultje
fae6fd5b87 h264/svq3: Stop using draw_edges
Instead, only extend edges on-demand when the motion vector actually
crosses the visible decoded area using ff_emulated_edge_mc(). This
changes decoding time for cathedral from 8.722sec to 8.706sec, i.e.
0.2% faster overall. More generally (VP8 uses this also), low-motion
content gets significant speed improvements, whereas high-motion content
tends to decode in approximately the same time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:34:33 +02:00
Ronald S. Bultje
7ebfb466ae h264: Don't store intra pcm samples in h->mb
Instead, keep them in the bitstream buffer until we read them verbatim,
this saves a memcpy() and a subsequent clearing of the target buffer.
decode_cabac+decode_mb for a sample file (CAPM3_Sony_D.jsv) goes from
6121.4 to 6095.5 cycles, i.e. 26 cycles faster.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:34:14 +02:00
Ronald S. Bultje
9918f57dcf get_bits: Return pointer to buffer that is the result of the alignment
This allows more transparent mixing of get_bits and whole-byte access
without having to touch get_bits internals.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:52 +02:00
Ronald S. Bultje
2ed008204d h264: Add add_pixels4/8() to h264dsp, and remove add_pixels4 from dsputil
These functions are mostly H264-specific (the only other user I can
spot is bink), and this allows us to special-case some functionality
for H264. Also remove the 16-bit-coeff with >8bpp versions (unused)
and merge the duplicate 32-bit-coeff for >8bpp (identical).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:29 +02:00
Ronald S. Bultje
e5ffffe48d h264chroma: Remove duplicate 9/10 bit functions
These functions do the same thing in 16 bit space and don't need
any depth specific clipping.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:19 +02:00
Ronald S. Bultje
f859678f3f vp56: Remove clear_blocks call, and clear alpha plane U/V DC only
The non-alpha and alpha-Y planes are cleared in the idct_put/add()
calls. For the alpha U/V planes, we only care about the DC for entropy
context prediction purposes, the rest of the data is unused.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:11 +02:00
Michael Niedermayer
a34418c28e tiff: check bppcount
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 17:57:36 +01:00
Michael Niedermayer
633f997479 bmp: check available space when reading palette
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 17:00:04 +01:00
Ronald S. Bultje
1acd7d594c h264: integrate clear_blocks calls with IDCT.
The non-intra-pcm branch in hl_decode_mb (simple, 8bpp) goes from 700
to 672 cycles, and the complete loop of decode_mb_cabac and hl_decode_mb
(in the decode_slice loop) goes from 1759 to 1733 cycles on the clip
tested (cathedral), i.e. almost 30 cycles per mb faster.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 16:25:50 +01:00
Ronald S. Bultje
a1f1ca96b4 svq3: fix decoding residual blocks of b-frames.
The residual block data of 16x16 blocks was ignored for b-frames, which
leads to easy-to-identify artifacts. After this patch, the artifacts are
gone. Sample video: svq3_watermark.mov. (Fate results unaffected.)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 15:59:53 +01:00
Michael Niedermayer
b9237aa7b0 x86/h263_loopfilter: Fix author attribution after code has been moved/splited around
Reference:
    commit 3615e2be84
    Author: Michael Niedermayer <michaelni@gmx.at>
    Date:   Tue Dec 2 22:02:57 2003 +0000

        h263_h_loop_filter_mmx

        Originally committed as revision 2553 to svn://svn.ffmpeg.org/ffmpeg/trunk

    commit 359f98ded9
    Author: Michael Niedermayer <michaelni@gmx.at>
    Date:   Tue Dec 2 20:28:10 2003 +0000

        h263_v_loop_filter_mmx

        Originally committed as revision 2552 to svn://svn.ffmpeg.org/ffmpeg/trunk
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 12:51:00 +01:00
Michael Niedermayer
fa09ad5c9e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: dsputil: Fix h263 loop filter link error in some configurations

Conflicts:
	libavcodec/x86/dsputil.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 12:41:27 +01:00
Michael Niedermayer
cf10616cc0 Merge commit '7a03145ed7cb4f1ce794b5126559dd6f38029243'
* commit '7a03145ed7cb4f1ce794b5126559dd6f38029243':
  x86: dsputil: int --> ptrdiff_t for ff_put_pixels16_mmxext line_size param

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 12:32:12 +01:00
Paul B Mahol
03b711d95e tmv: initialize unused pallete entries with 0
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-19 11:11:42 +00:00
Michael Niedermayer
d41efc1f26 h264: put visualization and debug support back
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 02:56:31 +01:00
Michael Niedermayer
a3a97129e7 mpegvideo: make ff_print_debug_info independant of mpegvideo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-19 02:46:05 +01:00
Ronald S. Bultje
e2789d3e33 split out ff_hwaccel_pixfmt_list_420[] over individual codecs.
Not all hwaccels implement all codecs, so using one single list for
multiple such codecs means some codecs will be represented in the list,
even though they don't actually handle that codec. Copying specific
lists in each codec fixes that.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 21:44:22 +01:00
Paul B Mahol
85921499c7 cdgraphics: set palette to zero too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-18 16:38:06 +00:00
Paul B Mahol
1f4ab61b74 lavc/cdxl: clear palette before reading it
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-18 16:19:27 +00:00
Daniel Kang
9acd23d655 x86: dsputil: Fix h263 loop filter link error in some configurations
This was caused by unconditionally referencing a conditionally compiled
table. Now the code is also compiled conditionally.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-02-18 17:09:00 +01:00
Daniel Kang
7a03145ed7 x86: dsputil: int --> ptrdiff_t for ff_put_pixels16_mmxext line_size param
This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-02-18 15:23:03 +01:00
Ronald S. Bultje
71ae8d50b2 x86/dsputil: fix compilation when h263 decoder/encoder are disabled.
The symbol "ff_h263_loop_filter_strength" is defined in h263.c, but
the h263 loopfilter functions (in the .asm file) are not optimized
out (even though their function pointers are never assigned).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 15:18:56 +01:00
Ronald S. Bultje
51513b98d6 h264/svq3: stop using draw_edges.
Instead, only extend edges on-demand when the motion vector actually
crosses the visible decoded area using ff_emulated_edge_mc(). This
changes decoding time for cathedral from 8.722sec to 8.706sec, i.e.
0.2% faster overall. More generally (VP8 uses this also), low-motion
content gets significant speed improvements, whereas high-motion content
tends to decode in approximately the same time.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 15:18:56 +01:00
Michael Niedermayer
82e82fa2e5 Merge commit 'aa11cb79318baa3415d553424ba378f6c62e1f9b'
* commit 'aa11cb79318baa3415d553424ba378f6c62e1f9b':
  build: make audio_frame_queue a stand-alone component

Conflicts:
	configure
	libavcodec/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 12:55:31 +01:00
Michael Niedermayer
4b7c81c3e0 Merge commit '870a0c669e536d56c6325d84f65e34c53792398e'
* commit '870a0c669e536d56c6325d84f65e34c53792398e':
  build: The libopencore-amrnb encoder depends on audio_frame_queue

Conflicts:
	libavcodec/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 12:29:31 +01:00
Michael Niedermayer
2220f13d82 Merge commit '8837f4396a1a458a0efb07fe7daba7b847755a7a'
* commit '8837f4396a1a458a0efb07fe7daba7b847755a7a':
  libopencore-amrwb: Make AMR-WB ifdeffery more precise

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 12:20:16 +01:00
Michael Niedermayer
ab213b5360 Merge commit 'e6bda9a9fd86505927a2e095e495eae104860701'
* commit 'e6bda9a9fd86505927a2e095e495eae104860701':
  libopencore-amr: Conditionally compile decoder and encoder bits

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 12:15:12 +01:00
Michael Niedermayer
4ff0e63a01 Merge commit '56632fef65c0cb6946ed3648ded3d7b82e5c5c17'
* commit '56632fef65c0cb6946ed3648ded3d7b82e5c5c17':
  libopencore-amrnb: cosmetics: Group all encoder-related code together

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 12:10:57 +01:00
Michael Niedermayer
96008082db Merge commit '488f87be873506abb01d67708a67c10a4dd29283'
* commit '488f87be873506abb01d67708a67c10a4dd29283':
  roqvideodec: check dimensions validity
  vqavideo: check chunk sizes before reading chunks
  qdm2: check array index before use, fix out of array accesses

Conflicts:
	libavcodec/qdm2.c
	libavcodec/roqvideodec.c
	libavcodec/vqavideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 11:26:53 +01:00
Matti Hamalainen
7f3624dc81 svq3: unbreak decoding
a7d2861d36 removed necessary braces.
2013-02-18 02:55:07 +01:00
Ronald S. Bultje
c63f9fb37a h264: don't store intra pcm samples in h->mb.
Instead, keep them in the bitstream buffer until we read them verbatim,
this saves a memcpy() and a subsequent clearing of the target buffer.
decode_cabac+decode_mb for a sample file (CAPM3_Sony_D.jsv) goes from
6121.4 to 6095.5 cycles, i.e. 26 cycles faster.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 01:21:23 +01:00
Carl Eugen Hoyos
259603b917 h264: don't initialize missing pictures when using VDPAU.
This fixes an assertion failure when running mplayer -vc ffh264vdpau.

Reported by irc user ioni.
2013-02-17 22:33:40 +01:00
Michael Niedermayer
dece584a63 h264: avoid calling get_format() multiple times
Some applications do not like that.
Fixes VDA
Reduces noise for VDPAU

Tested-by: Guillaume POIRIER <poirierg@gmail.com>
Tested-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 22:26:33 +01:00
Luca Barbato
aa11cb7931 build: make audio_frame_queue a stand-alone component
Encoders requiring it have the dependency expressed in the
configure.
2013-02-17 22:05:18 +01:00
Carl Eugen Hoyos
cf36180143 Only set accelerated arm fft functions if fft is enabled.
Fixes lavc compilation (linking) for configurations without fft.

Reported-by: tyler wear
Tested-by: Gavin Kinsey
2013-02-17 17:29:55 +01:00
Michael Niedermayer
59e46ef63a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  error_resilience: add required headers.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 14:24:09 +01:00
Clément Bœsch
fe150a48a7 lavc: fix codec_descriptor and pkt_timebase doxy. 2013-02-17 13:35:32 +01:00
Clément Bœsch
b1e6b144ed lavc/utils: reindent in avcodec_decode_subtitle2() after f7963993. 2013-02-17 13:08:30 +01:00
Clément Bœsch
f796399344 lavc: support subtitles character encoding conversion. 2013-02-17 12:57:56 +01:00
Diego Biurrun
870a0c669e build: The libopencore-amrnb encoder depends on audio_frame_queue
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-17 12:03:25 +01:00
Diego Biurrun
8837f4396a libopencore-amrwb: Make AMR-WB ifdeffery more precise
The library might provide an encoder in the future, so it's better to
check for the presence of the decoder rather than just the library.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-17 12:03:25 +01:00
Diego Biurrun
e6bda9a9fd libopencore-amr: Conditionally compile decoder and encoder bits
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-17 12:03:25 +01:00
Diego Biurrun
56632fef65 libopencore-amrnb: cosmetics: Group all encoder-related code together
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-17 12:03:24 +01:00
Luca Barbato
0b70fb1d51 dsputil: convert remaining op_pixels_func
Convert to diffptr_t the line_size parameters still int.

Remove all the warnings in dsputil.c
2013-02-17 12:03:24 +01:00
Clément Bœsch
8732271e40 lavc: mark bitmap based subtitles codecs as such. 2013-02-17 11:59:24 +01:00
Michael Niedermayer
488f87be87 roqvideodec: check dimensions validity
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ae6104511)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fee26d352a)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-02-17 11:31:20 +01:00
Michael Niedermayer
f7d18deb73 vqavideo: check chunk sizes before reading chunks
Fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 13093f9767)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-02-17 11:31:20 +01:00
Michael Niedermayer
39bec05ed4 qdm2: check array index before use, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

(cherry picked from commit a7ee6281f7)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-02-17 11:31:20 +01:00
Anton Khirnov
1f8f43a5b5 error_resilience: add required headers. 2013-02-17 06:46:43 +01:00
James Almer
2e988fd689 lavc/tta: Use a safer check for encrypted streams
The user can provide a password even when the stream
is not encrypted, so check the value of s->format
instead of s->pass in ttafilter_init().

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 00:34:38 +01:00
Hendrik Leppkes
1d6f6ff4d9 h264: don't initialize missing pictures when using a hwaccel
Writing into uninitialized hw surfaces is not supported and triggers an assert inside avpriv_color_frame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 00:28:42 +01:00
Michael Niedermayer
b7fe35c9e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: deMpegEncContextize

Conflicts:
	libavcodec/dxva2_h264.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_mb_template.c
	libavcodec/h264_parser.c
	libavcodec/h264_ps.c
	libavcodec/h264_refs.c
	libavcodec/h264_sei.c
	libavcodec/svq3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 23:30:09 +01:00
Michael Niedermayer
ddbbfd95be Merge commit '1d0feb5d1ac04d187b335f0e8d411c9f40b3a885'
* commit '1d0feb5d1ac04d187b335f0e8d411c9f40b3a885':
  mpegvideo: split ff_draw_horiz_band().

Conflicts:
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 19:00:39 +01:00
Michael Niedermayer
1fad547cef Merge commit '54974c62982ae827becdbdb9b620b7ba75d079a0'
* commit '54974c62982ae827becdbdb9b620b7ba75d079a0':
  error_resilience: decouple ER from MpegEncContext

Conflicts:
	libavcodec/error_resilience.c
	libavcodec/h263dec.c
	libavcodec/h264.c
	libavcodec/mpegvideo.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 18:54:56 +01:00
Michael Niedermayer
8b7568cc34 Merge commit 'd9ebb00dcbaac3812b8b1fbc3d6e027506c11cbc'
* commit 'd9ebb00dcbaac3812b8b1fbc3d6e027506c11cbc':
  svq3: remove a pointless if()
  h264: remove a pointless if()

Conflicts:
	libavcodec/h264.c
	libavcodec/svq3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 14:30:21 +01:00
Michael Niedermayer
131b9c924d Merge commit '68f930d2188aba5b32624887dcbf688c23482834'
* commit '68f930d2188aba5b32624887dcbf688c23482834':
  h264: simplify calls to ff_er_add_slice().

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 14:13:20 +01:00
Michael Niedermayer
0a707da37b cinepack: print an error if cinepak_decode() failed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 13:49:04 +01:00
Michael Niedermayer
bb29ee62e9 Merge commit 'd2a25c4032ce6ceabb0f51b5c1e6ca865395a793'
* commit 'd2a25c4032ce6ceabb0f51b5c1e6ca865395a793':
  get_buffer(): do not initialize the data.

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 13:13:42 +01:00
Michael Niedermayer
1c5b8b916d h264: color frames gray
This prevents a regression from the removial of the buffer
initialization

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 13:13:18 +01:00
Michael Niedermayer
a53b144ec0 avcodec: add avpriv_color_frame()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 13:13:18 +01:00
Michael Niedermayer
1e78679768 mpegvideo_enc: draw edges on input
Improves Motion estimation, avoids using out of picture areas for %16 != 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-16 11:08:21 +01:00
Anton Khirnov
2c54155407 h264: deMpegEncContextize
Most of the changes are just trivial are just trivial replacements of
fields from MpegEncContext with equivalent fields in H264Context.
Everything in h264* other than h264.c are those trivial changes.

The nontrivial parts are:
1) extracting a simplified version of the frame management code from
   mpegvideo.c. We don't need last/next_picture anymore, since h264 uses
   its own more complex system already and those were set only to appease
   the mpegvideo parts.
2) some tables that need to be allocated/freed in appropriate places.
3) hwaccels -- mostly trivial replacements.
   for dxva, the draw_horiz_band() call is moved from
   ff_dxva2_common_end_frame() to per-codec end_frame() callbacks,
   because it's now different for h264 and MpegEncContext-based
   decoders.
4) svq3 -- it does not use h264 complex reference system, so I just
   added some very simplistic frame management instead and dropped the
   use of ff_h264_frame_start(). Because of this I also had to move some
   initialization code to svq3.

Additional fixes for chroma format and bit depth changes by
Janne Grunau <janne-libav@jannau.net>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-15 16:35:16 +01:00
Anton Khirnov
1d0feb5d1a mpegvideo: split ff_draw_horiz_band().
Split out dependency on MpegEncContext.
2013-02-15 16:10:19 +01:00