private static bool IsPotentialFalseHit(IResultNode resultNode)
        {
            if (resultNode.Length < 0x200)
            {
                return(true);
            }

            var firstMacroblockInSlice = resultNode.FindAttributeByName(FirstMacroblockInSliceName);

            if (firstMacroblockInSlice == null)
            {
                return(true);
            }

            var pictureParamaterSetId = resultNode.FindAttributeByName(PictureParameterSetIdName);

            if (pictureParamaterSetId == null)
            {
                return(true);
            }

            var sliceType = resultNode.FindAttributeByName(SliceTypeName);

            if (sliceType == null)
            {
                return(true);
            }

            return(H264Utils.ComputeFalseHitLikelihoodScore((uint)firstMacroblockInSlice.Value, (uint)pictureParamaterSetId.Value, (SliceType)(int)sliceType.Value) >= 1);
        }
Example #2
0
        private static bool IsFalseHit(uint firstMacroblockInSlice, SliceType sliceType, uint pictureParamaterSetId)
        {
            int falseHitLikelihood = H264Utils.ComputeFalseHitLikelihoodScore(firstMacroblockInSlice, pictureParamaterSetId, sliceType);

            return(falseHitLikelihood > 1);
        }