<div dir="ltr"><div dir="ltr">This patch has been pushed to the master branch. <br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"></div></div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><b>__________________________</b></div><div><b>Karam Singh</b></div><div><b>Ph.D. IIT Guwahati</b></div><div><font size="1">Senior Software (Video Coding) Engineer </font></div><div><font size="1">Mobile: +91 8011279030</font></div><div><font size="1">Block 9A, 6th floor, DLF Cyber City</font></div><div><font size="1">Manapakkam, Chennai 600 089</font></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 27, 2024 at 12:50 PM Pavan Tarun Chakka Venkata <<a href="mailto:pavan.tarun@multicorewareinc.com">pavan.tarun@multicorewareinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">From 2fcc6d99fdce96d518b905cb16b0c5f59821d289 Mon Sep 17 00:00:00 2001<br>From: PavanTarun <<a href="mailto:pavan.tarun@multicorewareinc.com" target="_blank">pavan.tarun@multicorewareinc.com</a>><br>Date: Tue, 17 Sep 2024 18:52:36 +0530<br>Subject: [PATCH] Removed unused variable<br><br>---<br> source/encoder/api.cpp | 20 +++++++++++---------<br> source/x265.h | 2 +-<br> 2 files changed, 12 insertions(+), 10 deletions(-)<br><br>diff --git a/source/encoder/api.cpp b/source/encoder/api.cpp<br>index 2a96c2044..cd17f4154 100644<br>--- a/source/encoder/api.cpp<br>+++ b/source/encoder/api.cpp<br>@@ -2129,6 +2129,7 @@ fail_or_end:<br> double x265_calculate_vmafscore(x265_param *param, x265_vmaf_data *data)<br> {<br> double score;<br>+ const char* pix_format;<br> <br> data->width = param->sourceWidth;<br> data->height = param->sourceHeight;<br>@@ -2139,22 +2140,22 @@ double x265_calculate_vmafscore(x265_param *param, x265_vmaf_data *data)<br> if ((param->sourceWidth * param->sourceHeight) % 2 != 0)<br> x265_log(NULL, X265_LOG_ERROR, "Invalid file size\n");<br> data->offset = param->sourceWidth * param->sourceHeight / 2;<br>- vcd->format = "yuv420p";<br>+ pix_format = "yuv420p";<br> }<br> else if (param->internalCsp == X265_CSP_I422)<br> {<br> data->offset = param->sourceWidth * param->sourceHeight;<br>- vcd->format = "yuv422p10le";<br>+ pix_format = "yuv422p10le";<br> }<br> else if (param->internalCsp == X265_CSP_I444)<br> {<br> data->offset = param->sourceWidth * param->sourceHeight * 2;<br>- vcd->format = "yuv444p10le";<br>+ pix_format = "yuv444p10le";<br> }<br> else<br> x265_log(NULL, X265_LOG_ERROR, "Invalid format\n");<br> <br>- compute_vmaf(&score, vcd->format, data->width, data->height, param->sourceBitDepth, read_frame, data, vcd->model_path, vcd->log_path, vcd->log_fmt, vcd->disable_clip, vcd->disable_avx, vcd->enable_transform, vcd->phone_model, vcd->psnr, vcd->ssim, vcd->ms_ssim, vcd->pool, vcd->thread, vcd->subsample);<br>+ compute_vmaf(&score, (char*)pix_format, data->width, data->height, param->sourceBitDepth, read_frame, data, vcd->model_path, vcd->log_path, vcd->log_fmt, vcd->disable_clip, vcd->disable_avx, vcd->enable_transform, vcd->phone_model, vcd->psnr, vcd->ssim, vcd->ms_ssim, vcd->pool, vcd->thread, vcd->subsample);<br> <br> return score;<br> }<br>@@ -2250,21 +2251,22 @@ int read_frame_8bit(float *reference_data, float *distorted_data, float *temp_da<br> double x265_calculate_vmaf_framelevelscore(x265_param *param, x265_vmaf_framedata *vmafframedata)<br> {<br> double score;<br>+ const char* pix_format;<br> <br> if (param->internalCsp == X265_CSP_I420)<br>- vcd->format = "yuv420p";<br>+ pix_format = "yuv420p";<br> else if (param->internalCsp == X265_CSP_I422)<br>- vcd->format = "yuv422p10le";<br>+ pix_format = "yuv422p10le";<br> else<br>- vcd->format = "yuv444p10le";<br>+ pix_format = "yuv444p10le";<br> <br> int (*read_frame)(float *reference_data, float *distorted_data, float *temp_data,<br>- int stride, void *s);<br>+ int stride, void *s);<br> if (vmafframedata->internalBitDepth == 8)<br> read_frame = read_frame_8bit;<br> else<br> read_frame = read_frame_10bit;<br>- compute_vmaf(&score, vcd->format, vmafframedata->width, vmafframedata->height, param->sourceBitDepth, read_frame, vmafframedata, vcd->model_path, vcd->log_path, vcd->log_fmt, vcd->disable_clip, vcd->disable_avx, vcd->enable_transform, vcd->phone_model, vcd->psnr, vcd->ssim, vcd->ms_ssim, vcd->pool, vcd->thread, vcd->subsample);<br>+ compute_vmaf(&score, (char*)pix_format, vmafframedata->width, vmafframedata->height, param->sourceBitDepth, read_frame, vmafframedata, vcd->model_path, vcd->log_path, vcd->log_fmt, vcd->disable_clip, vcd->disable_avx, vcd->enable_transform, vcd->phone_model, vcd->psnr, vcd->ssim, vcd->ms_ssim, vcd->pool, vcd->thread, vcd->subsample);<br> <br> return score;<br> }<br>diff --git a/source/x265.h b/source/x265.h<br>index 08ccb4b74..2404cd3c0 100644<br>--- a/source/x265.h<br>+++ b/source/x265.h<br>@@ -802,7 +802,7 @@ typedef struct x265_vmaf_commondata<br> int subsample;<br> }x265_vmaf_commondata;<br> <br>-static x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.json", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1} };<br>+static const x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.json", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1} };<br> <br> typedef struct x265_temporal_layer {<br> int poc_offset; /* POC offset */<br>-- <br>2.41.0.windows.1<br><br></div></div>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div>