Commit Graph

11 Commits

Author SHA1 Message Date
Nekopanda f4d5d7e8de avcodec/mpeg2dec: Fix motion vector rounding for chroma components
In 16x8 motion compensation, for lower 16x8 region, the input to mpeg_motion() for motion_y was "motion_y + 16", which causes wrong rounding. For 4:2:0, chroma scaling for y is dividing by two and rounding toward zero. When motion_y < 0 and motion_y + 16 > 0, the rounding direction of "motion_y" and "motion_y + 16" is different and rounding "motion_y + 16" would be incorrect.

We should input "motion_y" as is to round correctly. I add "is_16x8" flag to do that.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 12:04:47 +01:00
James Almer 33aa8a6221 avformat/framecrc: enable new output
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-04-13 11:37:14 -03:00
Michael Niedermayer 06ad309ab4 Merge commit '813b82b927b19532e3bc3397b972c8a27b9f6326'
* commit '813b82b927b19532e3bc3397b972c8a27b9f6326':
  configure: Fix silly typo in logging command of check_struct()
  fate: remove last incomplete frame from mpeg2-field-enc test

Conflicts:
	tests/fate/video.mak
	tests/ref/fate/mpeg2-field-enc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-05 12:11:48 +01:00
Janne Grunau 15ea1ac695 fate: remove last incomplete frame from mpeg2-field-enc test 2013-03-04 11:22:21 +01:00
Michael Niedermayer 3b46daa31f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dsputil: remove debug message in dsputil_init().
  movdec: Avoid av_malloc(0) in stss
  build: Drop YASM-OBJS-FFT from SUBDIR_VARS.
  build: Drop unused X86-OBJS variable.
  avconv: remove debugging cruft from do_video_out().
  avconv: factorize setting stream_index for the output packet.
  frame{crc/md5}: set the stream timebase from codec timebase.
  apedec: remove unneeded #include of get_bits.h and associated macro
  apedec: av_fast_malloc() instead of av_realloc()
  apedec: fix handling of packet sizes that are not a multiple of 4 bytes

Conflicts:
	libavcodec/apedec.c
	tests/ref/fate/4xm-1
	tests/ref/fate/4xm-2
	tests/ref/fate/aasc
	tests/ref/fate/armovie-escape124
	tests/ref/fate/bethsoft-vid
	tests/ref/fate/cljr
	tests/ref/fate/creatureshock-avs
	tests/ref/fate/cscd
	tests/ref/fate/cvid-partial
	tests/ref/fate/deluxepaint-anm
	tests/ref/fate/dfa1
	tests/ref/fate/dfa10
	tests/ref/fate/dfa11
	tests/ref/fate/dfa2
	tests/ref/fate/dfa3
	tests/ref/fate/dfa4
	tests/ref/fate/dfa5
	tests/ref/fate/dfa6
	tests/ref/fate/dfa7
	tests/ref/fate/dfa8
	tests/ref/fate/dfa9
	tests/ref/fate/film-cvid-pcm-stereo-8bit
	tests/ref/fate/flic-af11-palette-change
	tests/ref/fate/flic-magiccarpet
	tests/ref/fate/fraps-v2
	tests/ref/fate/fraps-v3
	tests/ref/fate/h264-lossless
	tests/ref/fate/interplay-mve-16bit
	tests/ref/fate/interplay-mve-8bit
	tests/ref/fate/mimic
	tests/ref/fate/motionpixels
	tests/ref/fate/mpeg2-field-enc
	tests/ref/fate/msvideo1-16bit
	tests/ref/fate/mtv
	tests/ref/fate/nuv
	tests/ref/fate/pictor
	tests/ref/fate/prores-alpha
	tests/ref/fate/ptx
	tests/ref/fate/qtrle-16bit
	tests/ref/fate/qtrle-1bit
	tests/ref/fate/quickdraw
	tests/ref/fate/rpza
	tests/ref/fate/sierra-vmd
	tests/ref/fate/targa-conformance-CCM8
	tests/ref/fate/targa-conformance-UCM8
	tests/ref/fate/tiertex-seq
	tests/ref/fate/truemotion1-15
	tests/ref/fate/truemotion1-24
	tests/ref/fate/tscc-15bit
	tests/ref/fate/tscc-32bit
	tests/ref/fate/v210
	tests/ref/fate/vc1-ism
	tests/ref/fate/vc1_sa00040
	tests/ref/fate/vc1_sa00050
	tests/ref/fate/vc1_sa10091
	tests/ref/fate/vc1_sa20021
	tests/ref/fate/vmnc-16bit
	tests/ref/fate/vmnc-32bit
	tests/ref/fate/vp5
	tests/ref/fate/vp8-sign-bias
	tests/ref/fate/vqa-cc
	tests/ref/fate/wmv8-drm
	tests/ref/fate/yop
	tests/ref/fate/zmbv-8bit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-04 02:34:14 +01:00
Anton Khirnov d2afbd9a56 frame{crc/md5}: set the stream timebase from codec timebase.
Right now those muxers use the default timebase in all cases(1/90000).

This patch avoid unnecessary rescaling and makes the printed timestamps
more readable.

Also, extend the printed information to include the timebases and packet
pts/duration and align the columns.

Obviously changes the results of all fate tests which use those two
muxers.
2012-02-03 09:29:02 +01:00
Reimar Döffinger 05741d70c7 Fallback to input timestamps for non-delay encoders.
Causes FFmpeg to pass through the correct pts values,
instead of clobbering all to AV_NOPTS_VALUE (the av_init_packet
default) to then make up new ones based on only fps when muxing.
Included are also the related FATE ref changes, which all
some reasonable on quick investigation.
Also set all H.264 references to us -vsync drop to reduce the
diff for the ref files.
Otherwise almost all H.264 references need to change, mostly due
to now starting with negative pts values.
About 20 additional H.264 conformance tests needed -vsync
drop anyway because they create pts values that are out of
order and thus not possible to mux otherwise.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-29 14:17:11 +01:00
Anton Khirnov 0844b57c11 crcenc: add flags
AVFMT_NOTIMESTAMPS for crc, as it ignores the timestamps.
AVFMT_VARIABLE_FPS for framecrc, as it prints dts.

Many FATE changes, because avconv is no longer duplicating frames in
those tests.
Also added -vsync 0 for some tests to prevent avconv from dropping
frames until it can be fixed more properly.
2011-11-23 21:43:46 +01:00
Vitor Sessak 1d9a8c347a Add MPEG2 field encoding fate2 regtest
Originally committed as revision 24175 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-10 22:57:19 +00:00
Anton Khirnov 832ba44d8d avconv: saner output video timebase.
r_frame_rate should in theory have something to do with input framerate,
but in practice it is often made up from thin air by lavf. So unless we
are targeting a constant output framerate, it's better to just use input
stream timebase.

Brings back dropped frames in nuv and cscd tests introduced in
cd1ad18a65
2012-02-26 07:48:45 +01:00
Anton Khirnov cd1ad18a65 rawenc: switch to encode2().
This changes a number of FATE results, since before this commit, the
timestamps in all tests using rawenc were made up by lavf.

In most cases, the previous timestamps were completely bogus.

In some other cases -- raw formats, mostly h264 -- the new timestamps
are bogus as well. The only difference is that timestamps invented by
the muxer are replaced by timestamps invented by the demuxer.

cscd     -- avconv sets output codec timebase from r_frame_rate
and r_frame_rate is in this case some guessed number 31.42 (377/12),
which is not accurate enough to represent all timestamps. This results
in some frames having duplicate pts. Therefore, vsync 0 needs to be
changed to vsync 2 and avconv drops two frames. A proper fix in the
future would be to set output timebase to something saner in avconv.

nuv      -- previous timestamps for video were wrong AND the cscd
comment applies, one frame is dropped.

vp8-signbias -- the file contains two frames with identical timestamps,
so -vsync 0 needs to be removed/changed to -vsync 2 and avconv drops one
frame.

vc1-ism -- apparrently either the demuxer lies about timestamps or the
file is broken, since dts == pts on all packets, but reordering clearly
takes place.
2012-02-08 21:51:24 +01:00