Commit Graph

315 Commits

Author SHA1 Message Date
Michael Niedermayer
28923f1923 Merge commit '28243b0d35b47bbf9abbd454fc444a6e0a9e7b71'
* commit '28243b0d35b47bbf9abbd454fc444a6e0a9e7b71':
  vc1dec: Redesign the intensity compensation

Conflicts:
	libavcodec/vc1.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-29 03:00:04 +02:00
Michael Niedermayer
28243b0d35 vc1dec: Redesign the intensity compensation
Use the intensity-compensated reference frame for subsequent
fields/B-frames.

Since we currently don't change the reference frame we have to
maintain lookup tables for intensity compensation in the following
dependent frames.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:55:55 +03:00
Michael Niedermayer
4390fa6273 Merge commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d'
* commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d':
  Remove commented-out #includes
  h263dec: Remove broken and disabled debug cruft
  vc1: Reindent INIT_LUT(), align backslashes

Conflicts:
	libavcodec/vc1.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 09:11:04 +02:00
Michael Niedermayer
e3c24f663e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Use linker hardening flags on mingw
  vc1: Make INIT_LUT() self contained
  vc1: Simplify code by using INIT_LUT()
  vc1: Move INIT_LUT() further up to allow using it in more places
  vc1dec: Remove some now unused variables
  vc1dec: Do not allow field_mode to change after the first header
  vc1, mss2: Check for any negative return value from ff_vc1_parse_frame_header
  vc1dec: Fix current ptr selection in vc1_mc_4mv_chroma()
  vc1dec: Factorize picture pointer selection in vc1_mc_4mv_chroma()
  vc1dec: Factorize picture pointer selection code
  vc1dec: Factorize srcU/V offseting
  vc1dec: Fix tff == 0 handling in init_block_index()
  vc1dec: Update destination pointers in context for fields

Conflicts:
	libavcodec/vc1.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 20:09:20 +02:00
Martin Storsjö
b0696e947f vc1: Reindent INIT_LUT(), align backslashes
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 20:59:24 +03:00
Michael Niedermayer
6ce2c3106d vc1: Make INIT_LUT() self contained
Move the local variables it uses into the macro, enclosing them
in a do {} while (0) scope.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 12:42:53 +03:00
Michael Niedermayer
37f2ac36a9 vc1: Simplify code by using INIT_LUT()
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 12:13:53 +03:00
Michael Niedermayer
0379fc1487 vc1: Move INIT_LUT() further up to allow using it in more places
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 12:13:53 +03:00
Michael Niedermayer
4162fc62b3 vc1dec: Do not allow field_mode to change after the first header
This fixes out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 12:13:53 +03:00
Michael Niedermayer
cb22692f05 Merge commit 'fe06795d783785a76c6cbcaa2cd3012e6deb5fa5'
* commit 'fe06795d783785a76c6cbcaa2cd3012e6deb5fa5':
  vc1: implement frame interlaced b-frame header parsing

Conflicts:
	libavcodec/vc1.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 09:57:28 +02:00
Hendrik Leppkes
fe06795d78 vc1: implement frame interlaced b-frame header parsing
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-14 13:24:55 +03:00
Michael Niedermayer
0aa095483d Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'
* commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487':
  avcodec: Add av_cold attributes to init functions missing them

Conflicts:
	libavcodec/aacpsy.c
	libavcodec/atrac3.c
	libavcodec/dvdsubdec.c
	libavcodec/ffv1.c
	libavcodec/ffv1enc.c
	libavcodec/h261enc.c
	libavcodec/h264_parser.c
	libavcodec/h264dsp.c
	libavcodec/h264pred.c
	libavcodec/libschroedingerenc.c
	libavcodec/libxvid_rc.c
	libavcodec/mpeg12.c
	libavcodec/mpeg12enc.c
	libavcodec/proresdsp.c
	libavcodec/rangecoder.c
	libavcodec/videodsp.c
	libavcodec/x86/proresdsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 11:34:29 +02:00
Diego Biurrun
6fee1b90ce avcodec: Add av_cold attributes to init functions missing them 2013-05-04 21:09:45 +02:00
Michael Niedermayer
d78329700d vc1dec: make sure next_use_ic is set correctly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 15:50:32 +02:00
Michael Niedermayer
ee4c01bef6 vc1dec: factor lut clean code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 15:39:32 +02:00
Michael Niedermayer
05f4c05061 vc1dec: remove interlaced warning
While not yet bugfree, the warning is IMHO no longer appropriate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 03:44:05 +02:00
Michael Niedermayer
782ebd6118 vc1dec: redesign the intensity compensation
The existing implementation had little to do with VC1.
This could be implemented by adjusting the reference frames
ithemselfs but that would make frame multi-threading difficult.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-24 21:07:26 +02:00
Michael Niedermayer
c560437e95 vc1: make INIT_LUT() self contained
factorize variable declarations

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-24 15:33:11 +02:00
Michael Niedermayer
62d9445396 vc1: simplify code use INIT_LUT()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-24 12:52:52 +02:00
Michael Niedermayer
a0fbc28c38 vc1dec: Fix non pullup tff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-20 02:22:32 +02:00
Michael Niedermayer
fa92ee821b Merge commit '63d744e2be39466e3a734c2987cd713e0bac101e'
* commit '63d744e2be39466e3a734c2987cd713e0bac101e':
  av_log_missing_feature() ---> avpriv_report_missing_feature()

Conflicts:
	libavcodec/aacdec.c
	libavcodec/tta.c
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-14 12:30:19 +01:00
Diego Biurrun
63d744e2be av_log_missing_feature() ---> avpriv_report_missing_feature() 2013-03-13 20:42:21 +01:00
Michael Niedermayer
a984efd104 Merge commit 'c242bbd8b6939507a1a6fb64101b0553d92d303f'
* commit 'c242bbd8b6939507a1a6fb64101b0553d92d303f':
  Remove unnecessary dsputil.h #includes

Conflicts:
	libavcodec/ffv1.c
	libavcodec/h261dec.c
	libavcodec/h261enc.c
	libavcodec/h264pred.c
	libavcodec/lpc.h
	libavcodec/mjpegdec.c
	libavcodec/rectangle.h
	libavcodec/x86/idct_sse2_xvid.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-26 13:05:10 +01:00
Diego Biurrun
c242bbd8b6 Remove unnecessary dsputil.h #includes 2013-02-26 00:51:34 +01:00
Michael Niedermayer
7845f8d282 vc1dec: do not allow field_mode to change after the first header
Fixes out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 04:58:46 +01: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
Michael Niedermayer
2a56e65c3b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vc1: Use codec ID from AVCodecContext while parsing frame header
  avplay: support mid-stream sample rate changes

Conflicts:
	ffplay.c
	libavcodec/vc1.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 17:09:13 +02:00
Mashiat Sarker Shakkhar
5d2be71b9e vc1: Use codec ID from AVCodecContext while parsing frame header
This fixes a segfault with samples that I have (both of them MPEG-TS). Looks like
avctx->codec is not being set during parsing.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-10-13 08:33:07 +02:00
Michael Niedermayer
526cb36e4b Merge commit '4436f25a1682ada3f7226cb6fadf429946933161'
* commit '4436f25a1682ada3f7226cb6fadf429946933161':
  build: remove references to unused EXTRAOBJS variable
  lavfi: convert input/ouput list compound literals to named objects
  fate: add h263 obmc vsynth tests
  avconv: remove bogus warning when using avconv -h without parameter
  averror: explicitly define AVERROR_* values
  flashsv: propagate inflateReset() errors
  indeo4/5: remove constant parameter num_bands from wavelet recomposition
  mxfdec: return error if no segments are available in mxf_get_sorted_table_segments
  Double motion vector range for HPEL interlaced picture in proper place

Conflicts:
	libavcodec/v210dec.h
	libavfilter/af_aformat.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_channelmap.c
	libavfilter/af_join.c
	libavfilter/asrc_anullsrc.c
	libavfilter/buffersrc.c
	libavfilter/f_setpts.c
	libavfilter/f_settb.c
	libavfilter/fifo.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fieldorder.c
	libavfilter/vf_fps.c
	libavfilter/vf_hflip.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_select.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_testsrc.c
	libavformat/mxfdec.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 15:46:48 +02:00
Mashiat Sarker Shakkhar
35a35d49d2 Double motion vector range for HPEL interlaced picture in proper place
The existing code is not in the right place and it should cover both
interlaced frame and field pictures.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-10-10 14:56:02 -04:00
Michael Niedermayer
31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Diego Biurrun
1218777ffd avcodec: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Diego Biurrun
6f6b0311a3 avcodec: Drop some silly commented-out av_log() invocations 2012-10-01 10:24:28 +02:00
Michael Niedermayer
ddabecbbf5 vc1dec: export adv profile color format indication
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-12 21:12:18 +02:00
Michael Niedermayer
c617bed34f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  MSS1 and MSS2: set final pixel format after common stuff has been initialised
  MSS2 decoder
  configure: handle --disable-asm before check_deps
  x86: Split inline and external assembly #ifdefs
  configure: x86: Separate inline from standalone assembler capabilities
  pktdumper: Use a custom define instead of PATH_MAX for buffers
  pktdumper: Use av_strlcpy instead of strncpy
  pktdumper: Use sizeof(variable) instead of the direct buffer length

Conflicts:
	Changelog
	configure
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/dct-test.c
	libavcodec/imgconvert.c
	libavcodec/mss12.c
	libavcodec/version.h
	libavfilter/x86/gradfun.c
	libswscale/x86/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 13:34:32 +02:00
Alberto Delmás
ee769c6a7c MSS2 decoder
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-08-31 07:37:16 +02:00
Michael Niedermayer
3b5ba60aa7 vc1dec: fix handling of max_coded dimensions
Fixes Ticket1502

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-31 03:00:35 +02:00
Michael Niedermayer
6d4c97bb85 fate: enable fate-vc1_sa10143
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-23 22:12:12 +02:00
Hendrik Leppkes
d9dcc940fa vc1: implement frame interlaced b-frame header parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-07 13:02:22 +02:00
Michael Niedermayer
20676711fe vc1: fix incorrect show_bits() usage.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 19:59:00 +02:00
Michael Niedermayer
6999f8bcf5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  make av_interleaved_write_frame() flush packets when pkt is NULL
  mpegts: Fix dead error checks
  vc1: Do not read from array if index is invalid.
  targa: convert to bytestream2.
  rv34: set mb_num_left to 0 after finishing a frame

Conflicts:
	libavcodec/targa.c
	libavcodec/vc1data.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-27 11:59:39 +02:00
Mashiat Sarker Shakkhar
95b192de5d vc1: Do not read from array if index is invalid.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-26 17:48:13 -07:00
Reimar Döffinger
0f95270afe VC1: Fix skiploopfilter=all.
It is currently only handled in the parser code for WMV/ASF style
header, but not the one used in the bytestream format used when
muxed into MPEG-TS as on e.g. BluRay.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-22 19:41:09 +01:00
Michael Niedermayer
bf807a5e87 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  sbrdsp.asm: convert all instructions to float/SSE ones.
  dv: cosmetics.
  dv: check buffer size before reading profile.
  Revert "AAC SBR: group some writes."
  udp: Print an error message if bind fails
  cook: extend channel uncoupling tables so the full bit range is covered.
  roqvideo: cosmetics.
  roqvideo: convert to bytestream2 API.
  dca: don't use av_clip_uintp2().
  wmall: fix build with -DDEBUG enabled.
  smc: port to bytestream2 API.
  AAC SBR: group some writes.
  dsputil: remove shift parameter from scalarproduct_int16
  SBR DSP: unroll sum_square
  rv34: remove dead code in intra availability check
  rv34: clean a bit availability checks.
  v4l2: update documentation
  tgq: convert to bytestream2 API.
  parser: remove forward declaration of MpegEncContext
  dca: prevent accessing static arrays with invalid indexes.
  ...

Conflicts:
	doc/indevs.texi
	libavcodec/Makefile
	libavcodec/dca.c
	libavcodec/dvdata.c
	libavcodec/eatgq.c
	libavcodec/mmvideo.c
	libavcodec/roqvideodec.c
	libavcodec/smc.c
	libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-08 02:51:45 +01:00
Diego Biurrun
3c715383ea vc1: Move init code shared between decoder and parser to common code file.
This fixes standalone compilation of the VC-1 parser.
2012-03-07 09:36:04 +01:00
Michael Niedermayer
6cb2085278 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  ppc: Add ff_ prefix to nonstatic symbols
  sh4: Add ff_ prefix to nonstatic symbols
  mpegvideo: Add ff_ prefix to nonstatic functions
  rtjpeg: Add ff_ prefix to nonstatic symbols
  rv: Add ff_ prefix to nonstatic symbols
  vp56: Add ff_ prefix to nonstatic symbols
  vorbis: Add ff_ prefix to nonstatic symbols
  msmpeg4: Add ff_ prefix to nonstatic symbols
  vc1: Add ff_ prefix to nonstatic symbols
  msmpeg4: Add ff_ prefixes to nonstatic symbols
  snow: Add ff_ prefix to nonstatic symbols
  mpeg12: Add ff_ prefix to nonstatic symbols
  mpeg4: Add ff_ prefixes to nonstatic symbols
  lagarith: Add ff_ prefix to lag_rac_init
  libavcodec: Add ff_ prefix to j_rev_dct*
  dsputil: Add ff_ prefix to inv_zigzag_direct16
  libavcodec: Prefix fdct_ifast, fdct_ifast248
  dsputil: Add ff_ prefix to the dsputil*_init* functions
  libavcodec: Add ff_ prefix to some nonstatic symbols
  vlc/rl: Add ff_ prefix to the nonstatic symbols
  ...

Conflicts:
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h263.h
	libavcodec/h263dec.c
	libavcodec/h264.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/nuv.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/proresdsp.c
	libavcodec/svq3.c
	libavcodec/version.h
	libavformat/dv.h
	libavformat/dvenc.c
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-16 01:34:37 +01:00
Martin Storsjö
5f2c159c0f vc1: Add ff_ prefix to nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:07:05 +02:00
Martin Storsjö
1fec055066 msmpeg4: Add ff_ prefixes to nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:07:01 +02:00
Michael Niedermayer
01fcbdf9ce Merge remote-tracking branch 'qatar/master'
* qatar/master:
  smacker: Sanity check huffman tables found in the headers.
  smacker: remove dead store
  qdm2: Check data block size for bytes to bits overflow.
  mxfdec: Fix files with essence containers larger than 2 GiB.
  mxfdec: Employ correct printf conversion specifiers for POSIX int types.
  vc1: always read the bfraction element for interlaced fields
  fate: add XWD image regression test
  lavf: prevent infinite loops while flushing in avformat_find_stream_info
  matroskadec: Pad AAC extradata.
  ismindex: Fix build on mingw

Conflicts:
	libavformat/mxfdec.c
	libavformat/utils.c
	tests/lavf-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-27 02:09:58 +01:00
Hendrik Leppkes
feaa40020b vc1: always read the bfraction element for interlaced fields
Previously, it would not be read if refdist_flag was not set, however
according to the spec and the reference decoder, it should always be read.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-26 15:19:27 +01:00