Commit Graph

97 Commits

Author SHA1 Message Date
James Almer
99ec7a8ced fate/h264: add a test for the dts2pts bsf
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-16 16:45:00 -03:00
Anton Khirnov
b1aaa1f585 fftools/ffmpeg_dec: apply cropping manually
lavfi does not require aligned buffers, so we can safely apply top/left
cropping by any amount, without passing any special flags to lavc.
Longer term, an even better solution would probably be auto-inserting
the crop filter (or its hwaccel versions) as needed.

Multiple FATE tests no longer need -flags unaligned.
2024-03-28 08:40:01 +01:00
James Almer
7cf4e305a2 fate/h264: add missing swscale dependency to h264-bsf-mp4toannexb-new-extradata
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-12 13:41:29 -03:00
Zhao Zhili
641f8a71fb fate/h264: move mp4toannexb_ticket5927 test to fate-h264
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 19:42:15 +08:00
Zhao Zhili
aa3b857101 avcodec/h264_mp4toannexb_bsf: process new extradata
For fate-h264_mp4toannexb_ticket5927 and
fate-h264_mp4toannexb_ticket5927_2, they work by accident
previously. The sample file has two 'avc1' entries, and video
samples use the second one. It means packets should be decoded with
new extradata in side data. Before this patch, only extradata was
kept in the output, new extradata has been dropped. The output can
be decoded because the two extradata are almost the same, except
level indication. This patch fixed the issue, and add another
fate test.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 19:42:14 +08:00
Zhao Zhili
d3aa0cd16f avcodec/h264_mp4toannexb_bsf: fix missing PS before IDR frames
If there is a single group of SPS/PPS before an IDR frame, but no
SPS/PPS after that, we will miss the chance to reset
idr_sps_seen/idr_pps_seen. No SPS/PPS are inserted afterwards.

This patch saves in-band SPS/PPS and insert them before IDR frames
when necessary.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 19:42:14 +08:00
James Almer
41bbf2e372 fate/h264: test disabling cropping
Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-22 11:20:58 -03:00
Anton Khirnov
cea71b2139 fftools/ffmpeg: stop using fake dts for generating timestamps
When no packet dts values are available from the container, video
decoding code will currently use its own guessed values, which will then
be propagated to pkt_dts on decoded frames and used as pts in certain
cases. This is inaccurate, fragile, and unnecessarily convoluted.
Simply removing this allows the extrapolation code introduced in the
previous commit to do a better job.

Changes the results of numerous h264 and hevc FATE tests, where no
spurious timestamp gaps are generated anymore. Several tests no longer
need -vsync passthrough.
2023-04-13 15:34:07 +02:00
Anton Khirnov
5d407cb2d7 fftools/ffmpeg: change video decoding timestamp generation
When no timestamps are available from the container, the video decoding
code will currently use fake dts values - generated in
process_input_packet() based on a combination of information from the
decoder and the parser (obtained via the demuxer) - to generate
timestamps during decoder flushing. This is fragile, hard to follow, and
unnecessarily convoluted, since more reliable information can be
obtained directly from post-decoding values.

The new code keeps track of the last decoded frame pts and estimates its
duration based on a number of heuristics. Timestamps generated when both
pts and pkt_dts are missing are then simple pts+duration of the last frame.
The heuristics are somewhat complicated by the fact that lavf insists on
making up packet timestamps based on its highly incomplete information.
That should be removed in the future, allowing to further simplify this
code.

The results of the following tests change:
* h264-3386 now requires -fps_mode passthrough to avoid dropping frames
  at the end; this is a pathology of the interaction of the new and old
  code, and the fact that the sample switches from field to frame coding
  in the last packet, and will be fixed in following commits
* hevc-conformance-DELTAQP_A_BRCM_4 stops inventing an arbitrary
  timestamp gap at the end
* hevc-small422chroma - the single frame output by this test now has a
  timestamp of 0, rather than an arbitrary 7
2023-04-13 15:34:07 +02:00
Anton Khirnov
ba4b73c977 lavf/rawdec: set avg_frame_rate
Timestamps in two FATE H.264 conformance tests now start at 1 instead
of 0, which also happens in some other H.264 tests before this commit
and so is not a big issue.
Conversely, timestamps in some HEVC conformance tests start from a
smaller value now.
Ideally this should be addressed later in a more general way.

h264-conformance-frext-frext2_panasonic_b no longer requires -vsync
passthrough.
2023-04-13 15:34:07 +02:00
Andreas Rheinhardt
5f176bbc9a fate/h264: Add Active Format Descriptor test
Some samples contain Active Format Descriptors, yet the output
of no test depends upon them, so that they are de-facto untested.
So add a dedicated test for them.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-09 20:24:31 +02:00
Andreas Rheinhardt
e561d16d49 fate/h264: Fix test requirements
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-03 04:18:06 +02:00
Anton Khirnov
e3833e8a24 FATE: stop using numeric arguments to -vsync
Symbolic names are always preferable.
2021-12-07 11:23:45 +01:00
Anton Khirnov
36237ac4ee tests: stop using -vsync drop
It depends on the muxer generating the timestamps, which is deprecated
and scheduled for removal on next bump.

A bunch of tests change timestamps, because of ffmpeg.c is not
generating them correctly. This should be fixed later.
2020-12-10 09:53:52 +01:00
Nicolas George
3bf5cc9c58 fate: add scale filters for big-endian architectures.
Filters mostly work in native endianness, but they must output
a specified endianness, usually little: that requires a final
conversion for big endian.

I do not know what's the deal with gif-deal: inserting explicitly
the filters that are implicitly inserted result in less frames in
output. Probably a strange problem of duration.
2020-09-30 16:39:34 +02:00
Nicolas George
f08e024ac7 fate: disable automatic conversions on many tests.
Explicitly insert the scale or aresample filter where it would
have been inserted by the negotiation.
Re-enable conversions if it cannot be done easily.

If a conversion is needed in a test, we want to know about it.
If the negotiation changes and makes new conversion necessary,
we want to know about it even more.
2020-09-08 14:16:08 +02:00
Anton Khirnov
ea980d4162 fate: add tests for h264 and vp9 video enc parameters export 2020-05-25 11:59:45 +02:00
Josh de Kock
3f2103ec73 fate: add h264 timecode test 2018-10-23 15:46:30 +01:00
James Almer
b125822d1d Merge commit 'ec0f4fa17ce29cf01d4def21041b0b87f7e3105d'
* commit 'ec0f4fa17ce29cf01d4def21041b0b87f7e3105d':
  FATE: add a test for the H.264 sample fixed by 7c4f6f6

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 18:37:54 -03:00
Anton Khirnov
ec0f4fa17c FATE: add a test for the H.264 sample fixed by 7c4f6f6 2017-10-19 16:38:51 +02:00
James Almer
a2b0602cda Merge commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7'
* commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7':
  Use modern avconv syntax for codec selection in documentation and tests

Merged-by: James Almer <jamrial@gmail.com>
2017-10-03 21:28:07 -03:00
Clément Bœsch
71d541751e Merge commit '043b0b9fb1481053b712d06d2c5b772f1845b72b'
* commit '043b0b9fb1481053b712d06d2c5b772f1845b72b':
  Replace leftover uses of -aframes|-dframes|-vframes with -frames:a|d|v

The merge also includes all our own occurences.

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-24 11:40:35 +01:00
Diego Biurrun
4141a5a240 Use modern avconv syntax for codec selection in documentation and tests 2017-02-27 10:36:45 +01:00
Clément Bœsch
7448019890 Merge commit '38efff92f1ef81f3de20ff0460ec7b70c253d714'
* commit '38efff92f1ef81f3de20ff0460ec7b70c253d714':
  FATE: add a test for H.264 with two fields per packet
  h264: fix decoding multiple fields per packet with slice threads

This merge includes two commits because the FATE test was useful in
order to make proper testing.

The merge gets rid of the now unused:
- SLICE_SINGLETHREAD and SLICE_SKIPED macros
- max_contexts
- "again" label in decode_nal_units()

This commit also includes the fix from d3e4d406b.

Thanks to wm4 and Michael Niedermayer for their testing.

Merged-by: Clément Bœsch <u@pkh.me>
Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-01-24 16:13:03 +01:00
Michael Niedermayer
25f4f08ba5 avcodec/h264dec: Fix regression with "make fate-h264-attachment-631 THREADS=8"
This treats the case of no slices like no frames which it basically is.

The field is added to the context as other nal related fields are also there
and passing the has_slices field per *arguments is ugly and not consistent

Found-by: ubitux
Approved-by: ubitux

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-24 12:13:59 +01:00
Derek Buitenhuis
e94b9313b2 fate: Add h264 test for frame num gaps
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-12-14 11:01:50 +01:00
Derek Buitenhuis
b7e4ea0c80 fate: Add h264 test for frame num gaps
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-12-12 13:33:52 +00:00
Hendrik Leppkes
127cc6dd3d Merge commit '8d07e941b04d63fc4443dd986e3dc7b69cdcca43'
* commit '8d07e941b04d63fc4443dd986e3dc7b69cdcca43':
  FATE: add a test of H.264 SEI recovery in an intra refresh stream

Our H264 decoder drops 3 frames from the beginning of the stream, but
all frames after those match, hence the difference in the fate test.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 11:32:10 +01:00
Hendrik Leppkes
9e1ddc0820 Merge commit '390b95b88b2b896b63f257f69e434dfc0111e076'
* commit '390b95b88b2b896b63f257f69e434dfc0111e076':
  fate: Add a mixed NAL coding sample

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:16:54 +01:00
Hendrik Leppkes
1398ded7a7 Merge commit 'cbbb404055877e3beb9890ffe22784a6a100963e'
* commit 'cbbb404055877e3beb9890ffe22784a6a100963e':
  fate: Restore order of h264 entries

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-17 15:27:27 +01:00
Vittorio Giovara
481ff3cf01 fate: Add h264 and hevc extradata reload tests
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-16 11:17:27 -05:00
Vittorio Giovara
00c8079816 fate: Add h264 extradata reload tests
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-16 02:43:19 +01:00
Rodger Combs
a6da754ef9
fate/h264: make mp4toannexb test use auto-BSF 2016-10-24 03:53:24 -05:00
Diego Biurrun
043b0b9fb1 Replace leftover uses of -aframes|-dframes|-vframes with -frames:a|d|v 2016-10-22 16:50:41 +02:00
Anton Khirnov
38efff92f1 FATE: add a test for H.264 with two fields per packet 2016-07-15 15:34:29 +02:00
Anton Khirnov
8d07e941b0 FATE: add a test of H.264 SEI recovery in an intra refresh stream 2016-07-15 15:33:13 +02:00
Vittorio Giovara
390b95b88b fate: Add a mixed NAL coding sample
See 17c99b6158.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-07-13 18:18:46 -04:00
Vittorio Giovara
cbbb404055 fate: Restore order of h264 entries 2016-07-13 18:18:46 -04:00
Michael Niedermayer
07f5e75a47 tests/fate: Add test for ticket 3386 ([H264] [Regression] illegal short term buffer state detected)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-02 21:37:48 +02:00
Michael Niedermayer
89cccfc905 fate/h264: add test for skip-nointra and skip-nokey 2016-06-29 16:22:37 +02:00
Clément Bœsch
2770e16d70 fate/h264: add test for ticket #631 2016-06-17 17:46:19 +02:00
Michael Niedermayer
e78515f2ae tests/fate/h264: Add test for xavc and somewhat odd pps/sps
(Ticket 4389)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-03 01:42:57 +02:00
Derek Buitenhuis
bc3d2f2578 Merge commit '18019f8cb9663dd1032c65aa453eaec18d641905'
* commit '18019f8cb9663dd1032c65aa453eaec18d641905':
  FATE: add an H.264 test with unescaped extradata
  FATE: add an H.264 test with invalid reference lists

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-11 19:39:09 +01:00
Michael Niedermayer
e7a9b434c5 fate: Add test for broken SPS (Ticket 2580)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-05 04:11:52 +02:00
Anton Khirnov
18019f8cb9 FATE: add an H.264 test with unescaped extradata
See commit a7829a2
2016-04-15 10:06:39 +02:00
Anton Khirnov
d7abe900c3 FATE: add an H.264 test with invalid reference lists
See commit 9d74012
2016-04-15 10:04:52 +02:00
Michael Niedermayer
5a19506088 fate: Remove vsync drop from some h264 tests
Note some tests need vsync drop to produce exact timestamps, these seem not to
need it. quite likely many more dont need it either, ive not checked beyond finding
one that needs it and the ones which have it removed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 16:39:20 +01:00
Michael Niedermayer
d4424d7de2 fate: Modify a random h264 test to also test the -framerate option
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 16:39:19 +01:00
James Almer
6224dddaa7 fate: add missing dependencies for fate-h264-dts_5frames
Signed-off-by: James Almer <jamrial@gmail.com>
2016-03-12 19:14:35 -03:00
Michael Niedermayer
4aea2c7d89 fate: Add ffprobe dependancy to fate-h264-dts_5frames
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-12 15:37:25 +01:00