[x265] [PATCH] Dolby Vision: Move payload freeing from library to application
aruna at multicorewareinc.com
aruna at multicorewareinc.com
Mon Jan 28 07:41:05 CET 2019
# HG changeset patch
# User Aruna Matheswaran <aruna at multicorewareinc.com>
# Date 1548429257 -19800
# Fri Jan 25 20:44:17 2019 +0530
# Node ID 46b84ff665fd301e384328972d3d1312a8c74599
# Parent ae085e5cd8a2cdb161eb5bf54ba9019c3d873506
Dolby Vision: Move payload freeing from library to application.
Since the memory for rpu payload is allocated in the application, its free is
moved to application.
diff -r ae085e5cd8a2 -r 46b84ff665fd source/encoder/api.cpp
--- a/source/encoder/api.cpp Fri Jan 04 18:50:22 2019 +0530
+++ b/source/encoder/api.cpp Fri Jan 25 20:44:17 2019 +0530
@@ -635,8 +635,6 @@
void x265_picture_free(x265_picture *p)
{
- if (p->rpu.payload)
- X265_FREE(p->rpu.payload);
return x265_free(p);
}
diff -r ae085e5cd8a2 -r 46b84ff665fd source/x265.cpp
--- a/source/x265.cpp Fri Jan 04 18:50:22 2019 +0530
+++ b/source/x265.cpp Fri Jan 25 20:44:17 2019 +0530
@@ -880,6 +880,7 @@
uint32_t nal;
int16_t *errorBuf = NULL;
bool bDolbyVisionRPU = false;
+ uint8_t *rpuPayload = NULL;
int ret = 0;
@@ -899,7 +900,8 @@
if (param->dolbyProfile && cliopt.dolbyVisionRpu)
{
- pic_in->rpu.payload = X265_MALLOC(uint8_t, 1024);
+ rpuPayload = X265_MALLOC(uint8_t, 1024);
+ pic_in->rpu.payload = rpuPayload;
if (pic_in->rpu.payload)
bDolbyVisionRPU = true;
}
@@ -1060,6 +1062,7 @@
api->param_free(param);
X265_FREE(errorBuf);
+ X265_FREE(rpuPayload);
SetConsoleTitle(orgConsoleTitle);
SetThreadExecutionState(ES_CONTINUOUS);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265_clone.patch
Type: text/x-patch
Size: 1570 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190128/a0c87240/attachment.bin>
More information about the x265-devel
mailing list