Commit Graph

13152 Commits

Author SHA1 Message Date
Philip Langdale
b33fa8a1cd CrystalHD decoder support v7
The Broadcom CrystalHD decoder chips provide hardware video
decoding for a number of video formats. It does so using a
memory:memory interface where a compressed bitstream is fed
in and decompressed pictures are copied out. As such, it works
independent of any graphics hardware in the system.

Features supported in this initial version:
* Support for Linux (using current drivers/library from git.wilsonet.com)
* Support for 70015 hardware
* Formats: MPEG2, MPEG4 Part 2, H.264, VC1 and DivX 3.11 (untested)
* Progressive content
* Non-H.264 Interlaced content
* H.264 MBAFF content

Features missing in this initial version:
* Support for OSX (might work - untested)
* Support for Windows
* Support for 70012 hardware
* H.264 PAFF content

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-10 20:17:19 +01:00
Justin Ruggles
cc4d3dd3e2 ac3enc: add SIMD-optimized shifting functions for use with the fixed-point AC3 encoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-08 19:49:05 +01:00
Justin Ruggles
7e0a284b9f ac3enc: shift coefficients to 24-bit following MDCT rather than using an exponent offset.
This makes channel coupling more accurate, increasing quality for stereo
content.  It also simplifies exponent extraction and mantissa quantization
by no longer needing to apply an offset to the exponents.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-08 19:44:36 +01:00
Justin Ruggles
67fc32ac61 ac3enc: use MUL64() to multiply fixed-point coefficients
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-08 19:42:23 +01:00
Nathan Caldwell
f56c4850e7 aacenc: Fix a segfault in search_for_quantizers
This reverts the removal of scoefs from AACEncContext.
It resulted in scoefs being a NULL pointer when
search_for_quantizers() is called.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-08 12:39:34 +01:00
Ronald S. Bultje
750fbbc249 reindent.
(cherry picked from commit 4e84f994d3)
2011-03-08 02:09:35 +01:00
Young Han Lee
5e06b02005 aacenc: remove the data arrays
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 2790d7a9ff)
2011-03-08 02:09:33 +01:00
Thadeu Lima de Souza Cascardo
08d804ab6a aac_latm_dec: use aac context and aac m4ac
When decoding latm config, use the corresponding aac context and its
m4ac instead of using NULL and a local variable. This fixes decoding of
audio in MPEG TS from SBTVD (the Brazillian Digital TV Sytem), when
there is no extradata. This is the case when using the decoder with
gst-ffmpeg and a GStreamer mpegts demuxer.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 36864ac354)
2011-03-08 02:09:32 +01:00
Justin Ruggles
e95f3363d8 ac3enc: add some assertions
(cherry picked from commit 2d9a101a1f)
2011-03-08 02:09:32 +01:00
Justin Ruggles
e8a0c465bc ac3enc: use av_assert2() instead of assert() to make debugging easier.
(cherry picked from commit 7100d63ca5)
2011-03-08 02:09:32 +01:00
Justin Ruggles
539244eeb6 cosmetics: rename ff_fmt_convert_init_ppc() to ff_fmt_convert_init_altivec().
It only has Altivec functions and is not compiled if Altivec is disabled.
(cherry picked from commit d21be5f15b)
2011-03-08 02:09:31 +01:00
Sean McGovern
e4a2695856 h264_mp3toannexb_bsg: don't crash, but warn, if PPS/SPS not found.
Should an AVC-1 in MP4 stream not contain SPS or PPS NAL units,
this BSF is then unable to allocate an output buffer for the
modified stream. Warn that the resulting stream may be unplayable.

Fix roundup issue #2386.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 02dd3666c2)
2011-03-08 02:09:16 +01:00
Justin Ruggles
5e79502493 ac3enc: add num_rematrixing_bands to AC3EncodeContext and use it instead of the hardcoded value.
Currently it is always 4, but this change will allow it to be adjusted when
bandwidth-related features are added such as channel coupling, enhanced
channel coupling, and spectral extension.
(cherry picked from commit 53e35fd340)
2011-03-05 02:29:34 +01:00
Justin Ruggles
12dffc4502 ac3: define AC3_MAX_CPL_BANDS and use it in ac3dec.h
(cherry picked from commit b35743ffb4)
2011-03-05 02:29:33 +01:00
Carl Eugen Hoyos
7f1b1f3d74 Fix compilation on powerpc with --disable-altivec. 2011-03-04 20:30:40 +01:00
Michael Niedermayer
ad82bf9ce0 Move guess_correct_pts() under got_picture_ptr. 2011-03-04 04:24:16 +01:00
Michael Niedermayer
3088635a44 h263dec: produce a warning when excessive bitstream is discarded
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-03 18:22:27 +01:00
Ronald S. Bultje
f28e599fbc vp3-mt: fix deadlock when first frame is not a keyframe.
(cherry picked from commit 8cf9a09d40)
2011-03-03 14:15:12 +01:00
Mans Rullgard
5cdef40a78 threads: allow thread count of zero
This moves setting the thread count to a minimum of 1 to
frame_thread_init(), allowing a value of zero to propagate
through to the codec if frame threading is not used.  This
makes auto-threads work in libx264.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit ff1efc524c)
2011-03-03 14:15:11 +01:00
Baptiste Coudurier
4778b4dd77 vc1: fix decoding when end sequence is present
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit fb98507126)
2011-03-03 14:15:11 +01:00
Baptiste Coudurier
176e176288 dnxhd: allow encoding with Avid Nitris compatibility.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 99bbc781e9)
2011-03-03 14:15:09 +01:00
Alexander Strange
e9e9139cee huffyuv: Add multithreading support
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76d8846c4e)
2011-03-03 14:15:02 +01:00
Alexander Strange
05fa64a7c5 pthreads: Fix bug introduced with thread_safe_callbacks
For intra codecs, ff_thread_finish_setup() is called before decoding starts
automatically. However, get_buffer can only be used before it's called, so
adding this requirement broke frame threading for them. Fixed by moving the
call until after get_buffer is finished.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ad9791e12b)
2011-03-03 14:15:02 +01:00
Michael Niedermayer
1b4580d1a2 Fix duplicate & droped frame in Californication.S02E01.HDTV.XviD-NoTV.avi 2011-03-03 03:37:44 +01:00
Mans Rullgard
e9634db1dc ARM: VP8: fix build on systems with global symbol prefix
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 0b32da90f8)
2011-02-28 00:34:39 +01:00
Mans Rullgard
cf9c227e58 ARM: fix vp8 neon with pic enabled
The assembler emits literal pools too far from the load instructions,
so we must do it explicitly at a suitable location.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 8b454c352f)
2011-02-28 00:34:38 +01:00
Peter Ross
c3afa4db91 bink: prevent overflows within binkidct by using int-sized intermediate array
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e211e255aa)
2011-02-26 03:16:09 +01:00
Peter Ross
4913af0cd3 Bink version 'b' audio decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ccfcddb3f2)
2011-02-26 03:16:09 +01:00
Peter Ross
8d09fc1930 binkaudio: simplify frame_len_bits and frame_len calculation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 8a8c283edd)
2011-02-26 03:16:06 +01:00
Peter Ross
408ee5a90c binkaudio: remove unnecessary loop
decode_init sets bands[0] == 2, so this loop always sets the band table
index (k) to zero.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a304def1dc)
2011-02-26 03:16:06 +01:00
Peter Ross
23d82139d2 binkaudio: perform band table scaling in decode_init
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 582ac86d19)
2011-02-26 03:16:06 +01:00
Mans Rullgard
22c679d3db bink: use LOCAL_ALIGNED for aligned stack data
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 8997bb8807)
2011-02-26 03:16:06 +01:00
Kyle
a63ba97384 dxva2: define required feature selection macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 04973f8082)
2011-02-26 03:16:06 +01:00
Anssi Hannula
853daff682 dca: use EXT_AUDIO_ID field to determine core extensions
This avoids the core substream extensions scan when the EXT_AUDIO_ID
field indicates no extensions or only unsupported extensions. The scan
is done only if the value of EXT_AUDIO_ID is unknown or indicates a
present XCh extension which we can decode.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 7e06e0ede3)
2011-02-26 03:16:04 +01:00
Justin Ruggles
1e898e7d35 vmdaudio: output 8-bit audio as AV_SAMPLE_FMT_U8.
There is no need to expand to 16-bits. Just use memcpy() to copy the raw data.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1108f8998c)
2011-02-26 03:16:04 +01:00
Justin Ruggles
f3618b014b vmdaudio: remove unnecessary fields from VmdAudioContext and use the corresponding AVCodecContext fields instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 2ec7862db8)
2011-02-26 03:16:04 +01:00
Justin Ruggles
5e7c422dda vmdaudio: add out_bps to VmdAudioContext and use it to replace hard-coded sample size.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1e86d685e0)
2011-02-26 03:16:03 +01:00
Justin Ruggles
504dff8e4e vmdaudio: simplify vmdaudio_decode_frame() by handling block_type first, then making a single call to vmdaudio_loadsound().
This also adds output buffer size checks for AUDIO and SILENCE block types.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1574eff3d2)
2011-02-26 03:16:03 +01:00
Justin Ruggles
83e94d50cb cosmetics: reindent after previous commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ba9516cca8)
2011-02-26 03:16:03 +01:00
Justin Ruggles
fb0e3c2b96 vmdaudio: move all silence chunk handling to vmdaudio_loadsound().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 762b386e4a)
2011-02-26 03:16:03 +01:00
Justin Ruggles
6f3c837f40 cosmetics: remove debugging cruft
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 8e9027d266)
2011-02-26 03:16:03 +01:00
Justin Ruggles
684512e16d cosmetics: reindent after previous commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 868f2f4d90)
2011-02-26 03:16:03 +01:00
Justin Ruggles
aa23625037 vmdaudio: simplify buffer pointer and header size handling.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 2d213695fc)
2011-02-26 03:16:03 +01:00
Justin Ruggles
b4b5e92286 vmdaudio: set *data_size to zero when skipping small packets and add a warning log message.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 7a4fb3fd93)
2011-02-26 03:16:03 +01:00
Justin Ruggles
ebed7b6865 vmdaudio: validate block type
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 22f893e1c9)
2011-02-26 03:16:02 +01:00
Justin Ruggles
149d36877a vmdaudio: use macros and a local variable for block type.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit dd1af5136f)
2011-02-26 03:16:02 +01:00
Justin Ruggles
2be17a71ae vmdaudio: correct the silent chunk count in the first block.
This fixes A/V sync with several samples, notably:
http://samples.mplayerhq.hu/game-formats/sierra-vmd/swat_*.vmd

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6989cb2dae)
2011-02-26 03:16:02 +01:00
Justin Ruggles
c11c79222e vmdaudio: output audio samples for standalone silent blocks.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 9b73f78600)
2011-02-26 03:16:02 +01:00
Justin Ruggles
2ac19b75c0 vmdaudio: remove duplicated code by merging mono and stereo decoding.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1328d43313)
2011-02-26 03:16:02 +01:00
Justin Ruggles
994e445a17 vmdaudio: fix raw_block_size calculation.
The size should depend on the output sample size, not the internal bit depth.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a58bcb40b1)
2011-02-26 03:15:59 +01:00