diff --git a/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw.cpp b/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw.cpp index 849acfca7e..8b83ff589d 100644 --- a/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw.cpp +++ b/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw.cpp @@ -1859,7 +1859,7 @@ namespace mfxU32 fid) { MFX_AUTO_LTRACE(MFX_TRACE_LEVEL_HOTSPOTS, "CountLeadingFF"); - mfxFrameData bitstream = { 0 }; + mfxFrameData bitstream = {}; task.m_numLeadingFF[fid] = 0; FrameLocker lock(&core, bitstream, task.m_midBit[fid]); diff --git a/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw_utils.cpp b/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw_utils.cpp index 0bdc3af8b5..8b72187b49 100644 --- a/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw_utils.cpp +++ b/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw_utils.cpp @@ -1,15 +1,15 @@ // Copyright (c) 2018 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 @@ -1424,7 +1424,7 @@ mfxU8 LookAheadBrc2::GetQp(const BRCFrameParams& par) brcprintf("\r%4d: do=%4d type=%c Rt=%7.3f-%7.3f curc=%4d numc=%2d ", m_laData[0].encOrder, m_laData[0].poc/2, GetFrameTypeLetter(par.FrameType), m_targetRateMin, m_targetRateMax, m_laData[0].interCost / m_totNumMb, mfxU32(m_laData.size())); - + mfxF64 totalEstRate[52] = { 0.0 }; for (mfxU32 qp = 0; qp < 52; qp++) @@ -1598,7 +1598,7 @@ mfxU32 LookAheadBrc2::Report(const BRCFrameParams& par , mfxU32 dataLength, mfxU if (m_AvgBitrate) m_AvgBitrate->UpdateSlidingWindow(8 * dataLength, par.EncodedOrder, m_skipped>0, (par.FrameType & MFX_FRAMETYPE_I)!=0, par.NumRecode, qp); - + m_framesBehind++; m_bitsBehind += realRatePerMb; mfxF64 framesBeyond = (mfxF64)(MFX_MAX(2, m_laData.size()) - 1 - m_first); @@ -3085,7 +3085,7 @@ void MfxHwH264Encode::FastCopyBufferSys2Vid(void * dstVid, void const * srcSys, assert(sts == MFX_ERR_NONE); sts; - + } void CyclicTaskPool::Init(mfxU32 size) @@ -3957,7 +3957,7 @@ mfxStatus MfxHwH264Encode::CopyBitstream(VideoCORE & core, mfxU8 * bsData, mfxU32 bsSizeAvail) { - mfxFrameData bitstream = { 0 }; + mfxFrameData bitstream = {}; FrameLocker lock(&core, bitstream, task.m_midBit[fieldId]); MFX_CHECK(video.Protected == 0 || task.m_notProtected, MFX_ERR_UNDEFINED_BEHAVIOR); @@ -4327,7 +4327,7 @@ mfxStatus MfxHwH264Encode::CorrectSliceInfo(DdiTask & task, mfxU32 MaxSliceWei { if (task.m_SliceInfo.size() == 0) return MFX_ERR_NONE; - SliceStructInfo new_info[256] = {0}; + SliceStructInfo new_info[256] = {}; mfxU32 new_slice = 0; mfxU32 curMB = 0; mfxU32 old_slice = 0; @@ -4387,9 +4387,9 @@ mfxStatus MfxHwH264Encode::CorrectSliceInfoForsed(DdiTask & task, mfxU32 widthLa if (!freeSlisesMax) return MFX_ERR_NONE; - mfxU32 bigSlices[256] ={0}; + mfxU32 bigSlices[256] = {}; mfxU32 numBigSlices = 0; - SliceStructInfo new_info[256] = {0}; + SliceStructInfo new_info[256] = {}; mfxU32 widthMB = task.m_yuv->Info.Width/16; mfxU32 heightMB = task.m_yuv->Info.Height/16; diff --git a/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw_utils_new.cpp b/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw_utils_new.cpp index 4863f8c40f..6fc5bc933c 100644 --- a/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw_utils_new.cpp +++ b/_studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw_utils_new.cpp @@ -2452,13 +2452,13 @@ mfxStatus MfxHwH264Encode::CodeAsSkipFrame( VideoCORE & core, sts = core.GetFrameHDL(task.m_midRaw, &task.m_handleRaw.first); MFX_CHECK_STS(sts); } - + if (task.GetFrameType() & MFX_FRAMETYPE_I) { - mfxFrameData curr = { 0 }; + mfxFrameData curr = {}; curr.MemId = task.m_midRaw; - FrameLocker lock1(&core, curr, task.m_midRaw); + FrameLocker lock1(&core, curr, task.m_midRaw); mfxU32 size = curr.Pitch*video.mfx.FrameInfo.Height; memset(curr.Y, 0, size); @@ -2478,8 +2478,8 @@ mfxStatus MfxHwH264Encode::CodeAsSkipFrame( VideoCORE & core, if (task.GetFrameType() & MFX_FRAMETYPE_P) { DpbFrame& refFrame = task.m_dpb[0][task.m_list0[0][0] & 127]; - mfxFrameData curr = { 0 }; - mfxFrameData ref = { 0 }; + mfxFrameData curr = {}; + mfxFrameData ref = {}; curr.MemId = task.m_midRaw; ref.MemId = refFrame.m_midRec; @@ -2491,7 +2491,7 @@ mfxStatus MfxHwH264Encode::CodeAsSkipFrame( VideoCORE & core, if (task.GetFrameType() & MFX_FRAMETYPE_B) { task.m_ctrl.SkipFrame = 1; - } + } return sts; } diff --git a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp index cda1f9ccb0..febc52e446 100644 --- a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp +++ b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp @@ -1,15 +1,15 @@ -// Copyright (c) 2017 Intel Corporation -// +// Copyright (c) 2017-2018 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 @@ -1078,7 +1078,7 @@ mfxStatus MFXVideoENCODEMJPEG_HW::TaskRoutineSubmitFrame( // WA for RGB swapping issue if (enc.m_vParam.mfx.FrameInfo.FourCC == MFX_FOURCC_RGB4) { - mfxFrameData dstSurf = { 0 }; + mfxFrameData dstSurf = {}; bool bExternalFrameLocked = false; if(enc.m_pCore->GetVAType() == MFX_HW_VAAPI ) @@ -1091,8 +1091,8 @@ mfxStatus MFXVideoENCODEMJPEG_HW::TaskRoutineSubmitFrame( bExternalFrameLocked = true; } MFX_CHECK(nativeSurf->Data.B != 0, MFX_ERR_LOCK_MEMORY); - - + + const int dstOrder[3] = {2, 1, 0}; mfxSize roi = {nativeSurf->Info.Width, nativeSurf->Info.Height}; mfxSize setroi = {nativeSurf->Info.Width*4, nativeSurf->Info.Height}; @@ -1107,7 +1107,7 @@ mfxStatus MFXVideoENCODEMJPEG_HW::TaskRoutineSubmitFrame( dstSurf.R, dstPitch, roi, dstOrder); MFX_CHECK(res, MFX_ERR_UNDEFINED_BEHAVIOR); - + if (bExternalFrameLocked) { sts = enc.m_pCore->UnlockExternalFrame(nativeSurf->Data.MemId, &nativeSurf->Data); @@ -1126,7 +1126,7 @@ mfxStatus MFXVideoENCODEMJPEG_HW::TaskRoutineSubmitFrame( dst.Data = dstSurf; src_memtype = (mfxU16)((nativeSurf->Data.B == 0)?MFX_MEMTYPE_DXVA2_DECODER_TARGET:MFX_MEMTYPE_SYSTEM_MEMORY); src_memtype |= enc.m_isOpaqIn? MFX_MEMTYPE_INTERNAL_FRAME: MFX_MEMTYPE_EXTERNAL_FRAME; - sts = enc.m_pCore->DoFastCopyWrapper(&dst,MFX_MEMTYPE_DXVA2_DECODER_TARGET|MFX_MEMTYPE_INTERNAL_FRAME,nativeSurf, + sts = enc.m_pCore->DoFastCopyWrapper(&dst,MFX_MEMTYPE_DXVA2_DECODER_TARGET|MFX_MEMTYPE_INTERNAL_FRAME,nativeSurf, src_memtype); MFX_CHECK_STS(sts); } diff --git a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp index af140dfe9e..7b9de0c4b3 100644 --- a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp +++ b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp @@ -1,15 +1,15 @@ -// Copyright (c) 2017 Intel Corporation -// +// Copyright (c) 2017-2018 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 @@ -150,7 +150,7 @@ mfxStatus MfxHwMJpegEncode::FastCopyFrameBufferSys2Vid( ) { MFX_CHECK_NULL_PTR1(core); - mfxFrameData vidSurf = { 0 }; + mfxFrameData vidSurf = {}; mfxStatus sts = MFX_ERR_NONE; vidSurf.MemId = vidMemId; @@ -203,7 +203,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c m_app14_data.flags1H = 0; m_app14_data.flags1L = 0; m_app14_data.transform = 0; //RGB - + mfxU32 payloadSize = 16; if (m_payload_base.length + payloadSize > m_payload_base.maxLength) { diff --git a/_studio/shared/asc/include/asc_common_impl.h b/_studio/shared/asc/include/asc_common_impl.h index fbb5bd54d2..de9d237ebe 100644 --- a/_studio/shared/asc/include/asc_common_impl.h +++ b/_studio/shared/asc/include/asc_common_impl.h @@ -1,15 +1,15 @@ // Copyright (c) 2018 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 @@ -33,14 +33,14 @@ ASC_ALIGN_DECL(16) static const mfxU16 tab_twostep[8] = { }; ASC_ALIGN_DECL(16) static const mfxU16 tab_killmask[8][8] = { - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, + { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff }, }; #define _mm_loadh_epi64(a, ptr) _mm_castps_si128(_mm_loadh_pi(_mm_castsi128_ps(a), (__m64 *)(ptr))) diff --git a/_studio/shared/asc/src/motion_estimation_engine.cpp b/_studio/shared/asc/src/motion_estimation_engine.cpp index 8960da54d0..14d8bd9822 100644 --- a/_studio/shared/asc/src/motion_estimation_engine.cpp +++ b/_studio/shared/asc/src/motion_estimation_engine.cpp @@ -1,15 +1,15 @@ // Copyright (c) 2018 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 @@ -90,7 +90,7 @@ bool MVcalcSAD8x8(ASCMVector MV, pmfxU8 curY, pmfxU8 refY, ASCImDetails *dataIn, preDist = (MV.x * MV.x) + (MV.y * MV.y), _fPos = MV.x + (MV.y * dataIn->Extended_Width); pmfxU8 - fRef = &refY[_fPos]; + fRef = &refY[_fPos]; mfxU16 SAD = ME_SAD_8x8_Block(curY, fRef, dataIn->Extended_Width, dataIn->Extended_Width); if((SAD < *bestSAD) || ((SAD == *(bestSAD)) && *distance > preDist)) { @@ -105,7 +105,7 @@ bool MVcalcSAD16x8(ASCMVector MV, pmfxU8 curY, pmfxU8 refY, ASCImDetails dataIn, mfxI32 preDist = (MV.x * MV.x) + (MV.y * MV.y); pmfxU8 - fRef = refY + MV.x + (MV.y * dataIn.Extended_Width); + fRef = refY + MV.x + (MV.y * dataIn.Extended_Width); mfxU16 SAD = ME_SAD_16x8_Block(curY, fRef, dataIn.Extended_Width, dataIn.Extended_Width); if((SAD < *bestSAD) || ((SAD == *(bestSAD)) && *distance > preDist)) { @@ -221,14 +221,14 @@ alignas(16) static const mfxU16 tab_twostep[8] = { }; alignas(16) static const mfxU16 tab_killmask[8][8] = { - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, + { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff }, + { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff }, }; mfxU16 __cdecl ME_simple(ASCVidRead *videoIn, mfxI32 fPos, ASCImDetails *dataIn, ASCimageData *scale, ASCimageData *scaleRef, bool first, ASCVidData *limits, t_ME_SAD_8x8_Block_Search ME_SAD_8x8_Block_Search) { @@ -317,7 +317,7 @@ mfxU16 __cdecl ME_simple(ASCVidRead *videoIn, mfxI32 fPos, ASCImDetails *dataIn, } } } - + //Search around the best predictor (zero or Neighbor) SearchLimitsCalcSqr(xLoc, yLoc, &limitXleft, &limitXright, &limitYup, &limitYdown, dataIn, 8, current[fPos], limits);//Checks limits for +-8 ttMV = current[fPos];