]> git.sesse.net Git - vlc/commitdiff
OMX: Don't use hardcoded profile numbers
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 4 Feb 2015 10:05:44 +0000 (11:05 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 4 Feb 2015 10:10:29 +0000 (11:10 +0100)
modules/codec/omxil/omxil.c
modules/codec/omxil/utils.c

index 9bdedc5b0e79b24eeae4fe5196e6e3673eb06a31..06244bc35cca9572b8bccb025db9735177783a9e 100644 (file)
@@ -190,7 +190,7 @@ static OMX_ERRORTYPE ImplementationSpecificWorkarounds(decoder_t *p_dec,
     {
         if(p_fmt->i_cat == VIDEO_ES && def->eDir == OMX_DirInput &&
            p_fmt->i_codec == VLC_CODEC_H264 &&
-           (i_profile != 66 || i_level > 30))
+           (i_profile != PROFILE_H264_BASELINE || i_level > 30))
         {
             msg_Dbg(p_dec, "h264 profile/level not supported (0x%x, 0x%x)",
                     i_profile, i_level);
index 7f20c5854538d15ecda6607e598415339f6f8ed8..3f9501d0c3829f89f34589ec54096cc734268747 100644 (file)
@@ -37,6 +37,7 @@
 #include "omxil.h"
 #include "qcom.h"
 #include "../../video_chroma/copy.h"
+#include "../h264_nal.h"
 
 /*****************************************************************************
  * Events utility functions
@@ -1053,13 +1054,13 @@ static const struct
     size_t                   profile_idc;
 } omx_to_profile_idc[] =
 {
-    { OMX_VIDEO_AVCProfileBaseline,  66 },
-    { OMX_VIDEO_AVCProfileMain,      77 },
-    { OMX_VIDEO_AVCProfileExtended,  88 },
-    { OMX_VIDEO_AVCProfileHigh,     100 },
-    { OMX_VIDEO_AVCProfileHigh10,   110 },
-    { OMX_VIDEO_AVCProfileHigh422,  122 },
-    { OMX_VIDEO_AVCProfileHigh444,  244 },
+    { OMX_VIDEO_AVCProfileBaseline,  PROFILE_H264_BASELINE },
+    { OMX_VIDEO_AVCProfileMain,      PROFILE_H264_MAIN },
+    { OMX_VIDEO_AVCProfileExtended,  PROFILE_H264_EXTENDED },
+    { OMX_VIDEO_AVCProfileHigh,      PROFILE_H264_HIGH },
+    { OMX_VIDEO_AVCProfileHigh10,    PROFILE_H264_HIGH_10 },
+    { OMX_VIDEO_AVCProfileHigh422,   PROFILE_H264_HIGH_422 },
+    { OMX_VIDEO_AVCProfileHigh444,   PROFILE_H264_HIGH_444 },
 };
 
 size_t convert_omx_to_profile_idc(OMX_VIDEO_AVCPROFILETYPE profile_type)