118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org/*
218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org *
418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org *  Use of this source code is governed by a BSD-style license
518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org *  that can be found in the LICENSE file in the root of the source
618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org *  tree. An additional intellectual property rights grant can be found
718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org *  in the file PATENTS.  All contributing project authors may
818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org *  be found in the AUTHORS file in the root of the source tree.
918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org */
1018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
1118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org#include "testing/gtest/include/gtest/gtest.h"
1218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org#include "webrtc/common_types.h"
1318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
1418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.orgnamespace webrtc {
1518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
1618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org// Builds VP8 codec with 0 simulcast streams.
1718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.orgvoid BuildVP8Codec(webrtc::VideoCodec* video_codec) {
1818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecType = kVideoCodecVP8;
1918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  strncpy(video_codec->plName, "VP8", 4);
2018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->plType = 100;
2118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->width = 1280;
2218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->height = 720;
2318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
2418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->startBitrate = 1000;  // kbps
2518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->maxBitrate = 2000;  // kbps
2618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->minBitrate = 1000;  // kbps
2718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->maxFramerate = 30;
2818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
2918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->qpMax = 50;
3018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->numberOfSimulcastStreams = 0;
3118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->mode = kRealtimeVideo;
3218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
3318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Set VP8 codec specific info.
3418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.pictureLossIndicationOn = true;
3518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.feedbackModeOn = true;
3618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.complexity = kComplexityNormal;
3718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.resilience = kResilienceOff;
3818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.numberOfTemporalLayers = 0;
3918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.denoisingOn = true;
4018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.errorConcealmentOn = true;
4118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.automaticResizeOn = true;
4218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.frameDroppingOn = true;
4318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->codecSpecific.VP8.keyFrameInterval = 200;
4418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org}
4518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
4618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
4718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.orgvoid SetSimulcastSettings(webrtc::VideoCodec* video_codec) {
4818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Simulcast settings.
4918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->numberOfSimulcastStreams = 1;
5018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->simulcastStream[0].width = 320;
5118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->simulcastStream[0].height = 180;
5218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->simulcastStream[0].numberOfTemporalLayers = 0;
5318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->simulcastStream[0].maxBitrate = 100;
5418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->simulcastStream[0].targetBitrate = 100;
5518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->simulcastStream[0].minBitrate = 0;
5618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  video_codec->simulcastStream[0].qpMax = video_codec->qpMax;
5718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org}
5818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
5918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
6018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org// This test compares two VideoCodecInst objects except codec specific and
6118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org// simulcast streams.
6218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.orgTEST(ViECodecTest, TestCompareCodecs) {
632a0cbfcbdeae0a1a2bd9571242091d95f42468f9mallinath@webrtc.org  VideoCodec codec1, codec2;
6418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  memset(&codec1, 0, sizeof(VideoCodec));
6518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  memset(&codec2, 0, sizeof(VideoCodec));
6618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
6718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec1);
6818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
6918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
7018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_TRUE(codec1 == codec2);
7118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 != codec2);
7218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
7318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // plname is case insensitive.
7418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  strncpy(codec2.plName, "vp8", 4);
7518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_TRUE(codec1 == codec2);
7618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
7718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecType = kVideoCodecUnknown;
7818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
7918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
8018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Modify pltype.
8118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
8218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.plType = 101;
8318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
8418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
8518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Modifing height and width.
8618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
8718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.width = 640;
8818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.height = 480;
8918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
9018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
9118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Modify framerate, default value is 30.
9218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
9318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.maxFramerate = 15;
9418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
9518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
9618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Modifying startBitrate, default value is 1000 kbps.
9718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
9818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.startBitrate = 2000;
9918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
10018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // maxBitrate
10118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
10218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.startBitrate = 3000;
10318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
10418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // minBirate
10518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
10618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.startBitrate = 500;
10718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
10818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
10918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Modify qpMax.
11018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
11118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.qpMax = 100;
11218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
11318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
11418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Modify mode
11518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
11618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.mode = kScreensharing;
11718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
11818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org}
11918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
12018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org// Test VP8 specific comparision.
12118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.orgTEST(ViECodecTest, TestCompareVP8CodecSpecific) {
1222a0cbfcbdeae0a1a2bd9571242091d95f42468f9mallinath@webrtc.org  VideoCodec codec1, codec2;
12318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  memset(&codec1, 0, sizeof(VideoCodec));
12418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  memset(&codec2, 0, sizeof(VideoCodec));
12518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
12618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec1);
12718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
12818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_TRUE(codec1 == codec2);
12918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
13018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // pictureLossIndicationOn
13118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.pictureLossIndicationOn = false;
13218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
13318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
13418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // feedbackModeOn
13518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
13618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.feedbackModeOn = false;
13718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
13818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
13918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // complexity
14018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
14118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.complexity = kComplexityHigh;
14218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
14318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
14418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // resilience
14518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
14618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.resilience = kResilientStream;
14718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
14818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
14918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // numberOfTemporalLayers
15018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
15118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.numberOfTemporalLayers = 2;
15218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
15318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
15418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // denoisingOn
15518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
15618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.denoisingOn = false;
15718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
15818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
15918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // errorConcealmentOn
16018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
16118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.errorConcealmentOn = false;
16218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
16318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
16418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // pictureLossIndicationOn
16518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
16618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.automaticResizeOn = false;
16718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
16818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
16918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // frameDroppingOn
17018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
17118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.frameDroppingOn = false;
17218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
17318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
17418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // keyFrameInterval
17518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
17618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.codecSpecific.VP8.keyFrameInterval = 100;
17718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
17818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org}
17918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
18018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org// This test compares simulcast stream information in VideoCodec.
18118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.orgTEST(ViECodecTest, TestCompareSimulcastStreams) {
1822a0cbfcbdeae0a1a2bd9571242091d95f42468f9mallinath@webrtc.org  VideoCodec codec1, codec2;
18318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  memset(&codec1, 0, sizeof(VideoCodec));
18418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  memset(&codec2, 0, sizeof(VideoCodec));
18518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
18618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec1);
18718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  BuildVP8Codec(&codec2);
18818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Set simulacast settings.
18918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  SetSimulcastSettings(&codec1);
19018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  SetSimulcastSettings(&codec2);
19118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_TRUE(codec1 == codec2);
19218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
19318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Modify number of streams.
19418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.numberOfSimulcastStreams = 2;
19518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
19618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
19718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Resetting steram count.
19818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.numberOfSimulcastStreams = 1;
19918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // Modify height and width in codec2.
20018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.simulcastStream[0].width = 640;
20118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.simulcastStream[0].height = 480;
20218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
20318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
20418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // numberOfTemporalLayers
20518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  SetSimulcastSettings(&codec2);
20618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.simulcastStream[0].numberOfTemporalLayers = 2;
20718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
20818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
20918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // maxBitrate
21018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  SetSimulcastSettings(&codec2);
21118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.simulcastStream[0].maxBitrate = 1000;
21218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
21318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
21418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // targetBitrate
21518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  SetSimulcastSettings(&codec2);
21618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.simulcastStream[0].targetBitrate = 1000;
21718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
21818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
21918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // minBitrate
22018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  SetSimulcastSettings(&codec2);
22118c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.simulcastStream[0].minBitrate = 50;
22218c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
22318c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
22418c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  // qpMax
22518c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  SetSimulcastSettings(&codec2);
22618c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  codec2.simulcastStream[0].qpMax = 100;
22718c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org  EXPECT_FALSE(codec1 == codec2);
22818c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org}
22918c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org
23018c2945f725fa9938d182e6f6519d286c3d54dc7mallinath@webrtc.org}  // namespace webrtc
231