Commit graph

22 commits

Author SHA1 Message Date
Sergey Silkin
6c60f72a6b Refactor video codec testing stats
This CL introduces VideoCodecStats and VideoCodecStatsImpl which provide baseline functionalities for storing, slicing and aggregation of encoded and/or decoded video frame statistics. To facilitate metrics logging (not implemented yet), SamplesStatsCounter is used for stream parameters.

VideoCodecStats/VideoCodecStatsImpl will replace existing VideoCodecTestStats/VideoCodecTestStatsImpl.

Bug: b/261160916, webrtc:14852
Change-Id: I0f96ce1ed9be3aee2a702804612524676c9882fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291323
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39248}
2023-02-02 15:56:40 +00:00
Sergey Silkin
984cf9b837 Explicitly set encoder and decoder format in codec tests.
This allows to differentiate and test codecs of the same type but
different implementations/settings.

Bug: none
Change-Id: I74f799b36411e63387513133ffc19a7f0c45d550
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238165
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35396}
2021-11-22 08:18:25 +00:00
Johannes Kron
3cd7a0ffdd Remove media/base/h264_profile_level_id.* and media/base/vp9_profile.h
The content of these files was moved to api/video_codecs in
https://webrtc.googlesource.com/src.git/+/c3fcee7c3a7714afc3e37d4753b40f4fdbc3653e
but the original files could not be removed due to dependencies
in downstream projects.

Bug: chromium:1187565
Change-Id: I414efa22102bfdea0765fa72a8cf8b0bd5c090db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229303
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34869}
2021-08-30 10:31:08 +00:00
Johannes Kron
c3fcee7c3a Move h264_profile_level_id and vp9_profile to api/video_codecs
This is a refactor to simplify a follow-up CL of adding
SdpVideoFormat::IsSameCodec.

The original files media/base/h264_profile_level_id.* and
media/base/vp9_profile.h must be kept until downstream projects
stop using them.

Bug: chroimium:1187565
Change-Id: Ib39eca095a3d61939a914d9bffaf4b891ddd222f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215236
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33782}
2021-04-20 09:42:05 +00:00
Erik Språng
ebe5acb27a VideoCodecTextFixture and YuvFrameReader improvements.
Adds ability to specify desired frame size separate from actual clip
resolution, as well as clip and desired fps.
This allows e.g. reading an HD clip but running benchmarks in VGA, and
to specify e.g. 60fps for the clip but 30for encoding where frame
dropping kicks in so that motion is actually correct rather than just
plaing the clip slowly.

Bug: webrtc:12229
Change-Id: I4ad4fcc335611a449dc2723ffafbec6731e89f55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195324
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32839}
2020-12-15 23:18:06 +00:00
Sergey Silkin
b72cc6d670 Analyze quality of dropped frames in VideoProcessor.
Calculate quality metrics for dropped frames by comparing original
frame against last decoded one.

This feature makes comparison of encoders which do/don't drop frames
more fair.

The feature is controlled by analyze_quality_of_dropped_frames flag
and is disabled by default.

Bug: none
Change-Id: Ifab8df92d0b76e743ff3193c05d7c8dbd14921c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190660
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32518}
2020-10-29 08:23:49 +00:00
Niels Möller
67615460be Move H264::Profile to h264_profile_level_id.h
Eliminates a few dependencies on the top-level common_types.h.

Bug: webrtc:7660
Change-Id: I91218a27e745e7e5e6b64dff9e09f6a6ab32d644
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181480
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31920}
2020-08-12 12:10:24 +00:00
Sergey Silkin
df8fd28d0b Add output_path to VideoCodecTestFixture::Config.
This lets test to set output path explicitly.

Bug: none
Change-Id: I756484775f4c7f44cd1bb904c89d9215ffa48fe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158798
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29702}
2019-11-06 08:48:52 +00:00
Sergey Silkin
44cec0b5bd Handle non-integer frame rates in video codec tests.
Encoder API accepts non-integer frame rate since
https://webrtc-review.googlesource.com/c/src/+/131949.

Bug: webrtc:10812
Change-Id: I5fc9c5dfac4b182b84a735218a2946a95cc2b93c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143483
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28548}
2019-07-12 07:37:43 +00:00
Rasmus Brandt
6f0aafa531 Add PrintResults to VideoCodecTest.
These are used by the test runner to pick up perf values
to be shown in the perf dashboard.

Bug: webrtc:10349
Change-Id: Ib3b2479f7a20b66192751bee8237d757f5870bd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126220
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27020}
2019-03-07 15:12:40 +00:00
Rasmus Brandt
7b3f4a2035 Remove unused |keyframe_interval| from codec tests.
Bug: webrtc:10349
Change-Id: Iada8c8a1824f6e5424f503bb67b00382069b1dbd
Reviewed-on: https://webrtc-review.googlesource.com/c/124486
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26866}
2019-02-27 07:26:30 +00:00
Sergey Silkin
d716fb9ecb Reland "Refactor rate profile update."
This is a reland of b6cdfdc165

Original change's description:
> Refactor rate profile update.
>
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
>
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

TBR=ilnik@webrtc.org,shampson@webrtc.org

Bug: none
Change-Id: I6ccbb32efe3d52c97e73e248ce5f06d672c9fba5
Reviewed-on: https://webrtc-review.googlesource.com/c/116286
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26155}
2019-01-08 10:35:42 +00:00
Sergey Silkin
08223c1576 Revert "Reland "Refactor rate profile update.""
This reverts commit 77aedaee69.

Reason for revert: breaks VideoCodecTestVideoToolbox tests.

Original change's description:
> Reland "Refactor rate profile update."
> 
> This is a reland of b6cdfdc165
> 
> Original change's description:
> > Refactor rate profile update.
> > 
> > RateProfile::frame_num specifies frame at which this rate profile
> > should be applied.
> > 
> > Bug: none
> > Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Reviewed-by: Seth Hampson <shampson@webrtc.org>
> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26080}
> 
> Bug: none
> Change-Id: I2604878d0bbee0f2182ad74e3cc29546310b76f3
> Reviewed-on: https://webrtc-review.googlesource.com/c/115401
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26145}

TBR=ilnik@webrtc.org,shampson@webrtc.org,ssilkin@webrtc.org

Change-Id: Ib53eae70c380eefa303ddb01441f23e32f06b3ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/116285
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26148}
2019-01-07 15:41:17 +00:00
Sergey Silkin
77aedaee69 Reland "Refactor rate profile update."
This is a reland of b6cdfdc165

Original change's description:
> Refactor rate profile update.
> 
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
> 
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

Bug: none
Change-Id: I2604878d0bbee0f2182ad74e3cc29546310b76f3
Reviewed-on: https://webrtc-review.googlesource.com/c/115401
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26145}
2019-01-07 11:18:26 +00:00
Sergey Silkin
a1f78a4fa6 Revert "Refactor rate profile update."
This reverts commit b6cdfdc165.

Reason for revert: breaks downstream projects

Original change's description:
> Refactor rate profile update.
> 
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
> 
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

TBR=ilnik@webrtc.org,shampson@webrtc.org,ssilkin@webrtc.org

Change-Id: I5957a0169841008436d1db70403d3694bf25d5cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/115400
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26081}
2018-12-21 09:05:01 +00:00
Sergey Silkin
b6cdfdc165 Refactor rate profile update.
RateProfile::frame_num specifies frame at which this rate profile
should be applied.

Bug: none
Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
Reviewed-on: https://webrtc-review.googlesource.com/c/115242
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26080}
2018-12-21 08:32:35 +00:00
Rasmus Brandt
2d0c68744c Remove |hw_encoder| and |hw_decoder| from VideoCodecTestFixture::Config.
Only used for output filename nowadays. Previously, it was used for
selecting the codec implementation. That is now done by injecting
the appropriate codec factory.

Bug: webrtc:9317
Change-Id: Ia2bf28f7df165fb65410ecd1f5d646ee6604e1be
Reviewed-on: https://webrtc-review.googlesource.com/c/106023
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25204}
2018-10-16 10:59:23 +00:00
Kári Tristan Helgason
f16776280f Add config option to run VideoCodecTest in real time.
It's reasonable to allow clients implementing their own VideoCodecTests
to decide wether they should run in real-time.

Removes the IsAsyncCodec helper, as the assumptions it made are outdated,
and it is no longer useful.

Bug: None
Change-Id: If766935d4947555af54f499a30cfe553bde4c1ab
Reviewed-on: https://webrtc-review.googlesource.com/95722
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24478}
2018-08-29 09:19:25 +00:00
Rasmus Brandt
2aae2733a7 Remove adapter bools from VideoCodecTestFixture::Config.
It should be the responsibility of the fixture user to provide the exact
codecs that should be tested instead. This reduces the coupling between
the test fixture and the codec instantiation.

Bug: webrtc:9317
Change-Id: I60d8f5c4b516ba33e2293d574ba17602c39f992b
Reviewed-on: https://webrtc-review.googlesource.com/79147
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23425}
2018-05-29 08:02:13 +00:00
Rasmus Brandt
7c1ccfa881 Move VisualizationParams to VideoCodecTestFixture::Config.
Bug: None
Change-Id: I0a725535c840dda2704dfff33f5e5d3bef3fc0a7
Reviewed-on: https://webrtc-review.googlesource.com/78882
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23422}
2018-05-29 07:18:04 +00:00
Kári Tristan Helgason
169005d8c1 Move VideoCodecTest configuration classes to api/test.
These files are required when implementing tests based on the test fixture,
and should be exposed as part of the test api.

This CL also removes a usage of stringstream and fixes some chromium-style
lint issues.

Bug: webrtc:8982, webrtc:163
Change-Id: I132aea0da79a79587887f21897236fc9802b7574
Reviewed-on: https://webrtc-review.googlesource.com/74586
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23346}
2018-05-22 12:14:38 +00:00
Kári Tristan Helgason
9d96e92316 Rewrite videoprocessor integrationtest to use public fixture.
This CL creates a test fixture for the videoprocessor integration tests
and exposes it as part of the public API. It also rewrites the current
versions of the tests to build on this new paradigm. The motivation for
this is to easily allow projects that build on top of webrtc to add
integration-level tests for their own custom codec implementations in a
way that does not link them too tightly to the internal implementations
of said tests.

Bug: None
Change-Id: I7cf9f29322a6934b3cfc32da02ea7dfa5858c2b2
Reviewed-on: https://webrtc-review.googlesource.com/72481
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23118}
2018-05-04 12:02:44 +00:00