<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 22, 2018 at 3:09 AM, Ma0 <span dir="ltr"><<a href="mailto:mateuszb@poczta.onet.pl" target="_blank">mateuszb@poczta.onet.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Ma0 <<a href="mailto:mateuszb@poczta.onet.pl">mateuszb@poczta.onet.pl</a>><br>
# Date 1532208874 -7200<br>
# Sat Jul 21 23:34:34 2018 +0200<br>
# Node ID 6c8fd98eb258119f9282500e5bbad9<wbr>880694dc95<br>
# Parent 5d34bbf671f7ca3d721c4450703ca7<wbr>8312ade928<br>
api.cpp: move all variable initializations before first goto statement to avoid compile errors<br>
<br>
diff -r 5d34bbf671f7 -r 6c8fd98eb258 source/encoder/api.cpp<br>
--- a/source/encoder/api.cpp Fri Jul 20 14:03:53 2018 +0530<br>
+++ b/source/encoder/api.cpp Sat Jul 21 23:34:34 2018 +0200<br>
@@ -406,15 +406,14 @@<br>
void x265_alloc_analysis_data(x265_<wbr>param *param, x265_analysis_data* analysis)<br>
{<br>
X265_CHECK(analysis-><wbr>sliceType, "invalid slice type\n");<br>
- analysis->interData = NULL;<br>
- analysis->intraData = NULL;<br>
- analysis->distortionData = NULL;<br>
+ x265_analysis_inter_data *interData = analysis->interData = NULL;<br>
+ x265_analysis_intra_data *intraData = analysis->intraData = NULL;<br>
+ x265_analysis_distortion_data *distortionData = analysis->distortionData = NULL;<br>
bool isVbv = param->rc.vbvMaxBitrate > 0 && param->rc.vbvBufferSize > 0;<br>
int numDir = 2; //irrespective of P or B slices set direction as 2<br>
uint32_t numPlanes = param->internalCsp == X265_CSP_I400 ? 1 : 3;<br>
<br>
//Allocate memory for distortionData pointer<br>
- x265_analysis_distortion_data *distortionData = analysis->distortionData;<br>
CHECKED_MALLOC_ZERO(<wbr>distortionData, x265_analysis_distortion_data, 1);<br>
CHECKED_MALLOC_ZERO(<wbr>distortionData->distortion, sse_t, analysis->numPartitions * analysis->numCUsInFrame);<br>
if (param->rc.bStatRead)<br>
@@ -442,7 +441,6 @@<br>
return;<br>
<br>
//Allocate memory for intraData pointer<br>
- x265_analysis_intra_data *intraData = analysis->intraData;<br>
CHECKED_MALLOC_ZERO(intraData, x265_analysis_intra_data, 1);<br>
CHECKED_MALLOC(intraData-><wbr>depth, uint8_t, analysis->numPartitions * analysis->numCUsInFrame);<br>
CHECKED_MALLOC(intraData-><wbr>modes, uint8_t, analysis->numPartitions * analysis->numCUsInFrame);<br>
@@ -451,7 +449,6 @@<br>
analysis->intraData = intraData;<br>
<br>
//Allocate memory for interData pointer based on ReuseLevels<br>
- x265_analysis_inter_data *interData = analysis->interData;<br>
CHECKED_MALLOC_ZERO(interData, x265_analysis_inter_data, 1);<br>
CHECKED_MALLOC(interData-><wbr>depth, uint8_t, analysis->numPartitions * analysis->numCUsInFrame);<br>
CHECKED_MALLOC(interData-><wbr>modes, uint8_t, analysis->numPartitions * analysis->numCUsInFrame);<br>
______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
</blockquote></div><br></div><div class="gmail_extra">Pushed to default.</div></div>