[x265] [PATCH] Removed unused variable
Karam Singh
karam.singh at multicorewareinc.com
Mon Sep 30 08:19:57 UTC 2024
This patch has been pushed to the master branch.
*__________________________*
*Karam Singh*
*Ph.D. IIT Guwahati*
Senior Software (Video Coding) Engineer
Mobile: +91 8011279030
Block 9A, 6th floor, DLF Cyber City
Manapakkam, Chennai 600 089
On Fri, Sep 27, 2024 at 12:50 PM Pavan Tarun Chakka Venkata <
pavan.tarun at multicorewareinc.com> wrote:
> From 2fcc6d99fdce96d518b905cb16b0c5f59821d289 Mon Sep 17 00:00:00 2001
> From: PavanTarun <pavan.tarun at multicorewareinc.com>
> Date: Tue, 17 Sep 2024 18:52:36 +0530
> Subject: [PATCH] Removed unused variable
>
> ---
> source/encoder/api.cpp | 20 +++++++++++---------
> source/x265.h | 2 +-
> 2 files changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/source/encoder/api.cpp b/source/encoder/api.cpp
> index 2a96c2044..cd17f4154 100644
> --- a/source/encoder/api.cpp
> +++ b/source/encoder/api.cpp
> @@ -2129,6 +2129,7 @@ fail_or_end:
> double x265_calculate_vmafscore(x265_param *param, x265_vmaf_data *data)
> {
> double score;
> + const char* pix_format;
>
> data->width = param->sourceWidth;
> data->height = param->sourceHeight;
> @@ -2139,22 +2140,22 @@ double x265_calculate_vmafscore(x265_param *param,
> x265_vmaf_data *data)
> if ((param->sourceWidth * param->sourceHeight) % 2 != 0)
> x265_log(NULL, X265_LOG_ERROR, "Invalid file size\n");
> data->offset = param->sourceWidth * param->sourceHeight / 2;
> - vcd->format = "yuv420p";
> + pix_format = "yuv420p";
> }
> else if (param->internalCsp == X265_CSP_I422)
> {
> data->offset = param->sourceWidth * param->sourceHeight;
> - vcd->format = "yuv422p10le";
> + pix_format = "yuv422p10le";
> }
> else if (param->internalCsp == X265_CSP_I444)
> {
> data->offset = param->sourceWidth * param->sourceHeight * 2;
> - vcd->format = "yuv444p10le";
> + pix_format = "yuv444p10le";
> }
> else
> x265_log(NULL, X265_LOG_ERROR, "Invalid format\n");
>
> - 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);
> + 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);
>
> return score;
> }
> @@ -2250,21 +2251,22 @@ int read_frame_8bit(float *reference_data, float
> *distorted_data, float *temp_da
> double x265_calculate_vmaf_framelevelscore(x265_param *param,
> x265_vmaf_framedata *vmafframedata)
> {
> double score;
> + const char* pix_format;
>
> if (param->internalCsp == X265_CSP_I420)
> - vcd->format = "yuv420p";
> + pix_format = "yuv420p";
> else if (param->internalCsp == X265_CSP_I422)
> - vcd->format = "yuv422p10le";
> + pix_format = "yuv422p10le";
> else
> - vcd->format = "yuv444p10le";
> + pix_format = "yuv444p10le";
>
> int (*read_frame)(float *reference_data, float *distorted_data, float
> *temp_data,
> - int stride, void *s);
> + int stride, void *s);
> if (vmafframedata->internalBitDepth == 8)
> read_frame = read_frame_8bit;
> else
> read_frame = read_frame_10bit;
> - 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);
> + 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);
>
> return score;
> }
> diff --git a/source/x265.h b/source/x265.h
> index 08ccb4b74..2404cd3c0 100644
> --- a/source/x265.h
> +++ b/source/x265.h
> @@ -802,7 +802,7 @@ typedef struct x265_vmaf_commondata
> int subsample;
> }x265_vmaf_commondata;
>
> -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} };
> +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} };
>
> typedef struct x265_temporal_layer {
> int poc_offset; /* POC offset */
> --
> 2.41.0.windows.1
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240930/83e27099/attachment.htm>
More information about the x265-devel
mailing list