Commit 07461467 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

OMX: Don't use hardcoded profile numbers

parent 1fa9becf
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment