Commit Graph

33 Commits

Author SHA1 Message Date
charles bloom
9529396e69 BmpImageWrapper hardening
also fix several cases where bmp image data was imported wrong

#jira UE-166510
#preflight 63460910b757820b7aa5855c
#rb fabian.giesen
#lockdown jeanmichel.dignard

[CL 22480931 by charles bloom in ue5-main branch]
2022-10-12 12:52:09 -04:00
fabian giesen
910404ad86 HdrImageWrapper major cleanups and validation fixes
1. Fix header parsing to check for actual header termination (blank line)
2. Header lines are only ever terminated by LF, never CR. Treat NUL as error.
3. The only supported pixel layout is -Y <Height> +X (the default). Require that explicitly.
4. Require that widths and heights be positive and enforce a maximum image size
5. Fix several potential integer overflows
6. Fix several potential out-of-bounds reads/writes
7. Don't cast possibly unaligned uint8 pointers to FColor*
8. Fix potential UB when shift amount in old RLE encoding gets large
9. Don't allow runs as first thing in an old-RLE scan line, since they want to repeat the prev pixel
10. Factor out a lot of the error handling code, make sure error messages get logged
11. Fix several typos while I'm here

#jira UE-166514
#jira UE-166515
#jira UE-166516
#jira UE-166551
#preflight 6345d5bef93be0f634181cb9

[CL 22479168 by fabian giesen in ue5-main branch]
2022-10-12 11:19:42 -04:00
charles bloom
5db1898a6b ImageWrapper.h check format set in GetRaw to Array
could be invalid if SetCompressed failed

#rb none
#preflight none

[CL 22376193 by charles bloom in ue5-main branch]
2022-10-06 11:04:37 -04:00
Bryan sefcik
b4a6e947d8 Ran IWYU on Public headers under Engine/Source/Runtime/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065896 by bryan.sefcik
#preflight 62d4b1a5a6141b6adfb0c892
#jira

#ROBOMERGE-OWNER: Bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
#ROBOMERGE-CONFLICT from-shelf

[CL 21181076 by Bryan sefcik in ue5-main branch]
2022-07-20 11:31:36 -04:00
charles bloom
65e8951b66 remove imagewrapper srgb todo notes and comment to clarify existing behavior
#rb none
#preflight 62421591292f228e09d5a8b1

[CL 19532530 by charles bloom in ue5-main branch]
2022-03-28 16:18:22 -04:00
charles bloom
bbc36d4e36 ImageWrapper clean up duplicate variables
remove unsupported row stride and check it is tight packed as expected

#preflight 6241c305a67e4e1ab71ea308
#rb none
#fyi julien.stjean

[CL 19527833 by charles bloom in ue5-main branch]
2022-03-28 11:20:27 -04:00
charles bloom
2dc533f46d DDS image wrapper
allows load/save of only 2d DDS images through the generic imagewrappers apis
can be used with screenshot to dds output for example

#preflight 623cd55d9f11d3c7394618e6
#rb fabian.giesen

[CL 19502395 by charles bloom in ue5-main branch]
2022-03-24 16:47:03 -04:00
charles bloom
25bc80811e ImageWrapper: remove unused animation frame functions
were marked deprecated in previous commit

#rb none
#preflight none

[CL 19407262 by charles bloom in ue5-main branch]
2022-03-16 12:32:59 -04:00
charles bloom
04ffabc485 ImageWrapper and import/export refactor
FImage is now the standard preferred type for a bag of pixels
FImageView can point at pixels without owning an allocation
ERawImageFormat (FImage) converts to ETextureSourceFormat
FImageUtils provides generic load/save and get/set from FImage
major cleanup in the ImageWrappers
new preferred API is through ImageWrapperModule Compress/Decompress
SetRaw/GetRaw functions cleaned up to not have undefined behavior on unexpected formats
ImageWrapper output added for HDR,BMP,TGA
RGBA32F format added and supported throughout import/export
EditorFactories import/export made more generic, most image types handled the same way using FImage now
Deprecate old TSF RGBA order pixel formats
Fix many crashes or bad handling of unusual pixel formats
Pixel access functions should be used instead of switches on pixel type

#preflight 6230ade7e65a7e65d68a187c
#rb julien.stjean,martins.mozeiko,dan.thompson,fabian.giesen

[CL 19397199 by charles bloom in ue5-main branch]
2022-03-15 18:29:37 -04:00
marc audy
6553e6cd0a Remove as much C++ deprecation as possible up to 4.17 (along with a few scattered removals from beyond)
#preflight 61eefc77ba69a4fdb220bf23

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18712765 in //UE5/Release-5.0/... via CL 18712784 via CL 18713147
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18713191 by marc audy in ue5-main branch]
2022-01-24 15:07:48 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
zahra nikbakht
8f27bfa7f6 - Custom thumbnail for Widget blueprints #RB patrick.boutot #jira ue-118803
#preflight 610a9c562b002800016b5e53

#ROBOMERGE-SOURCE: CL 17052085 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v850-17047176)

[CL 17052094 by zahra nikbakht in ue5-release-engine-test branch]
2021-08-04 11:18:57 -04:00
julien stjean
2934025ddc Making the reimport of a texture by interchange thread safe.
Changed the texture payloads so that they use the new unique buffer.
Refactored the blocked texture payload and the UDIM translator to support the new payload.
Added some functions to the FTextureSource so that it can receive a FSharedBuffer instead of copying the data into the payload.
Removed the const requirement from the UInterchangeFactoryBase main functions. It was needed so that I can store the texture payload in the function CreateAsset and then consume it in the function PreImportPreCompletedCallback. Also reporting messages in the factory does affect the state of the factory.
The Interface IImageWrapper has a new function to get the raw data into an ArrayView. For now the interface provides a default implementation but I would like to make it abstract when all the existing wrapper will have an implementation for it.

#jira UETOOL-3834
#rb Alexis.Matte
#preflight 610877d603d30300010f7840

#ROBOMERGE-SOURCE: CL 17023158 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v839-17012307)

[CL 17023172 by julien stjean in ue5-release-engine-test branch]
2021-08-02 19:46:33 -04:00
charles bloom
4106e8423a Add OodlePNGz0 option for Texture asset compression
fix handling of Uncompressed Quality in JPEG image wrapper

#rb dan.thompson

#ROBOMERGE-SOURCE: CL 17020407 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v839-17012307)

[CL 17020411 by charles bloom in ue5-release-engine-test branch]
2021-08-02 16:50:21 -04:00
alexander suvorov
9283f3f96e Add full support for 32-bit float EXR image channels.
#rb Julien.StJean, charles.bloom

[CL 16454318 by alexander suvorov in ue5-main branch]
2021-05-25 15:01:03 -04:00
Julien StJean
50693382d9 Moving HDR loader from runtime engine to imagewrapper.
Adding support of hdr to interchange those are now imported as standart 2d Texture.

#jira UETOOL-3244
#rb Alexis.Matte

[CL 16347572 by Julien StJean in ue5-main branch]
2021-05-17 08:44:27 -04:00
Zousar Shaker
6d8788c3a9 Avoid having the ImageWrapper module depend on CoreUObject so that it can be used from standalone texture build workers that don't want to link to CoreUObject.
#rb ben.ingram

[CL 16197645 by Zousar Shaker in ue5-main branch]
2021-05-04 15:06:57 -04:00
Julien StJean
547c7f160d Optimisation to the legacy texture import and improvement to texture wrapper
Minor change to FImageWrapperBase. GetRaw and GetCompressed now consume the array with the same name instead of having to do a copy of it.
I changed the api IImageWrapper::GetCompressed to return a TArray64<uint8> instead of returning a const TArray64<uint8>&.
Added the format RGBAF to the struct ERGBFormat. Changed the engine code using the EXR image wrapper to reflect that.
The EXR image wrapper now avoid doing an unessary copy of the compressed image when calling compress.

Improvement to the performence of the function UTextureFactory::ImportImage. We now use the magic bytes of the file for certains format to skip some tests.

Here is some performance metrics I captured on my desktop (6 core, 12 threads XEON)

Importing a folder of tiff files (22 files, 4.16 GB Total)
Before: 66.152738 seconds
After: 43.609245 seconds

#jira UEENT-3822
#rb Alexis.Matte

[CL 16128765 by Julien StJean in ue5-main branch]
2021-04-27 11:59:02 -04:00
julien stjean
8f3c505895 Mirgrated the fix for VLN-1183 into UE5 EA.
#jira VLN-1183
#rb trivial
[FYI] Alexis.Matte

#ROBOMERGE-SOURCE: CL 15623903 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15623925 by julien stjean in ue5-main branch]
2021-03-05 10:16:59 -04:00
JeanMichel Dignard
f1a4cfa4a3 Add TGA translator to Interchange import
#rb Alexis.Matte

[CL 14201075 by JeanMichel Dignard in ue5-main branch]
2020-08-27 13:07:16 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
Rolando Caloca
bbb9564388 Copying //UE4/Dev-RenderPlat-Staging@11110326 to //UE4/Main
#rb none
#rnx

[CL 11110369 by Rolando Caloca in Main branch]
2020-01-24 18:07:01 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
JeanMichel Dignard
0f9ad96858 Copying //UE4/Dev-Enterprise @ cl 6890376 to Dev-Main (//UE4/Dev-Main)
#lockdown nick.penwarden
#rb none

[CL 6890764 by JeanMichel Dignard in Main branch]
2019-06-07 11:22:52 -04:00
Josh Adams
d0bf843c9c - Merging Dev-Kairos/Engine/... to Main/Engine/...
- Brings over the necessary engine changes for embedding UE4 mobile as a dylib/so in native mobile app
- Various changes for facial animation, screen recording, others
- ARKit and ARCore plugins were removed, as deemed "not ready"
#rb many people


#ROBOMERGE-OWNER: josh.adams
#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 5201138 via CL 5203024

[CL 5226277 by Josh Adams in Main branch]
2019-02-27 11:57:17 -05:00