diff mbox

[FFmpeg-devel,1/4] lavc/h2645_parse: log more HEVC NAL type.

Message ID 1526015513-17475-1-git-send-email-mypopydev@gmail.com
State Superseded
Headers show

Commit Message

Jun Zhao May 11, 2018, 5:11 a.m. UTC
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
 libavcodec/h2645_parse.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Mark Thompson May 11, 2018, 9:46 a.m. UTC | #1
On 11/05/18 06:11, Jun Zhao wrote:
> Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> ---
>  libavcodec/h2645_parse.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
> index dbf2435..ec25c1e 100644
> --- a/libavcodec/h2645_parse.c
> +++ b/libavcodec/h2645_parse.c
> @@ -158,12 +158,28 @@ static const char *nal_unit_name(int nal_type)
>      case HEVC_NAL_RADL_R     : return "RADL_R";
>      case HEVC_NAL_RASL_N     : return "RASL_N";
>      case HEVC_NAL_RASL_R     : return "RASL_R";
> +    case HEVC_NAL_VCL_N10    : return "VCL_N10";
> +    case HEVC_NAL_VCL_R11    : return "VCL_R11";
> +    case HEVC_NAL_VCL_N12    : return "VCL_N12";
> +    case HEVC_NAL_VCL_R13    : return "VLC_R13";
> +    case HEVC_NAL_VCL_N14    : return "VCL_N14";
> +    case HEVC_NAL_VCL_R15    : return "VCL_R15";
>      case HEVC_NAL_BLA_W_LP   : return "BLA_W_LP";
>      case HEVC_NAL_BLA_W_RADL : return "BLA_W_RADL";
>      case HEVC_NAL_BLA_N_LP   : return "BLA_N_LP";
>      case HEVC_NAL_IDR_W_RADL : return "IDR_W_RADL";
>      case HEVC_NAL_IDR_N_LP   : return "IDR_N_LP";
>      case HEVC_NAL_CRA_NUT    : return "CRA_NUT";
> +    case HEVC_NAL_IRAP_VCL22 : return "IRAP_VCL22";
> +    case HEVC_NAL_IRAP_VCL23 : return "IRAP_VCL23";
> +    case HEVC_NAL_RSV_VCL24  : return "RSV_VCL24";
> +    case HEVC_NAL_RSV_VCL25  : return "RSV_VCL25";
> +    case HEVC_NAL_RSV_VCL26  : return "RSV_VCL26";
> +    case HEVC_NAL_RSV_VCL27  : return "RSV_VCL27";
> +    case HEVC_NAL_RSV_VCL28  : return "RSV_VCL28";
> +    case HEVC_NAL_RSV_VCL29  : return "RSV_VCL29";
> +    case HEVC_NAL_RSV_VCL30  : return "RSV_VCL30";
> +    case HEVC_NAL_RSV_VCL31  : return "RSV_VCL31";
>      case HEVC_NAL_VPS        : return "VPS";
>      case HEVC_NAL_SPS        : return "SPS";
>      case HEVC_NAL_PPS        : return "PPS";
> 

Given that it now covers all values 0-40, maybe turning it into a table rather than a switch would be nicer?

LGTM either way.

Thanks,

- Mark
diff mbox

Patch

diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index dbf2435..ec25c1e 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -158,12 +158,28 @@  static const char *nal_unit_name(int nal_type)
     case HEVC_NAL_RADL_R     : return "RADL_R";
     case HEVC_NAL_RASL_N     : return "RASL_N";
     case HEVC_NAL_RASL_R     : return "RASL_R";
+    case HEVC_NAL_VCL_N10    : return "VCL_N10";
+    case HEVC_NAL_VCL_R11    : return "VCL_R11";
+    case HEVC_NAL_VCL_N12    : return "VCL_N12";
+    case HEVC_NAL_VCL_R13    : return "VLC_R13";
+    case HEVC_NAL_VCL_N14    : return "VCL_N14";
+    case HEVC_NAL_VCL_R15    : return "VCL_R15";
     case HEVC_NAL_BLA_W_LP   : return "BLA_W_LP";
     case HEVC_NAL_BLA_W_RADL : return "BLA_W_RADL";
     case HEVC_NAL_BLA_N_LP   : return "BLA_N_LP";
     case HEVC_NAL_IDR_W_RADL : return "IDR_W_RADL";
     case HEVC_NAL_IDR_N_LP   : return "IDR_N_LP";
     case HEVC_NAL_CRA_NUT    : return "CRA_NUT";
+    case HEVC_NAL_IRAP_VCL22 : return "IRAP_VCL22";
+    case HEVC_NAL_IRAP_VCL23 : return "IRAP_VCL23";
+    case HEVC_NAL_RSV_VCL24  : return "RSV_VCL24";
+    case HEVC_NAL_RSV_VCL25  : return "RSV_VCL25";
+    case HEVC_NAL_RSV_VCL26  : return "RSV_VCL26";
+    case HEVC_NAL_RSV_VCL27  : return "RSV_VCL27";
+    case HEVC_NAL_RSV_VCL28  : return "RSV_VCL28";
+    case HEVC_NAL_RSV_VCL29  : return "RSV_VCL29";
+    case HEVC_NAL_RSV_VCL30  : return "RSV_VCL30";
+    case HEVC_NAL_RSV_VCL31  : return "RSV_VCL31";
     case HEVC_NAL_VPS        : return "VPS";
     case HEVC_NAL_SPS        : return "SPS";
     case HEVC_NAL_PPS        : return "PPS";