Skip to content

Commit

Permalink
[Decode] Fix gen to gen build issue
Browse files Browse the repository at this point in the history
build issue fix
  • Loading branch information
yawenyan authored and intel-mediadev committed Jul 6, 2023
1 parent 919d398 commit c8bb006
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 10 deletions.
2 changes: 0 additions & 2 deletions media_driver/linux/common/codec/ddi/media_ddi_decode_av1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include "media_libva_decoder.h"
#include "media_libva_util.h"

#include "media_ddi_decode_const_g12.h"
#include "media_ddi_decode_av1.h"
#include "mos_solo_generic.h"
#include "codechal_memdecomp.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2020, Intel Corporation
* Copyright (c) 2016-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -32,7 +32,7 @@
#ifndef _MEDIA_LIBVA_DECODE_CONST_G12_H_
#define _MEDIA_LIBVA_DECODE_CONST_G12_H_

#define DECODE_ID_HEVC_G12 "VIDEO_DEC_HEVC_G12"
#define DECODE_ID_HEVC_REXT "DECODE_ID_HEVC_REXT"
#define DECODE_ID_AV1 "VIDEO_DEC_AV1"

#endif /* _MEDIA_LIBVA_DECODE_CONST_G12_H_ */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2020, Intel Corporation
* Copyright (c) 2015-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -1132,4 +1132,4 @@ bool DdiDecodeHEVCG12::IsSccProfile()
extern template class MediaDdiFactory<DdiMediaDecode, DDI_DECODE_CONFIG_ATTR>;

static bool hevcRegistered =
MediaDdiFactory<DdiMediaDecode, DDI_DECODE_CONFIG_ATTR>::RegisterCodec<DdiDecodeHEVCG12>(DECODE_ID_HEVC_G12);
MediaDdiFactory<DdiMediaDecode, DDI_DECODE_CONFIG_ATTR>::RegisterCodec<DdiDecodeHEVCG12>(DECODE_ID_HEVC_REXT);
4 changes: 2 additions & 2 deletions media_driver/linux/gen12/ddi/media_libva_caps_g12.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2021, Intel Corporation
* Copyright (c) 2018-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -288,7 +288,7 @@ std::string MediaLibvaCapsG12::GetDecodeCodecKey(VAProfile profile)
case VAProfileHEVCSccMain10:
case VAProfileHEVCSccMain444:
case VAProfileHEVCSccMain444_10:
return DECODE_ID_HEVC_G12;
return DECODE_ID_HEVC_REXT;
case VAProfileVC1Simple:
case VAProfileVC1Main:
case VAProfileVC1Advanced:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
//!
//! \file media_ddi_decode_const_xe_m_plus.h
//! \brief Add some const string definition for media_libva_decoder
//!

// The defined const string is used as the Key for supported decoding codec list. And
// it is included by each decoding codec.
// And it is also included in media_libva_decoder.c. The corresponding string is used
// as the key to search and create one instance from the supported decoding list.

#ifndef _MEDIA_LIBVA_DECODE_CONST_XE_M_PLUS_H_
#define _MEDIA_LIBVA_DECODE_CONST_XE_M_PLUS_H_

#define DECODE_ID_HEVC_REXT "DECODE_ID_HEVC_REXT"
#define DECODE_ID_AV1 "VIDEO_DEC_AV1"

#endif /* _MEDIA_LIBVA_DECODE_CONST_XE_M_PLUS_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "codec_def_encode_av1.h"
#include "codec_def_common.h"
#include "media_ddi_decode_const.h"
#include "media_ddi_decode_const_g12.h"
#include "media_ddi_decode_const_xe_m_plus.h"
#include "media_ddi_encode_const.h"
#include "drm_fourcc.h"

Expand Down Expand Up @@ -348,7 +348,7 @@ std::string MediaLibvaCapsMtlBase::GetDecodeCodecKey(VAProfile profile)
case VAProfileHEVCSccMain10:
case VAProfileHEVCSccMain444:
case VAProfileHEVCSccMain444_10:
return DECODE_ID_HEVC_G12;
return DECODE_ID_HEVC_REXT;
case VAProfileAV1Profile0:
case VAProfileAV1Profile1:
return DECODE_ID_AV1;
Expand Down

0 comments on commit c8bb006

Please sign in to comment.