Commit Graph

365 Commits

Author SHA1 Message Date
Michael Niedermayer
59a53842d3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: operate with pointers to AVFrames instead of whole structs

Conflicts:
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/intrax8.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/mpegvideo_xvmc.c
	libavcodec/msmpeg4.c
	libavcodec/ratecontrol.c
	libavcodec/vaapi.c
	libavcodec/vc1dec.c
	libavcodec/vdpau_vc1.c

See: fc567ac49e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 15:18:46 +02:00
wm4
f6774f905f mpegvideo: operate with pointers to AVFrames instead of whole structs
The most interesting parts are initialization in ff_MPV_common_init() and
uninitialization in ff_MPV_common_end().

ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL
checks for Picture.f, because these functions can be called on
uninitialized or partially initialized Pictures.

NULL pointer checks are added to ff_thread_release_buffer() stub function.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-09 02:12:19 +02:00
Michael Niedermayer
e92a78a409 avcodec/mpegvideo: make mc_mb_var_sum / mb_var_sum 64bit
This avoids a hypothetical integer overflow with very high resolution video

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-21 18:24:56 +01:00
Michael Niedermayer
9517900bef Merge commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b'
* commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b':
  mpegvideo: move mpegvideo formats-related defines to mpegutils.h

Conflicts:
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_mvpred.h
	libavcodec/svq1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-17 12:36:48 +01:00
Vittorio Giovara
e0c16e4e32 mpegvideo: move mpegvideo formats-related defines to mpegutils.h 2014-03-16 23:04:41 +01:00
Michael Niedermayer
06a3185e38 avcodec/mpegvideo_enc: dont use direct mode for unaligned input
Fixes Ticket3456

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 14:56:42 +01:00
Michael Niedermayer
6016b8329b Merge commit '05563ccacc98fd185affdbf8cbaf094caf36b852'
* commit '05563ccacc98fd185affdbf8cbaf094caf36b852':
  dsputil: cosmetics: Lose camelCase on ff_cropTbl and ff_squareTbl names

Conflicts:
	libavcodec/bit_depth_template.c
	libavcodec/motionpixels_tablegen.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-14 00:39:51 +01:00
Diego Biurrun
05563ccacc dsputil: cosmetics: Lose camelCase on ff_cropTbl and ff_squareTbl names
Also switch from "tbl" to "tab" name suffixes.
2014-03-13 08:12:44 -07:00
Diego Biurrun
9103185bd1 dsputil: Drop ff_check_alignment() function
The function is supposed to confirm that the compiler provided enough
alignment, but in practice it is only run in certain code paths and
insufficient alignment problems are restricted to legacy compilers.
2014-03-13 05:50:28 -07:00
Michael Niedermayer
cbcfd7da4d avcodec: support setting the chroma intra matrix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-18 18:19:27 +01:00
Lukasz Marek
3f47e24cbe lavc/mpegvideo: add missing const
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 02:55:51 +01:00
Michael Niedermayer
965fa6b0d9 Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec'
* commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec':
  avutil: remove timer.h include from internal.h

Conflicts:
	libavcodec/ffv1dec.c
	libavutil/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 01:54:55 +01:00
Janne Grunau
fb0c9d41d6 avutil: remove timer.h include from internal.h
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
2014-01-25 21:50:20 +01:00
Michael Niedermayer
0269b30fef Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo_enc: Don't call ff_h263dsp_init unconditionally

Conflicts:
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-22 23:36:33 +01:00
Martin Storsjö
cff480e49d mpegvideo_enc: Don't call ff_h263dsp_init unconditionally
This fixes builds with e.g. --disable-decoders --disable-encoders
--enable-encoder=mjpeg.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-22 18:42:38 +02:00
Michael Niedermayer
d08dd32863 avcodec/mpegvideo_enc: disable direct mode in load_input_picture() for dimensions%16 != 0
We currently read a whole 16x16 block from the input at a few places

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 17:04:57 +01:00
Michael Niedermayer
0117ba5594 avcodec/mpegvideo_enc: fix custom matrixes with jpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-18 06:33:45 +01:00
Michael Niedermayer
3ca7085ae2 avcodec: make "bitrate tolerance too small for bitrate" error more verbose
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 03:10:42 +01:00
Michael Niedermayer
b8ff951ce0 avcodec/mpegvideo_enc: init chroma matrix for mjpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-11 21:38:11 +01:00
Michael Niedermayer
859d74040e avcodec/mjpegenc: pass chroma quantization matrix through as well, not just luma
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-11 21:26:51 +01:00
Michael Niedermayer
2830f287e2 Merge commit 'ebfe622bb1ca57cecb932e42926745cba7161913'
* commit 'ebfe622bb1ca57cecb932e42926745cba7161913':
  mpegvideo: drop support for real (non-emulated) edges

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_motion.c
	libavcodec/wmv2.c

If this is slower on a major platform then it should be investigated
and potentially reverted.

See: 8fc52a5ef9
See: 3969b4b861
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 14:19:24 +01:00
Anton Khirnov
ebfe622bb1 mpegvideo: drop support for real (non-emulated) edges
Several decoders disable those anyway and they are not measurably faster
on x86. They might be somewhat faster on other platforms due to missing
emu edge SIMD, but the gain is not large enough (and those decoders
relevant enough) to justify the added complexity.
2014-01-09 09:41:19 +01:00
Michael Niedermayer
fb17f03dad Merge commit 'aec25b1c4650944d32706bfd40eb02bbd5587303'
* commit 'aec25b1c4650944d32706bfd40eb02bbd5587303':
  mpegvideo: split the encoding-only parts of frame_start() into a separate function

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 02:56:29 +01:00
Anton Khirnov
aec25b1c46 mpegvideo: split the encoding-only parts of frame_start() into a separate function
This introduces some code duplication. However, much of it should go
away once the decoders stop using MpegEncContext.
2014-01-03 16:52:49 +01:00
Michael Niedermayer
46b06bd894 avcodec/mpegvideo_enc: implement frame skip score normalization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 02:46:39 +01:00
Michael Niedermayer
34fe125f4b avcodec/mpegvideo_enc: fix frame skipping with intra only codecs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 15:04:40 +01:00
Michael Niedermayer
241eccd628 avcodec/mpegvideo_enc: fix integer overflow with -skip_exp >= 2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 14:10:34 +01:00
Michael Niedermayer
535af2c222 avcodec/mpegvideo_enc/frame_end(): remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 14:19:33 +01:00
Michael Niedermayer
93947d88f2 Merge commit '24abd806ea0cfb0d988d2f0044eac79cff12918c'
* commit '24abd806ea0cfb0d988d2f0044eac79cff12918c':
  ljpegenc: deMpegEncContextize

Conflicts:
	libavcodec/ljpegenc.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	tests/ref/vsynth/vsynth1-ljpeg
	tests/ref/vsynth/vsynth2-ljpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 13:30:23 +01:00
Michael Niedermayer
b342ea603f Merge commit '3360ad995530ea6967b1e83981b4aa8240fbb0ed'
* commit '3360ad995530ea6967b1e83981b4aa8240fbb0ed':
  mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_trailer()

Conflicts:
	libavcodec/ljpegenc.c
	libavcodec/mjpegenc.c
	libavcodec/mjpegenc.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 11:33:07 +01:00
Michael Niedermayer
d8fb209a7f Merge commit '058d5f2feb730846f22c1812e433f92f670ad751'
* commit '058d5f2feb730846f22c1812e433f92f670ad751':
  mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_header()

Conflicts:
	libavcodec/mjpegenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 11:16:05 +01:00
Michael Niedermayer
08667c2678 Merge commit '0b0a7a751de02464a33717e70352f696372ba1c4'
* commit '0b0a7a751de02464a33717e70352f696372ba1c4':
  mpegvideo: move encode-only parts of common_end() to encode_end()

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 03:12:10 +01:00
Michael Niedermayer
b6e7834ac6 avcodec/mpegvideo_enc: fix linesizes in frame_end()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 02:53:10 +01:00
Michael Niedermayer
26c2e3bf1a Merge commit '381a722562bcc0b623acf6a00a583fe989bcb72a'
* commit '381a722562bcc0b623acf6a00a583fe989bcb72a':
  mpegvideo: split the encoding-only parts of ff_MPV_frame_end() into a separate function

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 02:48:09 +01:00
Michael Niedermayer
20b28fc7b0 Merge commit '1f8eb69079880ef1f394c498dfdf471f91222a06'
* commit '1f8eb69079880ef1f394c498dfdf471f91222a06':
  mpegvideo: move encoding-only initialization from common_init() to encode_init()

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 02:12:59 +01:00
Michael Niedermayer
2951b7fb1d Merge commit 'bedf952bb80ae26427854dcde56c139ecb87d4a0'
* commit 'bedf952bb80ae26427854dcde56c139ecb87d4a0':
  mpegvideo: move setting encoding-only vars from common_defaults() to encode_defaults()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 01:58:55 +01:00
Anton Khirnov
24abd806ea ljpegenc: deMpegEncContextize
The encoder uses almost none of the mpegvideo infrastructure, only some
fields from MpegEncContext.

The FATE results change because now an all-zero quant matrix is written
into the file. Since it is not used for anything for ljpeg, this should
not be a problem.
2013-12-05 13:35:55 +01:00
Anton Khirnov
3360ad9955 mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_trailer()
This will allow deMpegEncContextizing the LJPEG encoder.
2013-12-05 13:35:15 +01:00
Anton Khirnov
058d5f2feb mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_header()
This will allow deMpegEncContextizing the LJPEG encoder.
2013-12-05 13:34:26 +01:00
Anton Khirnov
0b0a7a751d mpegvideo: move encode-only parts of common_end() to encode_end() 2013-12-05 13:25:26 +01:00
Anton Khirnov
381a722562 mpegvideo: split the encoding-only parts of ff_MPV_frame_end() into a separate function 2013-12-05 13:23:55 +01:00
Anton Khirnov
1f8eb69079 mpegvideo: move encoding-only initialization from common_init() to encode_init() 2013-12-05 13:23:03 +01:00
Anton Khirnov
bedf952bb8 mpegvideo: move setting encoding-only vars from common_defaults() to encode_defaults() 2013-12-05 13:22:55 +01:00
Michael Niedermayer
ccdfa3e271 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add missing #includes for *INT64_MAX and *INT64_C

Conflicts:
	ffmpeg.c
	ffmpeg_filter.c
	ffplay.c
	libavformat/assdec.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-24 05:21:19 +01:00
Diego Biurrun
8f8bc92365 Add missing #includes for *INT64_MAX and *INT64_C 2013-11-23 21:55:52 +01:00
Michael Niedermayer
331a90cec4 avcodec/h261: trellis quantization support
Fixes ticket3143

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-17 15:08:56 +01:00
Michael Niedermayer
be1e6e7503 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo_enc: use the AVFrame API properly.
  ffv1: use the AVFrame API properly.
  jpegls: use the AVFrame API properly.
  huffyuv: use the AVFrame API properly.

Conflicts:
	libavcodec/ffv1.c
	libavcodec/ffv1.h
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c

Changes to ffv1 are more redone than merged due to them being based on
an ancient codebase and a good part of that having being done already
as well.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-17 13:55:50 +01:00
Anton Khirnov
1c01b0253e mpegvideo_enc: use the AVFrame API properly. 2013-11-16 17:51:10 +01:00
Michael Niedermayer
91e00c4a78 Merge commit '458446acfa1441d283dacf9e6e545beb083b8bb0'
* commit '458446acfa1441d283dacf9e6e545beb083b8bb0':
  lavc: Edge emulation with dst/src linesize

Conflicts:
	libavcodec/cavs.c
	libavcodec/h264.c
	libavcodec/hevc.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/rv34.c
	libavcodec/svq3.c
	libavcodec/vc1dec.c
	libavcodec/videodsp.h
	libavcodec/videodsp_template.c
	libavcodec/vp3.c
	libavcodec/vp8.c
	libavcodec/wmv2.c
	libavcodec/x86/videodsp.asm
	libavcodec/x86/videodsp_init.c

Changes to the asm are not merged, they are left for volunteers or
in their absence for later.
The changes this merge introduces are reordering of the function
arguments

See: face578d56
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-15 15:07:10 +01:00
Ronald S. Bultje
458446acfa lavc: Edge emulation with dst/src linesize
Allow supporting files for which the image stride is smaller than
the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9
file or a 16x16 VP8 file with -fflags +emu_edge.
2013-11-15 10:16:27 +01:00