Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Issue 1403893007: Adding third_party/openh264/src, build files and unittests (Closed)

Created:
5 years, 2 months ago by hbos_chromium
Modified:
5 years, 1 month ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding third_party/openh264/src, build files and unittests. Only building C++. Architecture-specific assembly code will be a different CL. --- This CL will be split up and closed for reviewability --- CL #1: https://codereview.chromium.org/1438553002/ CL #2: https://codereview.chromium.org/1446453004/ There is a CL in the WebRTC repo that adds encoder and decoder using OpenH264 (https://codereview.webrtc.org/1306813009/). It also has encoder/decoder test code, but these are in WebRTC. It is blocked on this CL, in the Chromium repo, for building OpenH264 from source. In order to test that the build file are correct here in Chromium some encoder/decoder test code is required. To simplify testing the WebRTC encoder/decoder are used, but since these have not landed yet copies of them have temporarily been added to third_party/openh264/testing/. When both CLs have landed a follow-up CL should remove the copies and rely on the WebRTC encoder/decoder. Note: In this CL (https://codereview.chromium.org/1394983003) a new unittest binary was created for OpenH264. This was a bad move due to overhead, only wanting the tests enabled if a flag was set, and it being easier and more appropriate to reuse content_unittests for our OpenH264 tests. As such this CL also removes those old test files. Note: This CL should not land unless use_openh264 is 0/false by default. COMMIT=false BUG=500605, 468365

Patch Set 1 #

Patch Set 2 : 'build_openh264' gyp flag added (temp default = 1, do not land until default = 0) #

Patch Set 3 : Removed sourceless 'openh264_api' target #

Patch Set 4 : ... #

Patch Set 5 : Merge #

Patch Set 6 : ples #

Patch Set 7 : Warning flags #

Patch Set 8 : Android defines #

Patch Set 9 : Android cpu-features dep #

Patch Set 10 : No repeated dependencies key #

Patch Set 11 : Don't use wels version of cpu-features, they're undefined #

Patch Set 12 : size_t to int static_cast #

Patch Set 13 : Disable BuildingWithOpenH264ShouldFail #

Patch Set 14 : Default VERSION_NUMBER define (fix win_chromium_compile_dbg_ng bot) #

Patch Set 15 : checklicenses.py to ignore third_party/openh264/src #

Patch Set 16 : Misc #

Total comments: 10

Patch Set 17 : -Wno-macro-redefined #

Patch Set 18 : Ignoring macro redefinition warning in MSVS #

Patch Set 19 : GN build files! :) #

Patch Set 20 : Rebase with master #

Patch Set 21 : Stop impl virtual function removed in recent rebase #

Patch Set 22 : .. #

Patch Set 23 : Documented workarounds and modified conditionals #

Patch Set 24 : No repeated 'conditions' in gyp file causing gclient runhooks problems on some bots #

Patch Set 25 : Reverted gyp changes that made it more similar to GN file, conditions/flags are not the same in gyp and gn #

Patch Set 26 : Rebase with master #

Patch Set 27 : -Wno-unused-variable only for !win (trying to fix win8_chromium_ng) #

Patch Set 28 : ??? no -Wno-unused-variable at all and it still complains whut #

Patch Set 29 : Remove -Werror... #

Patch Set 30 : -w to the rescue #

Patch Set 31 : /w for windows (win8 trybot) #

Patch Set 32 : Rebase #

Total comments: 14

Patch Set 33 : /WX- #

Patch Set 34 : 'chromium_code': 1 followed by disabling warnings #

Patch Set 35 : Same as last PS except 'chromium_code': 0 #

Patch Set 36 : chromium_code:1, msvs_settings per-target instead of target_defaults #

Patch Set 37 : chromium_code:0, msvs_disabled_warnings: 4005 #

Patch Set 38 : More msvs_disabled_warnings (ignored by win8_chromium_ng??) #

Patch Set 39 : msvs_disabled_warnings per-target instead of target_defaults (didn't help) #

Patch Set 40 : Rebase with master #

Patch Set 41 : Back to disabling individual warnings in gyp and gn #

Patch Set 42 : No -Wno-macro-redefined on windows #

Patch Set 43 : No standard cflags on windows #

Patch Set 44 : Rebase with master #

Patch Set 45 : Eureka, win8_chromium_ng is a gn bot... cleanup #

Patch Set 46 : Fix BUILD.gn for our beloved win8_chromium_ng #

Patch Set 47 : Cleanup openh264.gyp #

Patch Set 48 : Rename var to 'use_openh264', add OpenH264 to 'all' target of GN #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+2222 lines, -93 lines) Patch
M .gitignore View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 1 chunk +1 line, -0 lines 0 comments Download
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +9 lines, -1 line 0 comments Download
M DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 1 chunk +3 lines, -0 lines 0 comments Download
M build/all.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +5 lines, -1 line 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +6 lines, -0 lines 0 comments Download
M build/config/features.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +6 lines, -0 lines 0 comments Download
M build/gn_migration.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
A content/browser/media/openh264_unittests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +55 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +8 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +5 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 chunk +1 line, -1 line 0 comments Download
A third_party/openh264/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +147 lines, -0 lines 5 comments Download
M third_party/openh264/DEPS View 1 chunk +2 lines, -0 lines 0 comments Download
D third_party/openh264/LICENSE View 1 chunk +0 lines, -23 lines 0 comments Download
M third_party/openh264/OWNERS View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/openh264/README.chromium View 2 chunks +1 line, -4 lines 0 comments Download
A third_party/openh264/buildnotes.txt View 1 2 3 4 1 chunk +144 lines, -0 lines 2 comments Download
A third_party/openh264/openh264.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +301 lines, -0 lines 0 comments Download
A third_party/openh264/openh264.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +176 lines, -0 lines 0 comments Download
A third_party/openh264/openh264.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +300 lines, -0 lines 0 comments Download
A third_party/openh264/testing/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +26 lines, -0 lines 0 comments Download
A third_party/openh264/testing/h264_codec_tester.h View 1 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/openh264/testing/h264_codec_tester.cc View 1 chunk +112 lines, -0 lines 0 comments Download
A third_party/openh264/testing/h264_decoder_impl.h View 1 chunk +69 lines, -0 lines 0 comments Download
A third_party/openh264/testing/h264_decoder_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +195 lines, -0 lines 0 comments Download
A third_party/openh264/testing/h264_encoder_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +84 lines, -0 lines 0 comments Download
A third_party/openh264/testing/h264_encoder_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +397 lines, -0 lines 0 comments Download
A third_party/openh264/testing/i420_utils.h View 1 chunk +23 lines, -0 lines 0 comments Download
A third_party/openh264/testing/i420_utils.cc View 1 chunk +55 lines, -0 lines 0 comments Download
A third_party/openh264/testing/openh264_testing.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +44 lines, -0 lines 0 comments Download
D third_party/openh264/tests/BUILD.gn View 1 chunk +0 lines, -20 lines 0 comments Download
D third_party/openh264/tests/openh264_unittests.cc View 1 chunk +0 lines, -20 lines 0 comments Download
D third_party/openh264/tests/openh264_unittests.gyp View 1 chunk +0 lines, -22 lines 0 comments Download
M tools/checklicenses/checklicenses.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (11 generated)
hbos_chromium
Do you have time to take a look torbjorng? I'll think of other reviewers as ...
5 years, 1 month ago (2015-10-29 14:28:26 UTC) #7
hbos_chromium
And +phoglund as reviewer. It's not in a landable state yet (for example I need ...
5 years, 1 month ago (2015-11-02 15:06:01 UTC) #9
torbjorng
Great job, this is naturally messy to get through on all platforms! I have only ...
5 years, 1 month ago (2015-11-05 13:18:25 UTC) #12
hbos_chromium
torbjorng can you take another look? Now ignoring individual warnings, not trying not to treat ...
5 years, 1 month ago (2015-11-10 14:36:47 UTC) #13
hbos_chromium
Hmm, I'll split this up into two CLs (one removing the old test stuff and ...
5 years, 1 month ago (2015-11-10 15:59:02 UTC) #14
torbjorng
LGTM assuming this is disabled by default (for reasons pointed out in the CL). Some ...
5 years, 1 month ago (2015-11-12 11:02:02 UTC) #16
hbos_chromium
5 years, 1 month ago (2015-11-16 16:56:29 UTC) #18
Message was sent while issue was closed.
<Responding to torbjorng's comments even though this CL has been re-uploaded,
further reviewing should take place there:
https://codereview.chromium.org/1446453004/>

"I did not check gyp/gn consistency carefully. Do we build the same thing, pass
the same flags, etc?"
- The gyp/gn files are slightly different, must be because different flags are
passed by default. For example, in gyp I have to list a lot of warnings to
ignore for MSVS that I don't have to list in GN.

As for inspecting the resulting compiler flags being produced I have not looked
at this.

https://codereview.chromium.org/1403893007/diff/980001/third_party/openh264/B...
File third_party/openh264/BUILD.gn (right):

https://codereview.chromium.org/1403893007/diff/980001/third_party/openh264/B...
third_party/openh264/BUILD.gn:18: "-fvisibility=default",
I should check if this (-fvisiblity=default) is really needed because I didn't
need it in the gyp file.

https://codereview.chromium.org/1403893007/diff/980001/third_party/openh264/B...
third_party/openh264/BUILD.gn:29: # Workaround relating to the VERSION_NUMBER
macro in version.h.
On 2015/11/12 11:02:02, torbjorng wrote:
> I am not too excited about these workarounds. If is funny that you get it
> defined 0 or 2 times. In the latter case, do you know if the source is
> OpenH264's version.h for both defs?

OpenH264's version.h has include guards, it redefining the macro should be
impossible. When it's defined twice it's because the first time it is us
defining it in the build file (resulting in -DVERSION_NUMBER=... compiler flag
or similar) and the second time is due to our version.h...

Hang on a minute, if I also define the include guards of version.h then the
macro will be defined without it being redefined on #include!

https://codereview.chromium.org/1403893007/diff/980001/third_party/openh264/B...
third_party/openh264/BUILD.gn:79: configs -= [
"//build/config/compiler:chromium_code" ]
On 2015/11/12 11:02:02, torbjorng wrote:
> I am not good at gn, but perhaps the "configs" manipulation could be inherited
> from "openh264_common" (here and for encoder and decoder)?

I don't think that's possible, openh264_common is a separate target that we
depend on here, and this is a different target with its own configurations.

https://codereview.chromium.org/1403893007/diff/980001/third_party/openh264/b...
File third_party/openh264/buildnotes.txt (right):

https://codereview.chromium.org/1403893007/diff/980001/third_party/openh264/b...
third_party/openh264/buildnotes.txt:1: # Notes, just me trying to understand the
.mk files with pseudocode...
On 2015/11/12 11:02:02, torbjorng wrote:
> This file should probably be removed.

I don't include this in the reuploaded version.

Powered by Google App Engine
This is Rietveld 408576698