[x265] [PATCH] Fix encoder crash with histogram scenecut

Snehaa Giridharan snehaa at multicorewareinc.com
Mon Nov 21 07:19:48 UTC 2022


>From 64c3ecbe4080658b5c1b13db4a689ecf5461bb79 Mon Sep 17 00:00:00 2001
From: Snehaa Giridharan <snehaa at multicorewareinc.com>
Date: Thu, 10 Nov 2022 16:59:20 +0530
Subject: [PATCH] Fix encoder crash with histogram scenecut

---
 source/encoder/slicetype.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp
index 5a1500716..78977bed8 100644
--- a/source/encoder/slicetype.cpp
+++ b/source/encoder/slicetype.cpp
@@ -2864,7 +2864,7 @@ bool Lookahead::histBasedScenecut(Lowres **frames,
int p0, int p1, int numFrames
             if (frames[cp1 + 1]->bHistScenecutAnalyzed == true)
                 continue;

-            if (detectHistBasedSceneChange(frames, cp1, cp1 + 1, cp1 + 2))
+            if (frames[cp1 + 2] != NULL &&
detectHistBasedSceneChange(frames, cp1, cp1 + 1, cp1 + 2))
             {
                 /* If current frame is a Scenecut from p0 frame as well as
Scenecut from
                  * preceeding frame, mark it as a Scenecut */
-- 
2.37.2.windows.2

*Thanks and Regards,*





*Snehaa.GVideo Codec Engineer,Media & AI analytics
<https://multicorewareinc.com/>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20221121/a0be7aa0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_crash.diff
Type: application/octet-stream
Size: 1055 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20221121/a0be7aa0/attachment.obj>


More information about the x265-devel mailing list