Skip to content

Commit

Permalink
[Encode] XRGB force to do swizzle for AVC/HEVC
Browse files Browse the repository at this point in the history
This is to fix msdkh264enc/msdkh265enc incorrect encoded output when having BGRx input.

Signed-off-by: Cheah, Vincent Beng Keat <[email protected]>
  • Loading branch information
vcheah authored and intel-mediadev committed Nov 16, 2023
1 parent f8d5f6e commit 433068b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ class DdiEncodeAvc : public encode::DdiEncodeBase
inline bool NeedDisplayFormatSwizzle(DDI_MEDIA_SURFACE *rawSurface)
{
if (Media_Format_A8R8G8B8 == rawSurface->format ||
Media_Format_X8R8G8B8 == rawSurface->format ||
Media_Format_B10G10R10A2 == rawSurface->format)
{
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,16 @@ class DdiEncodeHevc : public encode::DdiEncodeBase
bool ret = false;

if (Media_Format_A8R8G8B8 == rawSurface->format ||
Media_Format_B10G10R10A2 == rawSurface->format)
Media_Format_X8R8G8B8 == rawSurface->format ||
Media_Format_B10G10R10A2 == rawSurface->format)
{
ret = true;
}

if (ret &&
(Media_Format_A8R8G8B8 == reconSurface->format ||
Media_Format_B10G10R10A2 == reconSurface->format))
Media_Format_X8R8G8B8 == reconSurface->format ||
Media_Format_B10G10R10A2 == reconSurface->format))
{
ret = false;
}
Expand Down

0 comments on commit 433068b

Please sign in to comment.