1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-21 00:35:05 +02:00
Commit Graph

21020 Commits

Author SHA1 Message Date
Hendrik Leppkes
79393a8363 Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 18:00:13 +02:00
Michael Niedermayer
d7cabb3c7e bgmc: check the correct pointers
Fixes CID90539, CID90538
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 15:33:44 +02:00
Michael Niedermayer
bf52ad1e49 lavc: revert broken hunk from 1cd9c81ddb
This should fix fate failures

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 13:59:53 +02:00
Michael Niedermayer
04c6ecb7da Merge commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed'
* commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed':
  fate-vc1: add dependencies
  ARM: fix overreads in neon h264 chroma mc
  rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
  gitignore: ignore files created by msvc
  fate: Add proper dependencies for the tests in video.mak
  configure: Disable Snow decoder and encoder by default
  lzo: Drop obsolete fast_memcpy reference
  build: Drop OBJS declaration for non-existing PCM_DVD encoder
  mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all

Conflicts:
	libavcodec/mpegvideo.c
	libavformat/rtsp.c
	tests/fate/microsoft.mak
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 12:37:52 +02:00
Stefano Sabatini
7bc533c41b lavc/utils: fix a few case/punctuation inconsistencies in avcodec_open2() 2012-10-20 12:06:20 +02:00
Stefano Sabatini
1cd9c81ddb lavc/utils: extend feedback provided by avcodec_open2() 2012-10-20 12:06:14 +02:00
Mans Rullgard
1846ddf0a7 ARM: fix overreads in neon h264 chroma mc
The loops were reading ahead one line, which could end up outside the
buffer for reference blocks at the edge of the picture.  Removing
this readahead has no measurable performance impact.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-20 01:28:38 +01:00
Hendrik Leppkes
953a3dcc4e Mark data symbols shared between libraries with av_export
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 01:56:50 +02:00
Hendrik Leppkes
33f2a49423 vc1: only disable interlaced b-frames for software decoding
Tested-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 00:07:43 +02:00
Hendrik Leppkes
b87ff34496 vc1: implement vc1 field interlaced dxva2 decoding
Tested-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 00:07:14 +02:00
Michael Niedermayer
0fa26bd470 utvideoenc: fix theoretical integer overflow
The image sizes needed for this overflow to happen are currently not
supported in lavc, thus this should have no effect execpt making the
code more robust in light of future changes.

Fixes CID732245
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 18:57:57 +02:00
Michael Niedermayer
d86ef54476 avcodec_align_dimensions2: add missing breaks
This should have just cosmetic effects

Fixes CID603265
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 18:50:09 +02:00
Ash Hughes
2470851f12 lavc: enable recursively using avcodec_open2/close.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 18:05:12 +02:00
Diego Biurrun
c896aa984e build: Drop OBJS declaration for non-existing PCM_DVD encoder 2012-10-19 17:04:41 +02:00
Michael Niedermayer
6bcdfe48d0 mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-19 15:42:35 +03:00
Michael Niedermayer
c5fd9d3c35 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: Add proper dependencies in qt.mak
  fate: Add proper dependencies in lossless-video.mak
  indeo3: do not try to output more lines than we can fit
  bmv: get a new frame on every decode_frame(), so we can use direct rendering

Conflicts:
	libavcodec/bmv.c
	tests/fate/lossless-video.mak
	tests/fate/qt.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 14:15:47 +02:00
Michael Niedermayer
81ff0c24ef Merge commit '1cd432e167b1a80853760c89a33606e2b5f229c2'
* commit '1cd432e167b1a80853760c89a33606e2b5f229c2':
  configure: fix libcdio check
  rtsp: Allow setting the reordering buffer size via an AVOption
  rtsp: Vertically align a constant definition
  rtp: Update the check for distinguishing between RTP and RTCP
  aac: fix build with hardcoded tables
  fate: dependencies for screen codec tests
  riff: Move functions around to be covered by appropriate #ifdefs

Conflicts:
	configure
	tests/fate/screen.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 13:58:14 +02:00
Michael Niedermayer
b0554fec04 Merge commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72'
* commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72':
  fate: add a dependency helper macro
  Add support for building shared libraries with MSVC
  avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab
  gxf: Add a local copy of the relevant parts of the frame rate table
  configure: Split out msvc as a separate target OS
  aviobuf: Remove a senseless ifdef in avio_seek

Conflicts:
	configure
	libavcodec/dirac.c
	libavcodec/mpeg12data.h
	libavcodec/mpeg12enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 13:29:24 +02:00
Kostya Shishkov
169514c440 indeo3: do not try to output more lines than we can fit
Internally chroma planes have multiple of four height while allocated image
planes might be smaller if CODEC_FLAG_EMU_EDGE is set. Thus we should not
output more lines of chroma than frame can accept.

Also the decoder can be safely switched to direct rendering now.
2012-10-19 07:58:51 +02:00
Kostya Shishkov
8774d58358 bmv: get a new frame on every decode_frame(), so we can use direct rendering 2012-10-19 07:58:51 +02:00
Michael Niedermayer
d50aa006fb tiffenc: fix integer overflow
Fixes CID700699
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 03:36:42 +02:00
Michael Niedermayer
a06f943f9d roqvideodec: replace dead code by assert
Fixes CID732195
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 03:15:06 +02:00
Michael Niedermayer
c0b17ea106 roqaudioenc: Fix crash with very small roq files
Fixes CID703669
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 02:57:57 +02:00
Paul B Mahol
4ebf305951 lavc/tta: do not overwrite bits_per_coded_sample
It is supposed to be set in libavformat only.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:02 +00:00
Paul B Mahol
445f36d7c8 kmvc: use meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:02 +00:00
Paul B Mahol
be536f084a xxan: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Paul B Mahol
0bf40e0ef4 lavc/yop: remove redudant YOP in av_log() messages
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Paul B Mahol
4c6c6a266e jvdec: use more meaningful error code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Paul B Mahol
527224830a idcinvideo: if decoding fails return error
Previously if frame decoding failed it would be
silently reported as valid frame.

The fate ref is updated because sample have
truncated last video packet.

While here return meaningful error codes.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Paul B Mahol
aadb7b3ac4 lavc/c93: use meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Michael Niedermayer
05b0337025 motionpixels/mp_decode_frame_helper: assert that the first pixel doesnt reuse the last.
reusing the last would use uninitialized data, this should be
impossible currently, but better to check by assert.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 01:20:27 +02:00
Michael Niedermayer
df727d408c mlp_parser: print error when ff_combine_frame() fails to add the current buffer
Fixes part of CID602338
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 00:05:03 +02:00
Clément Bœsch
e807a2b648 lavc: add raw text subtitles decoder. 2012-10-18 22:51:44 +02:00
Michael Niedermayer
c753b56b4d ff_convert_matrix: fix integer overflow
Fixes CID608053
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 21:51:04 +02:00
Michael Niedermayer
5537c92f84 mpegvideoenc: check return value of ff_MPV_frame_start()
Fixes CID703622
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 21:42:31 +02:00
Michael Niedermayer
2472f3facb lzwenc: change assert to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 21:42:04 +02:00
Michael Niedermayer
97d1cb5cd4 bmv: remove unreachable default case
Fixes CID732191
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 21:13:28 +02:00
Mans Rullgard
7a12d97eb1 aac: fix build with hardcoded tables
aac_tablegen.h includes aac.h for the POW_SF2_ZERO definition, but
this also pulls in a raft of other headers, some of which are not
safe to use in code built with the host compiler.

Moving POW_SF2_ZERO to aac_tablegen_decl.h, where the declaration
of the array it relates to already resides, fixes the problems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-18 19:59:43 +01:00
Michael Niedermayer
23b203014f indeo4: prevent printing uninitialized variable
Fixes CID703822
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 20:41:51 +02:00
Michael Niedermayer
2b1a2466c7 dv: change assert(a2 < 4) to av_assert()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 20:29:03 +02:00
Martin Storsjö
d66c52c2b3 Add support for building shared libraries with MSVC
This requires the makedef perl script by Derek, from the
c89-to-c99 repo. That scripts produces a .def file, listing
the symbols to be exported, based on the gcc version scripts
and the built object files.

To properly load non-function symbols from DLL files, the
data symbol declarations need to have the attribute
__declspec(dllimport) when building the calling code. (On mingw,
the linker can fix this up automatically, which is why it has not
been an issue so far. If this attribute is omitted, linking
actually succeeds, but reads from the table will not produce the
desired results at runtime.)

MSVC seems to manage to link DLLs (and run properly) even if
this attribute is present while building the library itself
(which normally isn't recommended) - other object files in the
same library manage to link to the symbol (with a small warning
at link time, like "warning LNK4049: locally defined symbol
_avpriv_mpa_bitrate_tab imported" - it doesn't seem to be possible
to squelch this warning), and the definition of the tables
themselves produce a warning that can be squelched ("warning C4273:
'avpriv_mpa_bitrate_tab' : inconsistent dll linkage, see previous
definition of 'avpriv_mpa_bitrate_tab').

In this setup, mingw isn't able to link object files that refer to
data symbols with __declspec(dllimport) without those symbols
actually being linked via a DLL (linking avcodec.dll ends up with
errors like "undefined reference to `__imp__avpriv_mpa_freq_tab'").
The dllimport declspec isn't needed at all in mingw, so we simply
choose not to declare it for other compilers than MSVC that requires
it. (If ICL support later requires it, the condition can be extended
later to include both of them.)

This also implies that code that is built to link to a certain
library as a DLL can't link to the same library as a static library.
Therefore, we only allow building either static or shared but not
both at the same time. (That is, static libraries as such can be,
and actually are, built - this is used for linking the test tools to
internal symbols in the libraries - but e.g. libavformat built to
link to libavcodec as a DLL cannot link statically to libavcodec.)

Also, linking to DLLs is slightly different from linking to shared
libraries on other platforms. DLLs use a thing called import
libraries, which is basically a stub library allowing the linker
to know which symbols exist in the DLL and what name the DLL will
have at runtime.

In mingw/gcc, the import library is usually named libfoo.dll.a,
which goes next to a static library named libfoo.a. This allows
gcc to pick the dynamic one, if available, from the normal -lfoo
switches, just as it does for libfoo.a vs libfoo.so on Unix. On
MSVC however, you need to literally specify the name of the import
library instead of the static library.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 14:26:15 +03:00
Martin Storsjö
eaa9b2e66c avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab
This table doesn't need to be shared with libavformat any longer.
Add mpeg12 to the name to make it less ambiguous, while renaming it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 14:26:14 +03:00
Michael Niedermayer
3777e6b3bf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mips64: mark hi/lo registers clobbered in MAC64/MLS64 macros
  fate: list lavfi tests in a makefile

Conflicts:
	configure
	tests/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 12:16:08 +02:00
Michael Niedermayer
17e4b0644b Merge commit '292d1e78743855404c7d07e3e7cb3f9c9ae6275b'
* commit '292d1e78743855404c7d07e3e7cb3f9c9ae6275b':
  fate: dependencies for acodec tests
  fate: dependencies for vsynth tests
  fate: add macros useful for conditionally enabling things
  libmp3lame: resize the output buffer if needed

Conflicts:
	tests/fate/acodec.mak
	tests/fate/vcodec.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 10:48:00 +02:00
Mans Rullgard
b93e934aee mips64: mark hi/lo registers clobbered in MAC64/MLS64 macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-17 22:37:12 +01:00
Michael Niedermayer
d185c8a79b tiff: run strlen() after setting the pointer
Fixes CID733803
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 20:58:08 +02:00
Paul B Mahol
9b762e2cba idcinvideo: remove redundant " id CIN Video: " from av_log()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-17 14:09:47 +00:00
Justin Ruggles
abd8b9e7e0 libmp3lame: resize the output buffer if needed
The LAME API documentation for the required buffer size refers to the size for
a single encode call. However, we store multiple frames in the same output
buffer but only read 1 frame at a time out of it. As a result, the buffer size
given in lame_encode_buffer() is actually smaller than what it should be.
Since we do not know how many frames it will end up buffering, it is best to
just reallocate if needed.
2012-10-17 09:59:13 -04:00
Michael Niedermayer
d6e87190fd Merge commit 'a25d912dca9cd553440167e0476c47581359c0fc'
* commit 'a25d912dca9cd553440167e0476c47581359c0fc':
  avcodec_encode_audio(): fix invalid free
  pcm-mpeg: correct bitrate calculation
  ffv1: K&R formatting cosmetics
  fate: Add rangecoder test
  network: #include stdint.h in network.h
  nut: export codec_tag provided by rawvideo
  avserver: move avserver-specific code from ffmdec.c to avserver.c

Conflicts:
	ffserver.c
	libavcodec/ffv1.c
	libavformat/ffmdec.c
	libavformat/nutenc.c
	tests/ref/lavfi/crop
	tests/ref/lavfi/crop_scale
	tests/ref/lavfi/crop_scale_vflip
	tests/ref/lavfi/crop_vflip
	tests/ref/lavfi/null
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_crop
	tests/ref/lavfi/pixfmts_hflip
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_pad
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip
	tests/ref/lavfi/scale200
	tests/ref/lavfi/scale500
	tests/ref/lavfi/vflip
	tests/ref/lavfi/vflip_crop
	tests/ref/lavfi/vflip_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 14:17:55 +02:00
Paul B Mahol
1ade37ae9c lavc/tta: use meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-17 12:11:34 +00:00