YCbCrUtils.cpp:263:22: error: ‘srcData’ was not declared in this scope; did you mean ‘aData’?
Categories
(Core :: Graphics, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox84 | --- | unaffected |
firefox85 | --- | unaffected |
firefox86 | --- | fixed |
People
(Reporter: petr.sumbera, Assigned: chunmin)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Steps to reproduce:
On Solaris SPARC (big endian) I got following build error:
g++ -std=gnu++17 -o Unified_cpp_gfx_ycbcr0.o -c -I/builds/psumbera/FIREFOX/obj-sparc64-sun-solaris2.11/dist/stl_wrappers -I/builds/psumbera/FIREFOX/obj-sparc64-sun-solaris2.11/dist/system_wrappers -include /builds/psumbera/FIREFOX/config/gcc_hidden.h -fstack-protector-strong -DDEBUG=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/psumbera/FIREFOX/gfx/ycbcr -I/builds/psumbera/FIREFOX/obj-sparc64-sun-solaris2.11/gfx/ycbcr -I/builds/psumbera/FIREFOX/media/libyuv/libyuv/include -I/builds/psumbera/FIREFOX/obj-sparc64-sun-solaris2.11/dist/include -I/builds/psumbera/FIREFOX/obj-sparc64-sun-solaris2.11/dist/include/nspr -I/builds/psumbera/FIREFOX/obj-sparc64-sun-solaris2.11/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/psumbera/FIREFOX/obj-sparc64-sun-solaris2.11/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wno-error=deprecated-copy -Wformat -Wformat-overflow=2 -Wno-psabi -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -fno-omit-frame-pointer -funwind-tables -MD -MP -MF .deps/Unified_cpp_gfx_ycbcr0.o.pp Unified_cpp_gfx_ycbcr0.cpp
In file included from Unified_cpp_gfx_ycbcr0.cpp:2:
/builds/psumbera/FIREFOX/gfx/ycbcr/YCbCrUtils.cpp: In function ‘void mozilla::gfx::ConvertYCbCrToRGB(const mozilla::layers::PlanarYCbCrData&, const mozilla::gfx::SurfaceFormat&, const IntSize&, unsigned char*, int32_t)’:
/builds/psumbera/FIREFOX/gfx/ycbcr/YCbCrUtils.cpp:263:22: error: ‘srcData’ was not declared in this scope; did you mean ‘aData’?
263 | srcData.mPicSize);
| ^~~~~~~
| aData
gmake[3]: *** [/builds/psumbera/FIREFOX/config/rules.mk:676: Unified_cpp_gfx_ycbcr0.o] Error 1
This is probably caused by: 1654462
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Comment 3•5 years ago
|
||
Following might be the resolution:
diff -r 897405be7266 gfx/ycbcr/YCbCrUtils.cpp
--- a/gfx/ycbcr/YCbCrUtils.cpp Fri Jan 24 14:52:31 2020 +0100
+++ b/gfx/ycbcr/YCbCrUtils.cpp Thu Dec 17 17:02:17 2020 +0100
@@ -247,6 +247,14 @@
yuvtype,
srcData.mYUVColorSpace);
}
+
+#if MOZ_BIG_ENDIAN()
+ // libyuv makes endian-correct result, which needs to be swapped to BGRX
+ if (aDestFormat != SurfaceFormat::R5G6B5_UINT16)
+ gfx::SwizzleData(aDestBuffer, aStride, gfx::SurfaceFormat::X8R8G8B8,
+ aDestBuffer, aStride, gfx::SurfaceFormat::B8G8R8X8,
+ srcData.mPicSize);
+#endif
}
void ConvertYCbCrToRGB(const layers::PlanarYCbCrData& aData,
@@ -255,13 +263,6 @@
int32_t aStride) {
ConvertYCbCrToRGBInternal(aData, aDestFormat, aDestSize, aDestBuffer,
aStride);
-#if MOZ_BIG_ENDIAN()
- // libyuv makes endian-correct result, which needs to be swapped to BGRX
- if (aDestFormat != SurfaceFormat::R5G6B5_UINT16)
- gfx::SwizzleData(aDestBuffer, aStride, gfx::SurfaceFormat::X8R8G8B8,
- aDestBuffer, aStride, gfx::SurfaceFormat::B8G8R8X8,
- srcData.mPicSize);
-#endif
Will see if there is anything else...
Assignee | ||
Comment 4•5 years ago
|
||
Fix a typo caused by Bug 1654462.
In Bug 1654462, we move the main logic of ConvertYCbCrToRGB
to
ConvertYCbCrToRGBInternal
and leave gfx::SwizzleData
behind.
The gfx::SwizzleData
needs a IntSize
parameter to perform the task.
However, the initial parameter is from a variable that is moved from
ConvertYCbCrToRGB
to ConvertYCbCrToRGBInternal
. The IntSize
parameter represents the picture size (PlanarYCbCrData::mPicSize
) of
the picture of the passed image data. which won't be changed after
ConvertYCbCrToRGBInternal
is performed. Therefore, we can use the
original picture size of the image data to the gfx::SwizzleData
. That
should do the same job as before.
Assignee | ||
Comment 5•5 years ago
•
|
||
Thanks for the catch!
The mistake was made here. The srcData
is moved from ConvertYCbCrToRGB
to ConvertYCbCrToRGBInternal
. Fortunately, the srcData.mPicSize
is same as aData.mPicSize
, so we can use aData.mPicSize
for gfx::SwizzleData
instead.
Updated•5 years ago
|
Comment 7•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 8•5 years ago
|
||
Set release status flags based on info from the regressing bug 1654462
Description
•