Commit Graph

13730 Commits

Author SHA1 Message Date
Michael Niedermayer
4defa68fe2 Merge remote branch 'qatar/master'
* qatar/master:
  ac3enc: ARM optimised ac3_compute_matissa_size
  ac3: armv6 optimised bit_alloc_calc_bap
  fate: simplify fft test rules
  avio: document avio_alloc_context.
  lavf: make compute_chapters_end less picky.
  sierravmd: fix Indeo3 videos
  FFT: simplify fft8()
  fate: add fixed-point fft/mdct tests
  Fixed-point support in fft-test
  ape: check that number of seektable entries is equal to number of frames

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 01:54:27 +02:00
Carl Eugen Hoyos
ecf94986c8 Fix compilation with --disable-vdpau 2011-04-02 00:50:39 +02:00
Carl Eugen Hoyos
2a0bd2bfc9 Make a plausibility check when setting channel layout for TrueHD.
TrueHD supports more channels than FFmpeg, so a valid sample
could set the channel layout to a value that represents less
channels than the sample actually consists of.
2011-04-02 00:48:43 +02:00
Mans Rullgard
aa05f2126e ac3enc: ARM optimised ac3_compute_matissa_size
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 22:46:21 +01:00
Mans Rullgard
182826c884 ac3: armv6 optimised bit_alloc_calc_bap
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 22:46:05 +01:00
Reimar Döffinger
7b9750ed9b Fix doxy-style for comment ("///>" should be "///<" instead). 2011-04-01 19:42:31 +02:00
Reimar Döffinger
9b7a0c5d88 Allow selecting VDPAU, XvMC via get_format for MPEG-2
To avoid further special-casing, dummy AVHWAccels are added
for VDPAU.
It should be possible to move VDPAU completely to AVHWAccel later.
2011-04-01 19:13:24 +02:00
Mans Rullgard
41327cca61 FFT: simplify fft8()
Part of the fft8() function corresponds to the BUTTERFLIES macro,
so use it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 17:50:59 +01:00
Mans Rullgard
6efe6028ed Fixed-point support in fft-test
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 15:16:06 +01:00
Peter Ross
f339f908a4 DPX image encoder 2011-04-01 23:10:26 +11:00
Michael Niedermayer
676d380f2a Fix undefined behavior in ffv1 with insane widths.
The new tables is large enough to prevent this together with our image size checks.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 12:49:52 +02:00
Michael Niedermayer
7ac167493e Merge remote-tracking branch 'newdev/master'
* newdev/master:
  mpegts: propagate avio EOF in read_packet()
  configure: Initial support for --target-os=symbian
  Fixed-point FFT and MDCT
  Include dependencies for test programs
  ac3enc: simplify sym_quant()
  flvdec: read index stored in the 'keyframes' tag.
  mov: Add support for zero-sized stsc runs.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 02:58:15 +02:00
Mans Rullgard
7087ce08c8 Fixed-point FFT and MDCT 2011-03-31 12:01:27 +01:00
Mans Rullgard
7f6e05cdfd ac3enc: simplify sym_quant()
These expressions are equivalent since levels is always odd, and
overflow is impossible due to the constraints set by the assert().

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-31 12:01:27 +01:00
Michael Niedermayer
1caa4123bd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  rtsp: Use GET_PARAMETER for keep-alive for generic RTSP servers
  mlp_parse.c: set AVCodecContext channel_layout
  APIChanges: mark the place where 0.6 was branched.
  avio: make get_checksum() internal.
  avio: move ff_crc04C11DB7_update() from avio.h -> avio_internal.h
  avio: make init_checksum() internal.
NOT MERGED  Add MxPEG decoder
NOT MERGED  Add support for picture_ptr field in MJpegDecodeContext
NOT MERGED  Move MJPEG's input buffer preprocessing in separate public function
NOT MERGED  Support reference picture defined by bitmask in MJPEG's SOS decoder
  sndio bug fix

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-31 12:48:41 +02:00
Baptiste Coudurier
d9699ea825 Fix dnxhd custom options, add AVClass in private context 2011-03-30 08:48:08 -07:00
John Stebbins
4b6f097b21 mlp_parse.c: set AVCodecContext channel_layout
The channel layout isn't getting set for mlp and truehd audio.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 17:41:48 +02:00
Gwenole Beauchesne
da3716021b vaapi: allow build against older VA-API 0.31. 2011-03-30 16:15:29 +02:00
Peter Ross
007b1f04d7 h264: permit h264 decoder to be compiled when svq3 decoder is disabled
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-30 16:33:25 +02:00
Maksym Veremeyenko
dd9134c22e Fix compilation with win32 threads.after 'unbreak avcodec_thread_init' 2011-03-30 12:36:52 +02:00
Reimar Döffinger
65daa942eb Fix buffer overflow checks to avoid integer overflows. 2011-03-30 09:15:52 +02:00
anatoly
ce02f9becf Add MxPEG decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
e0e3b8b297 Add support for picture_ptr field in MJpegDecodeContext
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
f16055eedf Move MJPEG's input buffer preprocessing in separate public function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
8f0bd2c07d Support reference picture defined by bitmask in MJPEG's SOS decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
Michael Niedermayer
445fdc0140 Merge remote-tracking branch 'newdev/master'
* newdev/master:
  ac3enc: move compute_mantissa_size() to ac3dsp
  ac3enc: move mant*_cnt and qmant*_ptr out of AC3EncodeContext
  Remove support for stripping executables
  ac3enc: NEON optimised float_to_fixed24
  ac3: move ff_ac3_bit_alloc_calc_bap to ac3dsp
  dfa: protect pointer range checks against overflows.
Duplicate:  mimic: implement multithreading.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-30 03:09:08 +02:00
Michael Niedermayer
55ce3c67bb Merge remote-tracking branch 'ffmpeg-mt/master'
* ffmpeg-mt/master:
  Update todo. More items appeared...
  Fix mdec
Duplicate:  id3v1: change filesize to int64_t.
Duplicate:  id3v1: Seek back to old position after reading.

Conflicts:
    libavcodec/mpegvideo.c
    libavcodec/snow.c
    libavformat/id3v1.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-30 02:58:38 +02:00
Mans Rullgard
52fd16a264 ac3enc: move compute_mantissa_size() to ac3dsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-30 01:21:56 +01:00
Mans Rullgard
6f718471ea ac3enc: move mant*_cnt and qmant*_ptr out of AC3EncodeContext
These fields are only used in quantize_mantissas() and reset
on each call, no need to store them in the main context.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-30 00:38:45 +01:00
Mans Rullgard
d782bca415 ac3enc: NEON optimised float_to_fixed24
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-29 19:40:13 +01:00
Mans Rullgard
6d9f52b2cd ac3: move ff_ac3_bit_alloc_calc_bap to ac3dsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-29 19:31:45 +01:00
Ronald S. Bultje
d38345878c dfa: protect pointer range checks against overflows. 2011-03-29 07:14:44 -07:00
Gwenole Beauchesne
621f4c98df vaapi: filter out DELAYED_PIC_REF flag to determine field.
This fixes ticket #23.
2011-03-29 09:55:07 +02:00
Gwenole Beauchesne
a18e7b4fb7 vaapi: cope with VA-API 0.32, i.e. fix VC-1 decoding on Sandy Bridge. 2011-03-29 09:39:30 +02:00
Alexander Strange
a75529e81e mimic: implement multithreading. 2011-03-28 21:50:46 -07:00
Michael Niedermayer
59bf303d68 Merge remote-tracking branch 'newdev/master'
* newdev/master:
  ac3enc: avoid memcpy() of exponents and baps in EXP_REUSE case by using exponent reference blocks.
  Chronomaster DFA decoder
DUPLICATE:  framebuffer device demuxer
NOT MERGED: cosmetics: fix dashed line length after 070c5d0
  http: header field names are case insensitive

Conflicts:
	LICENSE
	README
	doc/indevs.texi
	libavdevice/fbdev.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-29 02:46:11 +02:00
Michael Niedermayer
34c27ada10 Revert some silly renamings that leaked in from a pull. 2011-03-29 02:27:13 +02:00
Reimar Döffinger
e9ccdae09b Use consistent condition for whether to run slice-threading execute function. 2011-03-28 23:08:07 +02:00
Reimar Döffinger
46027c7286 Unbreak avcodec_thread_init
avcodec_thread_init currently doesn't do anything at all with pthreads enabled.
2011-03-28 23:07:52 +02:00
Justin Ruggles
c4549bd66a ac3enc: avoid memcpy() of exponents and baps in EXP_REUSE case by using
exponent reference blocks.
2011-03-28 14:46:17 -04:00
Kostya Shishkov
42315dabce Chronomaster DFA decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-28 16:55:03 +02:00
Michael Niedermayer
25d8099beb Merge remote-tracking branch 'newdev/master'
* newdev/master:
  ac3enc: Add codec-specific options for writing AC-3 metadata.
NOT MERGED:  Remove arrozcru URL from documentation
  sndio support for playback and record

Conflicts:
	doc/faq.texi
	doc/general.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-28 01:50:36 +02:00
Aurelien Jacobs
8e43b6fed9 add SubRip encoder
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
2011-03-28 00:16:44 +02:00
Justin Ruggles
991f3de1bb ac3enc: Add codec-specific options for writing AC-3 metadata. 2011-03-27 11:30:09 -04:00
Michael Niedermayer
3c8493074b Merge remote-tracking branch 'newdev/master'
* newdev/master:
  dsputil: allow to skip drawing of top/bottom edges.
  Split fate-psx-str-v3 into a video-only and audio-only test.

Conflicts:
	libavcodec/dsputil.c
	libavcodec/mpegvideo.c
	libavcodec/snow.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-27 01:40:18 +01:00
Michael Niedermayer
b0efaee6c1 make xvid less picky about unkown aspect
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-27 01:28:06 +01:00
Philip Langdale
3583eb9341 CrystalHD: Remove redundant interlaced check.
Signed-off-by: Philip Langdale <philipl@overt.org>
2011-03-26 16:09:48 -07:00
Philip Langdale
a1749eb3c3 CrystalHD: Add 2011 to Copyright
Signed-off-by: Philip Langdale <philipl@overt.org>
2011-03-26 16:09:48 -07:00
Philip Langdale
b45aceb64a Revert "CrystalHD: Improve interlaced h.264 support."
This reverts commit e44073ca5e.
2011-03-26 16:04:48 -07:00
Philip Langdale
85b010987f Revert "CrystalHD: Add heuristics to try and distinguish h.264 PAFF variants."
This reverts commit 4ab57cffba.
2011-03-26 16:04:43 -07:00
Philip Langdale
3188d33a11 Revert "CrystalHD: Refine heuristic logic."
This reverts commit f968ef922d.
2011-03-26 16:04:36 -07:00
Philip Langdale
f968ef922d CrystalHD: Refine heuristic logic. 2011-03-26 15:55:47 -07:00
Philip Langdale
4ab57cffba CrystalHD: Add heuristics to try and distinguish h.264 PAFF variants.
As previously discussed, the CrystalHD hardware treats some PAFF
clips different from others; even when input fields are always in
separate packets, the hardware might return a single fieldpair for
one clip and individual fields for another.

Given the bogus flags set by the hardware, it is impossible to
distinguish these two cases without knowing about the current
picture and the next one. The hardware can usually provide the
picture number of the next picture and when that is available,
we can detect the two cases.

When it is not available, we have to guess - and find out later
if we were right or wrong.

With this change, clips will play correctly unless they are PAFF
where individual fields are returned *and* no next picture number
is available. Generally speaking, the incorrect cases arise in
the first couple of seconds of a clip as the delay calibration takes
place. Once that's set, things work fine.
2011-03-26 15:55:47 -07:00
Philip Langdale
e44073ca5e CrystalHD: Improve interlaced h.264 support.
As previously discussed, the CrystalHD hardware returns exceptionally
useless information about interlaced h.264 content - to the extent
that it's not possible to distinguish MBAFF and PAFF content until
it's too late.

This change introduces use of the h264_parser to help bridge the
gap; it can indicate if the input data is PAFF fields or not.

With this clarity, some of heuristics can be removed from the code,
making this less convoluted.

Finally, I found an MBAFF clip that acts like non h.264 content so
I had to make allowances for that.

Note that I still cannot distinguish between two forms of PAFF,
where the hardware either returns individual fields or a field-pair.
It's not clear that there's even a spec relevant difference between
the two forms, as opposed to hardware ideosyncracies.
2011-03-26 15:55:47 -07:00
Alexander Strange
1500be13f2 dsputil: allow to skip drawing of top/bottom edges. 2011-03-26 17:45:38 -04:00
Reimar Döffinger
8361315469 DPX decode: add buffer size checks. 2011-03-26 13:46:20 +01:00
Peter Ross
7181627686 rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE 2011-03-26 13:24:43 +11:00
Michael Niedermayer
27ef7b1bcd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
  Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser and decoder, and vice-versa for the AC-3 encoder.
  Use audio_service_type to set stream disposition.
  Add APIchanges entry for audio_service_type.
  Add audio_service_type field to AVCodecContext for encoding and reporting of the service type in the audio bitstream.
  configure: in check_ld, place new -l flags before existing ones
  support @heading, @subheading, @subsubheading, and @subsubsection in texi2pod.pl
  doc: update build system documentation
  aacenc: indentation
  aacenc: fix the side calculation in search_for_ms
  vp8.c: rename EDGE_* to VP8_EDGE_*.

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h
	libavcodec/vp8.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-26 03:06:30 +01:00
Justin Ruggles
be18738801 Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser
and decoder, and vice-versa for the AC-3 encoder.
2011-03-25 16:59:00 -04:00
Justin Ruggles
34b47d7cbc Add audio_service_type field to AVCodecContext for encoding and reporting
of the service type in the audio bitstream.
2011-03-25 16:51:53 -04:00
Michael Niedermayer
ab8b73ff4e lavc: Bump micro for dvd subtitle cb/cr fix Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 2011-03-25 19:00:55 +01:00
Alexandre Colucci
5fd7bc25f1 Fix incorrect colors when decoding Blu-ray subtitles
On Blu-ray colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see System Description Blu-ray Disc Read-Only Format, 9.14.4.2.2.1 Palette Definition Segment

When decoding a Blu-ray subtitle, the colors were incorrectly set.
2011-03-25 19:00:55 +01:00
Alexandre Colucci
9743e909f1 Fix incorrect colors when decoding DVD subtitles
On DVD and HD-DVD colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see DVD Specifications for Read-Only Disc / Part 3, 4.3 Program Chain Information (7) PGC_SP_PLT
see DVD Specifications for High Definition Disc, 5.2 Navigation for Standard Content (11) PGC_SDSP_PLT
see DVD Specifications for High Definition Disc, 5.2 Navigation for Standard Content (12) PGC_HDSP_PLT
see DVD Specifications for High Definition Disc, 5.5 Presentation Data (4) SET_COLOR2

When decoding a DVD or HD-DVD subtitle, the colors were incorrectly set.
2011-03-25 19:00:54 +01:00
Young Han Lee
00f0b4b92e aacenc: indentation 2011-03-24 21:13:29 -07:00
Young Han Lee
92efa2bdd9 aacenc: fix the side calculation in search_for_ms 2011-03-24 21:12:23 -07:00
Michael Niedermayer
797ef671dd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  matroskadec: set default duration for simple block
  When building for MinGW32 disable strict ANSI compliancy.
  ARM: fix ff_apply_window_int16_neon() prototype
  configure: check for --as-needed support early
  ARM: NEON optimised apply_window_int16()
  ac3enc: NEON optimised shift functions
  ac3enc: NEON optimised ac3_max_msb_abs_int16 and ac3_exponent_min
  mpeg12.c: fix slice threading for mpeg2 field picture mode.
  ffmetadec.c: fix compiler warnings.
  configure: Don't explicitly disable ffplay or in/outdevices on dos
  configure: Remove the explicit disabling of ffserver
  configure: Add fork as a dependency to ffserver

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 02:57:41 +01:00
Michael Niedermayer
5d6c5dd36c Merge remote-tracking branch 'ffmpeg-mt/master'
* ffmpeg-mt/master:
      Update todo.
      Draw edges in MPV_frame_end when encoding

    Conflicts:
        libavcodec/mpegvideo.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 02:51:20 +01:00
Michael Niedermayer
3eb9e571dc Remove a tab, somehow it sneaked past the hooks in the merge war.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 02:51:20 +01:00
Alexander Strange
66f608a6aa vp8.c: rename EDGE_* to VP8_EDGE_*. 2011-03-24 21:48:18 -04:00
Michael Niedermayer
628724b61d More advanced ffmpeg mpeg2 aspect guessing code.
Fixes issue1613, 621, 562 simultaneously

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 01:45:47 +01:00
XV
eea4fa0591 Intel H.263 aspect ratio processing fix. 2011-03-25 01:16:22 +01:00
XV
b14748dd75 Fix Intel I.263 "Strict H.263 compliance" file playback / issue2449 2011-03-25 01:16:22 +01:00
Aurelien Jacobs
71af7377bf srtdec: make sure we don't write past the end of buffer
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
2011-03-25 01:02:53 +01:00
Mans Rullgard
d743065e18 ARM: fix ff_apply_window_int16_neon() prototype
The length argument should be unsigned.  No change in code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-24 20:43:47 +00:00
Mans Rullgard
2d3b21ffb9 ARM: NEON optimised apply_window_int16()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-24 19:24:03 +00:00
Mans Rullgard
245c78313f ac3enc: NEON optimised shift functions 2011-03-24 16:30:54 +00:00
Mans Rullgard
f4855a904e ac3enc: NEON optimised ac3_max_msb_abs_int16 and ac3_exponent_min 2011-03-24 16:30:49 +00:00
Ronald S. Bultje
f711424969 mpeg12.c: fix slice threading for mpeg2 field picture mode.
Fixes "make THREADS=2 fate-mpeg2-field-enc".
2011-03-24 12:16:22 -04:00
Tomas Härdin
0cd138340e Improve channel count and bitrate error handling in wmav* encode_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-24 15:00:28 +01:00
Michael Niedermayer
2fd41c9067 Merge remote-tracking branch 'newdev/master'
* newdev/master:
  avio: make udp_set_remote_url/get_local_port internal.
  asfdec: also subtract preroll when reading simple index object
  matroskaenc: remove a variable that's unused after bc17bd9.
  avio: cosmetics - nicer vertical alignment.
  Remove unnecessary icc version checks
  Disable 'attribute "foo" ignored' warnings from icc
  rtsp: Don't use a locale dependent format string
  Add xd55 codec tag for XDCAM HD422 720p25 CBR files.
  configure: get libavcodec version from new version.h header
  lavc: move the version macros to a new installed header.
  matroskaenc: simplify get_aac_sample_rates by using ff_mpeg4audio_get_config
  Do not use format string "%0.3f" for RTSP Range field.
  Add apply_window_int16() to DSPContext with x86-optimized versions and use it in the ac3_fixed encoder.
  Document usage of import libraries created by dlltool
  configure: Set the correct lib target for arm/wince dlltool
  fate: simplify regression-funcs.sh
  fate: add support for multithread testing

Conflicts:
	libavformat/rtspdec.c
	libavutil/attributes.h
	libavutil/internal.h
	libavutil/mem.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-24 02:16:11 +01:00
Anton Khirnov
3dd851c46b lavc: move the version macros to a new installed header.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-22 21:48:33 -04:00
Michael Niedermayer
4fa0e24736 Merge remote-tracking branch 'newdev/master'
* newdev/master: (33 commits)
  Fix an infinite loop when RoQ encoded generated a frame with a size greater than the maximum valid size.
  Add kbdwin.o to AC3 decoder
  Detect byte-swapped AC-3 and support decoding it directly.
  cosmetics: indentation
  Always copy input data for AC3 decoder.
  ac3enc: make sym_quant() branch-free
  cosmetics: indentation
  Add a CPU flag for the Atom processor.
  id3v2: skip broken tags with invalid size
  id3v2: don't explicitly skip padding
  Make sure kbhit() is in conio.h
  fate: update wmv8-drm reference
  vc1: make P-frame deblock filter bit-exact.
  configure: Add the -D parameter to the dlltool command
  amr: Set the AVFMT_GENERIC_INDEX flag
  amr: Set the pkt->pos field properly to the start of the packet
  amr: Set the codec->bit_rate field based on the last packet
  rtsp: Specify unicast for TCP interleaved streams, too
  Set the correct target for mingw64 dlltool
  applehttp: Change the variable for stream position in seconds into int64_t
  ...

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/ac3dec.c
	libavformat/avio.h
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-23 02:42:56 +01:00
Justin Ruggles
e6e9823488 Add apply_window_int16() to DSPContext with x86-optimized versions and use it
in the ac3_fixed encoder.
2011-03-22 21:08:30 -04:00
Vitor Sessak
ee26abf2a4 Fix an infinite loop when RoQ encoded generated a frame with a size greater than the maximum valid size.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-22 18:26:46 -04:00
Kieran Kunhya
a6d2227bc8 Add kbdwin.o to AC3 decoder
Fixes --disable-everything --enable-decoder=ac3

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-22 22:26:20 +00:00
Michael Niedermayer
d375c10400 Fake-Merge remote-tracking branch 'ffmpeg-mt/master' 2011-03-22 22:36:57 +01:00
Reimar Döffinger
4c886d613d Detect byte-swapped AC-3 and support decoding it directly.
This allows the AC-3 decoder to be used directly with RealMedia
decoders that unlike the libavformat one do not byte-swap automatically.
Since the new code is only used in case we would fail directly otherwise
there should be no risk for regressions.
2011-03-22 15:36:47 -04:00
Justin Ruggles
40728b5169 cosmetics: indentation 2011-03-22 15:36:47 -04:00
Justin Ruggles
67fc8652b9 Always copy input data for AC3 decoder.
Depending on error_recognition is not correct, low values do
certainly not mean it is ok to crash.

Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-03-22 15:36:47 -04:00
Justin Ruggles
85ab290470 ac3enc: make sym_quant() branch-free 2011-03-22 14:36:18 -04:00
Ronald S. Bultje
c47d383502 vc1: make P-frame deblock filter bit-exact. 2011-03-21 21:28:17 -04:00
Ronald S. Bultje
f44d6445b7 vc1: slice support.
Also reset coded_block at each new slice, fixes problems in slice playback.
2011-03-21 10:00:43 -04:00
Ronald S. Bultje
b81a935bd9 vc1: fix up memleaks in the error codepath.
Introduce end: and err: labels at the end of vc1_decode_frame(), which
will clean up allocated memory consistently.
2011-03-21 09:51:16 -04:00
Ronald S. Bultje
72452cc475 vc1: warn for unimplemented pan-scan feature. 2011-03-21 09:43:21 -04:00
Michael Niedermayer
d4a50a2100 Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-21 03:33:28 +01:00
Mans Rullgard
027f60f32b ffv1: allocate correct size for sample buffer
This fixes a typo in the size calculation for the sample buffer
introduced in cbabccc367.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 22:17:20 +00:00
Mans Rullgard
e87a6f0dc9 Move ff_dct_init_mmx declaration to dct.h
This was missed in 0aded94.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 21:12:00 +00:00
Mans Rullgard
8eec00278c dct: remove superflous #include
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 17:15:41 +00:00
Mans Rullgard
0aded9484d Move dct and rdft definitions to separate files
This leaves fft.h with only the core FFT and MDCT definitions
thus making it more managable.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 17:15:33 +00:00
Mans Rullgard
4538729afe Move sine windows to a separate file
These windows do not really belong in fft/mdct files and were
easily confused with the similarly named tables used by rdft.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-20 13:25:19 +00:00
Mans Rullgard
a45fbda994 Move ff_kbd_window_init() to a separate file
This function is not tightly coupled to mdct, and it's in the way
of making a fixed-point mdct implementation.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 19:49:27 +00:00
Mans Rullgard
26f548bb59 fft: remove inline wrappers for function pointers
This removes the rather pointless wrappers (one not even inline)
for calling the fft_calc and related function pointers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 19:49:18 +00:00
Mans Rullgard
42cfb3835b Remove Sonic experimental audio codec
Since initially committed in 2004, this codec has only been touched
for maintenanance.  Functionally, it contains no novel ideas and
its intended audience is better served by existing mature codecs.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 15:24:31 +00:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Reimar Döffinger
6820008a5c Fix compiler warnings due to missing casts. 2011-03-19 12:29:27 +01:00
Reimar Döffinger
c9f6eab184 Detect byte-swapped AC-3 (aka DNET) and support decoding it directly.
This allows the AC-3 decoder to be used directly with RealMedia
decoders that unlike the libavformat one do not byte-swap automatically.
Since the new code is only used in case we would fail directly otherwise
there should be no risk for regressions.
The "buf" pointer needs to be overwritten since otherwise the CRC check fails.
2011-03-19 12:07:14 +01:00
Michael Niedermayer
4eb41d16be Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-18 17:58:58 +01:00
Nathan Caldwell
350785a662 aacenc: 10l, missed a reference when refactoring the psymodel. 2011-03-17 21:01:08 -07:00
Justin Ruggles
0f999cfddb ac3enc: add float_to_fixed24() with x86-optimized versions to AC3DSPContext
and use in scale_coefficients() for the floating-point AC-3 encoder.
2011-03-17 16:46:48 -04:00
Michael Niedermayer
e528cdac8a Revert "replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION"
This reverts commit 29ba091136.
2011-03-17 17:26:45 +01:00
Michael Niedermayer
0cb88628fb Revert "use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*"
This reverts commit a03be6e1ba.
2011-03-17 17:26:45 +01:00
Michael Niedermayer
0fecf2642b Merge remote-tracking branch 'newdev/master'
Conflicts:
	Changelog
	doc/APIchanges
	doc/optimization.txt
	libavformat/avio.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 17:22:52 +01:00
Philip Langdale
969eb21ba2 CrystalHD: Use doxygen compatible comments where relevant.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 13:02:23 +01:00
Nathan Caldwell
4afedfd8e5 aacenc: cosmetics, indentation, and comment clarification
Correct bad indentation in aaccoder
Clarify and correct comments in 3GPP psymodel, other cosmetics.
2011-03-16 23:35:39 -04:00
Nathan Caldwell
b7c96769c5 aacenc: Refactor the parts of the AAC psymodel.
3GPP:
Remove ffac from and move min_snr out of AacPsyBand.
Rearrange AacPsyCoeffs to make it easier to implement energy spreading.
Rename the band[] array to bands[]
Copy energies and thresholds at the end of analysis.

LAME:
Use a loop instead of an if chain in LAME windowing.
2011-03-16 23:34:12 -04:00
Young Han Lee
f578854efc aaccoder: Change FFMAX for allzero flag to OR bit operation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 23:12:43 -04:00
Ramiro Polla
cbf5d22d24 Remove occurrences of my old email address
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-16 23:19:40 +00:00
Mans Rullgard
381d37fda9 dsputil: add bswap16_buf()
There are several places where a buffer is byte-swapped in 16-bit units.
This allows them to share code which can be optimised for various
architectures.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-16 23:19:40 +00:00
Janne Grunau
a03be6e1ba use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_* 2011-03-16 21:54:39 +01:00
Janne Grunau
29ba091136 replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION
also update the multiple inclusion guards in config.h|mak
2011-03-16 21:54:39 +01:00
Ramiro Polla
57149a92f8 Remove occurrences of my old email address.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-16 20:07:38 +01:00
Justin Ruggles
79414257e2 mathops: fix MULL() when the compiler does not inline the function.
If the function is not inlined, an immmediate cannot be used for the
shift parameter, so the %cl register must be used instead in that case.

This fixes compilation for x86-32 using gcc with --disable-optimizations.
2011-03-15 20:49:37 -04:00
Justin Ruggles
aaff3b312e mathops: change "g" constraint to "rm" in x86-32 version of MUL64().
The 1-arg imul instruction cannot take an immediate argument, only a register
or memory argument.
2011-03-15 13:43:47 -04:00
Justin Ruggles
b181b8fb96 mathops: convert MULL/MULH/MUL64 to inline functions rather than macros.
This fixes unexpected name collisions that were occurring with variables
declared within the macros.
It also fixes the fate-acodec-ac3_fixed regression test on x86-32.
2011-03-15 13:43:47 -04:00
Michael Niedermayer
6947b0c42e Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-15 16:48:42 +01:00
Michael Niedermayer
27293b840c Revert "ac3enc: shift coefficients to 24-bit following MDCT rather than using an exponent offset."
This reverts commit 7e0a284b9f.
revert at authors request due to better impementation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-15 15:12:17 +01:00
Michael Niedermayer
f7a5e7791d Revert "ac3enc: add SIMD-optimized shifting functions for use with the fixed-point AC3 encoder"
This reverts commit cc4d3dd3e2.
revert at authors request due to better impementation being available

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-15 15:11:22 +01:00
Philip Langdale
025225d7ee h264_mp4toannexb_bsf: Fix spurious warning when stream has SPS and PPS units.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 07:20:44 -04:00
Justin Ruggles
f1efbca5e9 ac3enc: add SIMD-optimized shifting functions for use with the fixed-point AC3 encoder. 2011-03-14 08:45:31 -04:00
Justin
323e6fead0 ac3enc: do not right-shift fixed-point coefficients in the final MDCT stage.
This increases the accuracy of coefficients, leading to improved quality.
Rescaling of the coefficients to full 25-bit accuracy is done rather than
offsetting the exponent values. This requires coefficient scaling to be done
before determining the rematrixing strategy. Also, the rematrixing strategy
calculation must use 64-bit math to prevent overflow due to the higher
precision coefficients.
2011-03-14 08:45:26 -04:00
Peter Ross
6e7cf13b6b mm decoder: move buffer allocation from decode_init() to decode_frame()
This permits playback in ffplay when libavfilter is enabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:07:29 -04:00
Peter Ross
0697440c1e Bitmap Brothers JV video decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:05:01 -04:00
Johan Andersson
21de920472 Update the url to the site website and change ffmpeg-devel to libav-devel
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-13 18:45:29 -04:00
Peter Ross
6e1f0d5edf mm decoder: move buffer allocation from decode_init() to decode_frame().
this permits playback in ffplay when libavfilter is enabled.
2011-03-13 16:24:12 +11:00
Jason Garrett-Glaser
81a131312d VP8: fix other function declaration
Was missed in 3efbe137.
2011-03-12 15:36:15 -08:00
Michael Niedermayer
27efa296c2 Merge branch 'master' of git://git.ffmpeg.org/ffmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-12 17:55:59 +01:00
Hendrik Leppkes
0215006ab7 VC1: Export profile/level
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-12 14:08:27 +00:00
Jason Garrett-Glaser
1eeca88691 VP8: optimize VP8Context struct ordering
Shaves at least 3KB off code size on x86, should improve cache utilization.
This would probably be useful to do for other decoders/encoders as well.
2011-03-12 03:43:42 -08:00
Jason Garrett-Glaser
3efbe13739 VP8: fix function declaration 2011-03-12 03:41:39 -08:00
Jason Garrett-Glaser
b1d2f812c9 VP8: token probs doesn't need padding
prob[0] is the only prob array ever accessed, so prob[1] can serve as padding
for prob[0].
2011-03-12 03:41:36 -08:00
Jason Garrett-Glaser
628b48db85 VP8: use a goto to break out of two loops
A break statement was supposed to break out of two loops, but only broke out of one.
Didn't affect output, just could have been marginally slower.
2011-03-12 03:41:33 -08:00
Mans Rullgard
a5444fee06 Add CONFIG_AC3DSP symbol to simplify makefiles
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-12 11:35:26 +00:00
Michael Niedermayer
3efbbbb509 Merge remote-tracking branch 'remotes/newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-11 15:00:52 +01:00
Michael Niedermayer
2800e8d62e Revert "ac3enc: use MUL64() to multiply fixed-point coefficients"
Author says, this is unneeded.

This reverts commit 67fc32ac61.
2011-03-11 14:56:20 +01:00
Peter Ross
2f46a0af8d Bitmap Brothers JV video decoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-11 12:25:47 +01:00
Benjamin Larsson
aecd0a4496 Export profiles from the mpeg2 video decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-10 18:05:35 -05:00
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
Nathan Caldwell
31ff9bd7b8 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: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-08 17:45:08 -05: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
Ronald S. Bultje
4e84f994d3 reindent. 2011-03-07 13:18:57 -05:00
Young Han Lee
2790d7a9ff aacenc: remove the data arrays
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Thadeu Lima de Souza Cascardo
36864ac354 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>
2011-03-07 12:25:36 -05:00
Justin Ruggles
2d9a101a1f ac3enc: add some assertions 2011-03-07 11:18:59 -05:00
Justin Ruggles
7100d63ca5 ac3enc: use av_assert2() instead of assert() to make debugging easier. 2011-03-07 11:18:51 -05:00
Justin Ruggles
d21be5f15b 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.
2011-03-07 11:15:29 -05:00
Carl Eugen Hoyos
159683ddec Fix compilation on powerpc with --disable-altivec. 2011-03-07 11:15:25 -05:00
Sean McGovern
02dd3666c2 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>
2011-03-07 10:19:46 -05: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
Justin Ruggles
53e35fd340 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.
2011-03-04 17:40:24 -05:00
Justin Ruggles
b35743ffb4 ac3: define AC3_MAX_CPL_BANDS and use it in ac3dec.h 2011-03-04 16:48:09 -05: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
Ronald S. Bultje
8cf9a09d40 vp3-mt: fix deadlock when first frame is not a keyframe. 2011-03-02 12:15:07 -05:00
Mans Rullgard
ff1efc524c 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>
2011-03-02 14:06:48 +00:00
Baptiste Coudurier
fb98507126 vc1: fix decoding when end sequence is present
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-02 13:32:58 +00:00
Baptiste Coudurier
99bbc781e9 dnxhd: allow encoding with Avid Nitris compatibility.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-01 23:55:55 +00:00
Alexander Strange
76d8846c4e huffyuv: Add multithreading support
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 11:39:25 -05:00
Alexander Strange
ad9791e12b 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>
2011-03-01 11:39:12 -05: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
Mans Rullgard
0b32da90f8 ARM: VP8: fix build on systems with global symbol prefix
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-27 13:53:26 +00:00
Mans Rullgard
8b454c352f 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>
2011-02-27 13:53:21 +00: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
Peter Ross
e211e255aa bink: prevent overflows within binkidct by using int-sized intermediate array
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross
ccfcddb3f2 Bink version 'b' audio decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross
8a8c283edd binkaudio: simplify frame_len_bits and frame_len calculation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross
a304def1dc 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>
2011-02-25 15:24:35 -05:00
Peter Ross
582ac86d19 binkaudio: perform band table scaling in decode_init
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Mans Rullgard
8997bb8807 bink: use LOCAL_ALIGNED for aligned stack data
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-25 19:50:14 +00:00
Kyle
04973f8082 dxva2: define required feature selection macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-25 19:48:20 +00:00
Carl Eugen Hoyos
dca85c842d Mark MS-MPEG4v1 encoder as experimental.
The encoder has never produced files that could be decoded
with any software.
2011-02-25 15:39:49 +01:00
Anssi Hannula
7e06e0ede3 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>
2011-02-24 21:22:37 +00:00
Justin Ruggles
1108f8998c 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>
2011-02-23 21:52:51 -05:00
Justin Ruggles
2ec7862db8 vmdaudio: remove unnecessary fields from VmdAudioContext and use the corresponding AVCodecContext fields instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:52:12 -05:00
Justin Ruggles
1e86d685e0 vmdaudio: add out_bps to VmdAudioContext and use it to replace hard-coded sample size.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:51:44 -05:00
Justin Ruggles
1574eff3d2 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>
2011-02-23 21:51:12 -05:00
Justin Ruggles
ba9516cca8 cosmetics: reindent after previous commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:59 -05:00
Justin Ruggles
762b386e4a vmdaudio: move all silence chunk handling to vmdaudio_loadsound().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:58 -05:00
Justin Ruggles
8e9027d266 cosmetics: remove debugging cruft
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:49:56 -05:00
Justin Ruggles
868f2f4d90 cosmetics: reindent after previous commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:48:04 -05:00
Justin Ruggles
2d213695fc vmdaudio: simplify buffer pointer and header size handling.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:12:39 -05:00
Justin Ruggles
7a4fb3fd93 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>
2011-02-23 21:11:36 -05:00
Justin Ruggles
22f893e1c9 vmdaudio: validate block type
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:10:12 -05:00
Justin Ruggles
dd1af5136f vmdaudio: use macros and a local variable for block type.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:08:31 -05:00
Justin Ruggles
6989cb2dae 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>
2011-02-23 21:06:33 -05:00
Justin Ruggles
9b73f78600 vmdaudio: output audio samples for standalone silent blocks.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:04:51 -05:00
Justin Ruggles
1328d43313 vmdaudio: remove duplicated code by merging mono and stereo decoding.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 21:02:19 -05:00
Justin Ruggles
a58bcb40b1 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>
2011-02-23 20:58:56 -05:00
Michael Niedermayer
8311150620 Make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame.
This allows the values to be used without changing C code and is closer to how
the other DEBUG flags work.
If this causes a problem for any user of this flag, please tell me and
ill split the flag in 2.
2011-02-23 23:42:35 +01:00
Young Han Lee
4f84e728da aacdec: Reduce the size of buf_mdct.
It was doubled in size for the LTP implementation. This brings it back
down to its original size.
(cherry picked from commit e22910b21a)
2011-02-22 02:44:39 +01:00
Mans Rullgard
644b66cd4a vp8: ppc: fix invalid reads in altivec epel mc
The 4-tap filters should only access one row/column before the
reference block.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e0e46cae37)
2011-02-22 02:44:39 +01:00
Mans Rullgard
e407f4173a ppc: fix vc1 inverse transform, unbreak build
GCC 4.3 and later are more particular about signedness matching
in vector operations.  The operations under if(rangered) were
missing assignments and thus had no effect.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 381efba0ec)
2011-02-22 02:44:39 +01:00
Ronald S. Bultje
e48fe14a54 targa: prevent integer overflow in bufsize check.
(cherry picked from commit 78e2380a6d)
2011-02-22 02:44:37 +01:00
Ronald S. Bultje
6a786b15c3 VC1: merge idct8x8, coeff adjustments and put_pixels.
Merging these functions allows merging some loops, which makes the
results (particularly after SIMD optimizations) much faster.
(cherry picked from commit f8bed30d8b)
2011-02-22 02:44:36 +01:00
Ronald S. Bultje
34bb0575c1 dsputil: make {add/put/put_signed}_pixels_clamped() non-static.
(cherry picked from commit 484a337cd7)
2011-02-22 02:44:36 +01:00
Ronald S. Bultje
713f490467 VC1: inline vc1_put_block() in vc1_decode_i_blocks().
Advantage is that it allows us to combine several loops into a single
one, and these can eventually be merged into the IDCT itself. Also, it
allows us to remove vc1_put_block(), and makes CODEC_FLAG_GRAY faster.
(cherry picked from commit bbfd2e7ab4)
2011-02-22 02:44:35 +01:00
Mans Rullgard
46382ae2ec amrnb: use correct size when copying lsf_r array
lsf_r is an array of int16_t, not float.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 1efa772e20)
2011-02-22 02:38:41 +01:00
Young Han Lee
e22910b21a aacdec: Reduce the size of buf_mdct.
It was doubled in size for the LTP implementation. This brings it back
down to its original size.
2011-02-21 16:35:22 -08:00