vl: reorder H264 profiles

Submitted by Zhang, Boyuan on Sept. 25, 2018, 10:11 p.m.

Details

Message ID 20180925221152.7018-1-boyuan.zhang@amd.com
State New
Headers show
Series "vl: reorder H264 profiles" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhang, Boyuan Sept. 25, 2018, 10:11 p.m.
From: Boyuan Zhang <boyuan.zhang@amd.com>

Fix the wrong h264 profiles order. Previously, the constrained baseline was
added in between baseline and main profiles, which breaked the logic in
radeon/vce when converting from pipe_video_profile to profile_idc

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
---
 src/gallium/include/pipe/p_video_enums.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h
index b5b8b06228..260f47ea8a 100644
--- a/src/gallium/include/pipe/p_video_enums.h
+++ b/src/gallium/include/pipe/p_video_enums.h
@@ -55,8 +55,8 @@  enum pipe_video_profile
    PIPE_VIDEO_PROFILE_VC1_SIMPLE,
    PIPE_VIDEO_PROFILE_VC1_MAIN,
    PIPE_VIDEO_PROFILE_VC1_ADVANCED,
-   PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,
    PIPE_VIDEO_PROFILE_MPEG4_AVC_CONSTRAINED_BASELINE,
+   PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,
    PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN,
    PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED,
    PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,

Comments

Am 26.09.2018 um 00:11 schrieb boyuan.zhang@amd.com:
> From: Boyuan Zhang <boyuan.zhang@amd.com>
>
> Fix the wrong h264 profiles order. Previously, the constrained baseline was
> added in between baseline and main profiles, which breaked the logic in
> radeon/vce when converting from pipe_video_profile to profile_idc

I think it would be better to use a switch/case in radeon/vce or even 
better make a helper function which converts between 
PIPE_VIDEO_PROFILE_MPEG4_AVC_* and the profile_idc from the specification.

Christian.

>
> Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
> ---
>   src/gallium/include/pipe/p_video_enums.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h
> index b5b8b06228..260f47ea8a 100644
> --- a/src/gallium/include/pipe/p_video_enums.h
> +++ b/src/gallium/include/pipe/p_video_enums.h
> @@ -55,8 +55,8 @@ enum pipe_video_profile
>      PIPE_VIDEO_PROFILE_VC1_SIMPLE,
>      PIPE_VIDEO_PROFILE_VC1_MAIN,
>      PIPE_VIDEO_PROFILE_VC1_ADVANCED,
> -   PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,
>      PIPE_VIDEO_PROFILE_MPEG4_AVC_CONSTRAINED_BASELINE,
> +   PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,
>      PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN,
>      PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED,
>      PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,
Yes, I was thinking either using a switch helper function or doing this 1 line change since there will be no more profile to be added.

But no problem, I agree that using switch helper function is a safer way.

New patch just sent.

Regards,
Boyuan


-----Original Message-----
From: Christian K├Ânig <ckoenig.leichtzumerken@gmail.com> 

Sent: September 26, 2018 4:05 AM
To: Zhang, Boyuan <Boyuan.Zhang@amd.com>; mesa-dev@lists.freedesktop.org
Subject: Re: [PATCH] vl: reorder H264 profiles

Am 26.09.2018 um 00:11 schrieb boyuan.zhang@amd.com:
> From: Boyuan Zhang <boyuan.zhang@amd.com>

>

> Fix the wrong h264 profiles order. Previously, the constrained 

> baseline was added in between baseline and main profiles, which 

> breaked the logic in radeon/vce when converting from 

> pipe_video_profile to profile_idc


I think it would be better to use a switch/case in radeon/vce or even better make a helper function which converts between
PIPE_VIDEO_PROFILE_MPEG4_AVC_* and the profile_idc from the specification.

Christian.

>

> Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>

> ---

>   src/gallium/include/pipe/p_video_enums.h | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/src/gallium/include/pipe/p_video_enums.h 

> b/src/gallium/include/pipe/p_video_enums.h

> index b5b8b06228..260f47ea8a 100644

> --- a/src/gallium/include/pipe/p_video_enums.h

> +++ b/src/gallium/include/pipe/p_video_enums.h

> @@ -55,8 +55,8 @@ enum pipe_video_profile

>      PIPE_VIDEO_PROFILE_VC1_SIMPLE,

>      PIPE_VIDEO_PROFILE_VC1_MAIN,

>      PIPE_VIDEO_PROFILE_VC1_ADVANCED,

> -   PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,

>      PIPE_VIDEO_PROFILE_MPEG4_AVC_CONSTRAINED_BASELINE,

> +   PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,

>      PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN,

>      PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED,

>      PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,