Skip to content

Commit

Permalink
Add max resolution for MPEG2 on Gen12
Browse files Browse the repository at this point in the history
Max resolution of MPEG2 is 2K.
assigning 2048x2048 for MPEG2 attributies

fixes: #1830
  • Loading branch information
Shao-Feng committed Jul 12, 2024
1 parent 47bae3c commit 19d91ae
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions media_driver/linux/gen12/ddi/media_libva_caps_g12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ VAStatus MediaLibvaCapsG12::GetPlatformSpecificAttrib(VAProfile profile,
{
*value = CODEC_4K_MAX_PIC_WIDTH;
}
else if(IsMpeg2Profile(profile))
{
*value = CODEC_2K_MAX_PIC_WIDTH;
}
else
{
*value = CODEC_MAX_PIC_WIDTH;
Expand All @@ -490,6 +494,10 @@ VAStatus MediaLibvaCapsG12::GetPlatformSpecificAttrib(VAProfile profile,
{
*value = CODEC_4K_MAX_PIC_HEIGHT;
}
else if(IsMpeg2Profile(profile))
{
*value = CODEC_2K_MAX_PIC_HEIGHT;
}
else
{
*value = CODEC_MAX_PIC_HEIGHT;
Expand Down Expand Up @@ -2356,7 +2364,7 @@ VAStatus MediaLibvaCapsG12::CreateDecAttributes(
{
attrib.value = ENCODE_JPEG_MAX_PIC_WIDTH;
}
if(IsVc1Profile(profile))
if(IsVc1Profile(profile) || IsMpeg2Profile(profile))
{
attrib.value = CODEC_2K_MAX_PIC_WIDTH;
}
Expand All @@ -2380,7 +2388,7 @@ VAStatus MediaLibvaCapsG12::CreateDecAttributes(
{
attrib.value = ENCODE_JPEG_MAX_PIC_HEIGHT;
}
if(IsVc1Profile(profile))
if(IsVc1Profile(profile) || IsMpeg2Profile(profile))
{
attrib.value = CODEC_2K_MAX_PIC_HEIGHT;
}
Expand Down

0 comments on commit 19d91ae

Please sign in to comment.