Skip to content

Commit 36aedb3

Browse files
committed
Bug 1963852 - Vendor libwebrtc from ecde63eab5
Upstream commit: https://webrtc.googlesource.com/src/+/ecde63eab5b643e9d84220b8a50208b4cd8ad866 Do not crop to render resolution by default Disable cropping to render resolution by default. This functionality was added in https://webrtc-review.googlesource.com/c/src/+/381340 and https://webrtc-review.googlesource.com/c/src/+/382241 and was enabled by default to make things work with HW encoders which use render resolution to signal cropping. After discussions with AV1 folks the consensus is that encoders should not use render resolution to signal crop. Currently there is no way to signal crop in AV1 bitstream. There is a proposal for adding this info to AV1 metadata: AOMediaCodec/av1-spec#346. Bug: webrtc:405341160, b:402019802, b:405299912 Change-Id: I9cff9f2f8e7c9b8933fd0fbb100ce37221eaf084 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/382640 Reviewed-by: Danil Chapovalov <danilchapwebrtc.org> Commit-Queue: Sergey Silkin <ssilkinwebrtc.org> Cr-Commit-Position: refs/heads/main{#44228} UltraBlame original commit: 03d8ebe4ce8f1794a65113a7d3b05147e10be5a7
1 parent cbe1700 commit 36aedb3

File tree

4 files changed

+184
-44
lines changed

4 files changed

+184
-44
lines changed

third_party/libwebrtc/README.mozilla.last-vendor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ on
7676
-
7777
16T17
7878
:
79-
54
79+
55
8080
:
81-
26
81+
29
8282
.
83-
514856
83+
566850
8484
+
8585
00
8686
:
@@ -91,4 +91,4 @@ base
9191
of
9292
lastest
9393
vendoring
94-
0802e02aa2
94+
ecde63eab5

third_party/libwebrtc/modules/video_coding/codecs/av1/BUILD.gn

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,23 @@ video_codec_interface
325325
/
326326
api
327327
:
328+
refcountedbase
329+
"
330+
"
331+
.
332+
.
333+
/
334+
.
335+
.
336+
/
337+
.
338+
.
339+
/
340+
.
341+
.
342+
/
343+
api
344+
:
328345
scoped_refptr
329346
"
330347
"
@@ -1013,21 +1030,6 @@ test
10131030
:
10141031
test_support
10151032
"
1016-
"
1017-
/
1018-
/
1019-
third_party
1020-
/
1021-
abseil
1022-
-
1023-
cpp
1024-
/
1025-
absl
1026-
/
1027-
functional
1028-
:
1029-
any_invocable
1030-
"
10311033
]
10321034
if
10331035
(

third_party/libwebrtc/modules/video_coding/codecs/av1/dav1d_decoder.cc

Lines changed: 86 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,41 @@ algorithm
107107
>
108108
#
109109
include
110+
<
111+
cstdint
112+
>
113+
#
114+
include
115+
<
116+
memory
117+
>
118+
#
119+
include
120+
<
121+
optional
122+
>
123+
#
124+
include
125+
"
126+
api
127+
/
128+
environment
129+
/
130+
environment
131+
.
132+
h
133+
"
134+
#
135+
include
136+
"
137+
api
138+
/
139+
ref_counted_base
140+
.
141+
h
142+
"
143+
#
144+
include
110145
"
111146
api
112147
/
@@ -132,13 +167,35 @@ api
132167
/
133168
video
134169
/
170+
video_frame
171+
.
172+
h
173+
"
174+
#
175+
include
176+
"
177+
api
178+
/
179+
video
180+
/
135181
video_frame_buffer
136182
.
137183
h
138184
"
139185
#
140186
include
141187
"
188+
api
189+
/
190+
video_codecs
191+
/
192+
video_decoder
193+
.
194+
h
195+
"
196+
#
197+
include
198+
"
142199
common_video
143200
/
144201
include
@@ -182,6 +239,23 @@ include
182239
/
183240
dav1d
184241
/
242+
data
243+
.
244+
h
245+
"
246+
#
247+
include
248+
"
249+
third_party
250+
/
251+
dav1d
252+
/
253+
libdav1d
254+
/
255+
include
256+
/
257+
dav1d
258+
/
185259
dav1d
186260
.
187261
h
@@ -191,13 +265,15 @@ include
191265
"
192266
third_party
193267
/
194-
libyuv
268+
dav1d
269+
/
270+
libdav1d
195271
/
196272
include
197273
/
198-
libyuv
274+
dav1d
199275
/
200-
convert
276+
headers
201277
.
202278
h
203279
"
@@ -206,13 +282,15 @@ include
206282
"
207283
third_party
208284
/
209-
libyuv
285+
dav1d
286+
/
287+
libdav1d
210288
/
211289
include
212290
/
213-
libyuv
291+
dav1d
214292
/
215-
planar_functions
293+
picture
216294
.
217295
h
218296
"
@@ -340,7 +418,7 @@ const
340418
bool
341419
crop_to_render_resolution_
342420
=
343-
true
421+
false
344422
;
345423
}
346424
;
@@ -503,14 +581,13 @@ env
503581
:
504582
crop_to_render_resolution_
505583
(
506-
!
507584
env
508585
.
509586
field_trials
510587
(
511588
)
512589
.
513-
IsDisabled
590+
IsEnabled
514591
(
515592
"
516593
WebRTC

third_party/libwebrtc/modules/video_coding/codecs/av1/dav1d_decoder_unittest.cc

Lines changed: 77 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,17 @@ h
103103
#
104104
include
105105
<
106-
memory
106+
cstdint
107107
>
108108
#
109109
include
110110
<
111-
optional
111+
memory
112112
>
113113
#
114114
include
115115
<
116-
string
116+
optional
117117
>
118118
#
119119
include
@@ -123,17 +123,6 @@ utility
123123
#
124124
include
125125
"
126-
absl
127-
/
128-
functional
129-
/
130-
any_invocable
131-
.
132-
h
133-
"
134-
#
135-
include
136-
"
137126
api
138127
/
139128
array_view
@@ -628,14 +617,86 @@ decoded_frame_
628617
TEST
629618
(
630619
Dav1dDecoderTest
631-
CropsToRenderResolutionByDefault
620+
KeepsDecodedResolutionByDefault
621+
)
622+
{
623+
TestAv1Decoder
624+
decoder
625+
(
626+
CreateEnvironment
627+
(
628+
)
629+
)
630+
;
631+
decoder
632+
.
633+
Decode
634+
(
635+
CreateEncodedImage
636+
(
637+
kAv1FrameWith36x20EncodededAnd32x16RenderResolution
638+
)
639+
)
640+
;
641+
EXPECT_EQ
642+
(
643+
decoder
644+
.
645+
decoded_frame
646+
(
647+
)
648+
.
649+
width
650+
(
651+
)
652+
36
653+
)
654+
;
655+
EXPECT_EQ
656+
(
657+
decoder
658+
.
659+
decoded_frame
660+
(
661+
)
662+
.
663+
height
664+
(
665+
)
666+
20
667+
)
668+
;
669+
}
670+
TEST
671+
(
672+
Dav1dDecoderTest
673+
CropsToRenderResolutionWhenCropIsEnabled
632674
)
633675
{
634676
TestAv1Decoder
635677
decoder
636678
(
637679
CreateEnvironment
638680
(
681+
std
682+
:
683+
:
684+
make_unique
685+
<
686+
ExplicitKeyValueConfig
687+
>
688+
(
689+
"
690+
WebRTC
691+
-
692+
Dav1dDecoder
693+
-
694+
CropToRenderResolution
695+
/
696+
Enabled
697+
/
698+
"
699+
)
639700
)
640701
)
641702
;
@@ -681,7 +742,7 @@ height
681742
TEST
682743
(
683744
Dav1dDecoderTest
684-
KeepsDecodedResolutionWhenCropIsDisabled
745+
DoesNotCropToRenderResolutionWhenCropIsDisabled
685746
)
686747
{
687748
TestAv1Decoder

0 commit comments

Comments
 (0)