Commit graph

1027 commits

Author SHA1 Message Date
Mirko Bonadei
6c9c958c69 Revert "Unify access to SDP codec parameters"
This reverts commit 63d03f586b.

Reason for revert: Breaks downstream project (not backwards compatible API change)

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I841735d98533d3b66850b9cfcf7ee0a99ddde078
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331400
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41377}
2023-12-13 16:28:44 +00:00
Philipp Hancke
63d03f586b Unify access to SDP codec parameters
which come from the a=fmtp:<pt> lines in the SDP and were used as either
  std::map<std::string, std:string>
with three aliases,
  cricket::CodecParameterMap
  SdpAudioFormat::Parameters
  SdpVideoFormat::Parameters

Use webrtc::CodecParameterMap in all places.

BUG=None

Change-Id: If47692bde7347834c349c6539b43309d8770e67b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41375}
2023-12-13 14:22:15 +00:00
Mirko Bonadei
a3d2c58e38 Skip LibaomAv1SvcTest.EncodeAndDecodeAllDecodeTargets/S3T3.
This is temporary while AV1 gets fixed.

Bug: webrtc:15715, b/315476578
Change-Id: I4fdadb97788c934b12b4a3a19dfec1f61a95a3a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330640
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41345}
2023-12-09 12:24:51 +00:00
Sergey Silkin
2d86b258e0 Reland "Added an encode/decode test parameterizable via command line"
This is a reland of commit 496893e89e

Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41179}

Bug: webrtc:14852
Change-Id: Iccb9af8bf6a6c37704bc58b6e57238b55761b079
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327781
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41194}
2023-11-20 11:51:43 +00:00
Christoffer Jansson
20724ae1b7 Revert "Added an encode/decode test parameterizable via command line"
This reverts commit 496893e89e.

Reason for revert: Breaks https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/16103/overview

Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41179}

Bug: webrtc:14852
Change-Id: Ifdce738058c3e3fc7c76886939add2813405cae7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327722
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41183}
2023-11-17 12:53:00 +00:00
Sergey Silkin
496893e89e Added an encode/decode test parameterizable via command line
This enables testing different settings without updating code and rebuilding the test binary. Example of command:

video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv

Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.

Bug: webrtc:14852
Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41179}
2023-11-17 10:21:51 +00:00
Sergey Silkin
d431156c0e Move codecs handling from test to tester
* Pass codec factories to the video codec tester instead of creating and wrapping codecs into a tester-specific wrappers in video_codec_test.cc. The motivation for this change is to simplify the tests by moving complexity to the tester.

* Merge codec stats and analysis into the tester and move the tester. The merge fixes circular deps issues. Modularization is not strictly needed for testing framework like the video codec tester. It is still possible to unit test underlaying modules with rather small overhead.

* Move the video codec tester from api/ to test/. test/ is accessible from outside of WebRTC which enables reusing the tester in downstream projects.

Test output ~matches before and after this refactoring. There is a small difference that is caused by changes in qpMax: 63 -> 56 (kDefaultVideoMaxQpVpx). 56 is what WebRTC uses by default for VPx/AV1 encoders.

Bug: webrtc:14852
Change-Id: I762707b7144fcff870119ad741ebe7091ea109ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41144}
2023-11-13 16:48:49 +00:00
Sergey Silkin
50e2054c5b Move setting single spatial layer bitrates to GetVp9SvcConfig
Before this change bitrate limits for VP9 single spatial layer case were set in VideoCodecInitializer. Move this logic to GetVp9SvcConfig. This simplifies replication of WebRTC behaviour in codec level tests. The similar AV1 logic sits in SetAv1SvcConfig, not VideoCodecInitializer.

Bug: webrtc:14852
Change-Id: Ie7202ec880d0e4b903e7265721eeef9b3920f21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324286
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40992}
2023-10-23 14:10:21 +00:00
Byoungchan Lee
11376fb992 Reset H.264 SVC Controller on key frame
Sometimes OpenH264 returns a key frame even though we have not
requested one. However, SVC controller does not know about this
and will not reset its state. Since we are comparing expected tid
from SVC controller with actual tid from OpenH264, and drop frames
if they do not match, that causes a missing frame.

This CL resets the SVC controller state on key frames, ensuring
that it accurately maintains its state and does not drop frames.
Also, changes the message of the error log to be more descriptive.
Now, it will print the expected tid and actual tid.

Bug: webrtc:14877
Change-Id: I6c9e7532b2478773f03e5707bf7a1ca56e4f7b99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324001
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40972}
2023-10-19 09:51:14 +00:00
Danil Chapovalov
f2443a7971 Replace WebRTC-QuickPerfTest field trial with a flag
This field trial is configured via command line flag, so may use flag system directly, reducing dependency on global field trial string.

Bug: webrtc:7101, webrtc:10335
Change-Id: I1e48e0e3fdc251b73a375c6d7f1a46fa4f8a179b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322624
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40897}
2023-10-10 08:59:10 +00:00
Sergey Silkin
a4b2b95f99 Restrict ARM-specific VP8/VP9/AV1 settings to mobile platforms
ARM-specific settings were intended to be used on mobile ARM devices which may not be powerful enough. But the settings were also applied to ARM-based Macs. This changes restricts ARM-specific settings to Android and iOS platforms.

Bug: none
Change-Id: I68764b4c0679db07399bba5923f4a6be89c5ad80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321861
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Jerome Jiang <jianj@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40884}
2023-10-06 15:10:04 +00:00
Erik Språng
d7703d9505 Reland "Add mitigation for very long frame drop gaps with vp8"
This is a reland of commit 0d4b350006

Patchset 1 is the original CL. Patchset 2 contains a small tweak of the target bitrate in the unit test, in order to make in less susceptible to flakiness on runtime environments running a slightly different libvpx.

Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}

Bug: webrtc:15530
Change-Id: I096b7d952286f7f53852d1ca70aea398b2747784
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322540
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40874}
2023-10-05 13:29:23 +00:00
Erik Språng
bada9dd30c Revert "Add mitigation for very long frame drop gaps with vp8"
This reverts commit 0d4b350006.

Reason for revert: Temporary revert to adjust thresholds for internal test

Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}

Bug: webrtc:15530
Change-Id: I920661835f0e59c0543794222e42b5643017db24
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322443
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40871}
2023-10-05 11:00:47 +00:00
Erik Språng
0d4b350006 Add mitigation for very long frame drop gaps with vp8
Bug: webrtc:15530
Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40866}
2023-10-04 14:22:31 +00:00
Danil Chapovalov
9c58483b5a Rename EncodedImage property Timetamp to RtpTimestamp
To avoid name collision with Timestamp type,
To avoid confusion with capture time represented as Timestamp

Bug: webrtc:9378
Change-Id: I8438a9cf4316e5f81d98c2af9dc9454c21c78e70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40796}
2023-09-24 20:06:48 +00:00
qwu16
ae82df718c Add codec name H265 to support H265 in WebRTC
Bug: webrtc:13485
Change-Id: I352b15a65867f0d56fc8e9a9e03081bd3258108e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40773}
2023-09-20 09:25:32 +00:00
philipel
31718d7ce2 Reland "Add option to disable quality scaling for AV1."
This reverts commit 83102d3907.

Reason for revert: reland with fix

Original change's description:
> Revert "Add option to disable quality scaling for AV1."
>
> This reverts commit 446dbc66fd.
>
> Reason for revert: downstream break
>
> Original change's description:
> > Add option to disable quality scaling for AV1.
> >
> > The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
> >
> > Bug: b/295129711
> > Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40709}
>
> Bug: b/295129711
> Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40742}

Bug: b/295129711
Change-Id: Iab4846c2cd6074f50a3ebe9551432d449243b5d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320120
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40743}
2023-09-13 15:19:36 +00:00
Philip Eliasson
83102d3907 Revert "Add option to disable quality scaling for AV1."
This reverts commit 446dbc66fd.

Reason for revert: downstream break

Original change's description:
> Add option to disable quality scaling for AV1.
>
> The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
>
> Bug: b/295129711
> Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40709}

Bug: b/295129711
Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40742}
2023-09-13 12:21:31 +00:00
philipel
19ff1ad237 Reland "Always use AV1 specific bitrate limits when spatial layers are used."
This reverts commit 030c6ff43f.

Reason for revert: reland with fix

Original change's description:
> Revert "Always use AV1 specific bitrate limits when spatial layers are used."
>
> This reverts commit d2d165d47c.
>
> Reason for revert: All the regressions!
>
> Original change's description:
> > Always use AV1 specific bitrate limits when spatial layers are used.
> >
> > Bug: b/295129711
> > Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
> > Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40719}
>
> Bug: b/295129711
> Change-Id: I5776edbaba33e86eb10414062ef2b29510f40b8d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319880
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#40730}

Bug: b/295129711
Change-Id: I5fe84184d3f3780fdc4e9c1d43c4989d333d44a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319881
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40739}
2023-09-12 13:00:19 +00:00
Philip Eliasson
030c6ff43f Revert "Always use AV1 specific bitrate limits when spatial layers are used."
This reverts commit d2d165d47c.

Reason for revert: All the regressions!

Original change's description:
> Always use AV1 specific bitrate limits when spatial layers are used.
>
> Bug: b/295129711
> Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
> Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40719}

Bug: b/295129711
Change-Id: I5776edbaba33e86eb10414062ef2b29510f40b8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319880
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40730}
2023-09-11 11:57:39 +00:00
philipel
d2d165d47c Always use AV1 specific bitrate limits when spatial layers are used.
Bug: b/295129711
Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40719}
2023-09-08 09:02:11 +00:00
philipel
8fd09016e6 Reduce number of spatial layers depending on input resolution for AV1
Bug: b/295129711
Change-Id: If54562d6e453209da9f358bbdb2909662e4ab873
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319380
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40713}
2023-09-07 10:29:47 +00:00
philipel
446dbc66fd Add option to disable quality scaling for AV1.
The main goal of this change is to disable the quality scaler when multiple spatial layers are used.

Bug: b/295129711
Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40709}
2023-09-06 12:37:22 +00:00
Tony Herre
55b593fb6b Remove EncodedFrame::MissingFrame and start removing Decode() param
Remove EncodedFrame::MissingFrame, as it was always false in actual
in-use code anyway, and remove usages of the Decode missing_frames param
within WebRTC. Uses/overrides in other projects will be cleaned up
shortly, allowing that variant to be removed from the interface.

Bug: webrtc:15444
Change-Id: Id299d82e441a351deff81c0f2812707a985d23d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317802
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40662}
2023-08-30 10:38:35 +00:00
Sergey Silkin
86a7969a6d Synchronize access to callbacks map
Bug: webrtc:14852
Change-Id: I65a608976056865849f4175411febc8093402de1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314481
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40500}
2023-08-02 11:38:25 +00:00
Jerome Jiang
3403acb3c6 av1: 8 threads for >720p and tiles config
Use 8 threads for > 720p
Use 4 tile columns and 2 tile rows for 8 threads
Use 2 tile columns and 2 tile rows for 4 threads

For VGA, 2 tile_col x 2 tile_row configuration has
 - ~9% speedup over 4 tile_col x 1 tile_row
 - ~5% speedup over 1 tile_col x 4 tile_row

Bug: None
Change-Id: I3c1ea948437aece7c6734ce25351158cbdf0a15b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307880
Commit-Queue: Jerome Jiang <jianj@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40237}
2023-06-07 15:33:41 +00:00
Sergey Silkin
d615704551 Enable frame dropping in libaom AV1 encoder
Bug: webrtc:15225
Change-Id: Ife16a61d47d7aa2f20548d30c56bf59844de1b26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307500
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40236}
2023-06-07 13:24:02 +00:00
Florent Castelli
8c4b9ea535 Remove references to AudioCodec and VideoCodec constructors
The preferred method to create codecs is to use the function
cricket::CreateAudioCodec or cricketCreateVideoCodec.
Empty codec objects are deprecated and should be replaced
with alternatives such as methods returning an
absl::optional object instead.

Bug: webrtc:15214
Change-Id: I7fe40f64673cd407830dbbb0e541b85a3aee93aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307521
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40226}
2023-06-05 23:23:40 +00:00
Florent Castelli
816f5b1a39 Create VP9Encoder with a VP9 codec object
Empty codec objects do not make sense. Instead of creating an empty
object to be used as a placeholder in the API, at least create a
video codec with the right name.

Bug: webrtc:15214
Change-Id: I705d9d1361f353fe5dc538a6fe972c8a346f1247
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307221
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40218}
2023-06-05 00:23:47 +00:00
Florent Castelli
5278b39fab Add H264Encoder::Create()
Most of the usage of the H264Encoder::Create(codec) method passes a
simple codec with just the H264 codec name. This simplified the call
sites in many places and removes references to the codec types.

Bug: webrtc:15214
Change-Id: I4039c0be4ce6e3147c14c7853df4635f344b7d70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307222
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40214}
2023-06-02 17:40:26 +00:00
Sergey Silkin
0328190ab3 Add video_codec_perf_tests to desktop and android perf test suites
Followed instructions in https://webrtc.googlesource.com/src/+/refs/heads/main/g3doc/add-new-test-binary.md

Bug: webrtc:14852
Change-Id: I4cdc7d55270de7b24723a89b8e3bb0d392d0e788
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305600
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40118}
2023-05-23 12:13:29 +00:00
Danil Chapovalov
0c85f733c9 For AV1, disable error resilience on upper temporal layers
Error resilience is no longer required for upper temporal layers.
Disabling error resilience on the upper layers leads to a ~2% PSNR BD-rate gain.

Reland of https://webrtc-review.googlesource.com/c/src/+/302001

Bug: webrtc:15106
Change-Id: I72ca9d504a7848dda934cbd52669027061742256
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305782
Reviewed-by: Jerome Jiang <jianj@google.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/main@{#40099}
2023-05-22 08:14:08 +00:00
Erik Språng
20bede7cc7 Clean up dead code in vp9 encoder wrapper
Bug: None
Change-Id: Ic99af40e95c5d82db9b4b5624eae3103d0a11c55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304286
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40027}
2023-05-09 12:47:25 +00:00
Sergey Silkin
691b447c53 Fix returns from IsSameSettings and IsSameRate in codec tests
Swap true/false.

Bug: webrtc:14852
Change-Id: Id82c0180d33bfc4e5237f4800c3e89fe8d17693f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302381
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39917}
2023-04-21 11:29:32 +00:00
Jeremy Leconte
67f2109544 Revert "For AV1, disable error resilience on upper temporal layers. Error resilience is no longer required for upper temporal layers. Disabling error resilience on the upper layers leads to a ~2% PSNR BD-rate gain."
This reverts commit 2080dacfb7.

Reason for revert: This CL is causing a lot of flakiness on iOS bots
https://ci.chromium.org/p/webrtc/builders/ci/iOS%20Debug%20%28simulator%29

Original change's description:
> For AV1, disable error resilience on upper temporal layers. Error resilience is no longer required for upper temporal layers. Disabling error resilience on the upper layers leads to a ~2% PSNR BD-rate gain.
>
> Bug: webrtc:15106
> Change-Id: Id92d51defbd26c1a77e3c9fe19607e9db4a3e7c1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302001
> Reviewed-by: Marco Paniconi <marpan@webrtc.org>
> Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39900}

Bug: webrtc:15106
Change-Id: I24515280113ed6681c9766026ec24d689035c031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301983
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39903}
2023-04-20 09:24:52 +00:00
Jared Siskin
c018bae807 Format /modules
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^modules/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Jared Siskin <jtsiskin@meta.com>
Cr-Commit-Position: refs/heads/main@{#39901}
2023-04-20 02:02:45 +00:00
Michael Horowitz
2080dacfb7 For AV1, disable error resilience on upper temporal layers. Error resilience is no longer required for upper temporal layers. Disabling error resilience on the upper layers leads to a ~2% PSNR BD-rate gain.
Bug: webrtc:15106
Change-Id: Id92d51defbd26c1a77e3c9fe19607e9db4a3e7c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302001
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39900}
2023-04-20 00:17:45 +00:00
Sergey Silkin
26d1b26277 Log metrics even if test failed
Set of codecs for testing is hardcoded to AV1, VP8, VP9, H264, H265. Some codecs may not be available due to lack of support on the platform or due to some issue in our code which would be a regression. Reporting zero metrics for failed tests would allow the perf tool to detect such a regression.

This also enables codec tests by default. The tests should not run on bots since video_codec_perf_tests binary is not included in any test suits yet.

Bug: webrtc:14852
Change-Id: I967160069055036f93e595d328c4d5f1ca483be9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300868
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39840}
2023-04-13 08:49:37 +00:00
Sergey Silkin
b4a45546b7 Dedicated build target for video codec perf tests
Bug: webrtc:14852
Change-Id: Ib56ef931b58058a7d09b97b7013ba39ee1767629
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300740
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39823}
2023-04-12 11:24:48 +00:00
Yu-Chen (Eric) Sun
35f2b89ee4 Fix the issue 15059: wrong libaom initialized target bitrate
Fix Issue 15059: The target bitrate was mistakenly set to be the maximal

bitrate when initializing the libaom encoder.

Bug: webrtc:15059
Change-Id: I38498d4cce7b0a9c26736d9f1096178dd2e1fef6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300004
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39822}
2023-04-12 10:42:58 +00:00
Sergey Silkin
ebb5383fd8 Dump codec input
Add functionality for dumping encoder and decoder input to file in video codec test.

Bug: b/261160916, webrtc:14852
Change-Id: I49a84a886d87903c601cf5c35bd723b6393c2a75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298051
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39626}
2023-03-21 16:54:19 +00:00
Åsa Persson
014b244fa0 Keep SVC max bitrate if number of spatial layers are reduced.
Bug: chromium:1423361
Change-Id: I02bcb11f2ac456db79ed835dd38d4d7621a49608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298446
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39614}
2023-03-21 12:00:17 +00:00
Sergey Silkin
aa17f2f0a9 Add Initialize() to Encoder/Decoder API in video codec tester
Initialization of Android HW codecs takes hundreds milliseconds. Exclude this time from frame processing time of first frame by initializing codecs before starting encoding/decoding.

Bug: b/261160916, webrtc:14852
Change-Id: I9ec84c6b12c1d9821b59965cf521170224066563
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298304
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39613}
2023-03-21 08:04:48 +00:00
Sergey Silkin
12669513d2 Use internal codec factories directly
BuiltinVideoEncoderFactory, which was used before, has been started to use SEA since https://webrtc-review.googlesource.com/c/src/+/297740. SEA requires factory lifetime to be ~same as created codec lifetime. Codec test doesn't guarantee this currently.

Bug: b/261160916, webrtc:14852
Change-Id: I75ef99f1c9fe0d7823f31fd07c05a3ca52f7212d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298201
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39600}
2023-03-20 10:33:40 +00:00
Sergey Silkin
0af2bc639a Add H265 to VideoCodecMimeType
This enables testing HW H265 codecs on devices where the support is available.

Bug: b/261160916, webrtc:14852
Change-Id: I32d102fcf483ea4ba46d6f5161342dbb584e7cc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298040
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39591}
2023-03-17 15:28:11 +00:00
Wan-Teh Chang
ad192a8c5e Remove extraneous opening parenthesis in comment
Bug: None
Change-Id: I8f1939caa43a7eb48dc5a6276520b39429062b30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298000
Auto-Submit: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#39587}
2023-03-17 14:31:15 +00:00
Sergey Silkin
82e8a7fdca Fix frame rate scaling in video codec tests
Swap numerator and denominator values.

Bug: b/261160916, webrtc:14852
Change-Id: Id1fa81ac8e13513005a53b7034f1d38bb1602c2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297960
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39581}
2023-03-16 17:13:59 +00:00
Wan-Teh Chang
8f29b42670 Validate encoder_settings_.qpMax
libaom uses the quantizer as an index for an array of size 64, so
encoder_settings_.qpMax must be <= 63.

Add a comment to LibaomAv1Encoder::SetSvcParams() to explain why the
method doesn't initialize svc_params.layer_target_bitrate.

Bug: None
Change-Id: I26be80de005752214365abbe8b9b32dc976cee0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293680
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#39572}
2023-03-16 02:57:44 +00:00
Sergey Silkin
a5f32e445c Set frame capture timestamp
Unlike SW encoder wrappers, Android HW encoder wrapper uses frame capture timestamp instead of RTP timestamp: https://source.corp.google.com/piper///depot/google3/third_party/webrtc/files/stable/webrtc/sdk/android/src/jni/video_frame.cc;rcl=514125748;l=309

Bug: b/261160916, webrtc:14852
Change-Id: Ief76abae659f7ba890371901cc9b505526ac4f97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296500
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39495}
2023-03-07 13:56:14 +00:00
Sergey Silkin
1c1382be0f Dump codec output to ivf/y4m
Bug: b/261160916, webrtc:14852
Change-Id: I19de2210aa03b56752db5ce8b6fd94498123d6f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39490}
2023-03-07 08:33:39 +00:00