[x265] [PATCH] fix bug in scaling list
Deepthi Nandakumar
deepthi at multicorewareinc.com
Fri Mar 18 13:03:23 CET 2016
Looks good, except that the user ID is set incorrectly. Please correct and
resend.
On Fri, Mar 18, 2016 at 5:23 PM, <vignesh at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Kavitha Sampath <kavitha at multicorewareinc.com>
> # Date 1458043301 -19800
> # Tue Mar 15 17:31:41 2016 +0530
> # Node ID a1df28310b965075109a1a2e7236f1793b23c905
> # Parent 4a2f94a592511afabd434fc6cf02a469b6d65091
> fix bug in scaling list
>
> diff -r 4a2f94a59251 -r a1df28310b96 source/common/scalinglist.cpp
> --- a/source/common/scalinglist.cpp Wed Mar 09 14:34:06 2016 +0530
> +++ b/source/common/scalinglist.cpp Tue Mar 15 17:31:41 2016 +0530
> @@ -57,7 +57,11 @@
> },
> {
> "INTRA32X32_LUMA",
> + "",
> + "",
> "INTER32X32_LUMA",
> + "",
> + "",
> },
> };
> const char MatrixType_DC[4][12][22] =
> @@ -76,7 +80,11 @@
> },
> {
> "INTRA32X32_LUMA_DC",
> + "",
> + "",
> "INTER32X32_LUMA_DC",
> + "",
> + "",
> },
> };
>
> @@ -246,15 +254,15 @@
>
> char line[1024];
> int32_t *src = NULL;
> + fseek(fp, 0, 0);
>
> for (int sizeIdc = 0; sizeIdc < NUM_SIZES; sizeIdc++)
> {
> int size = X265_MIN(MAX_MATRIX_COEF_NUM,
> s_numCoefPerSize[sizeIdc]);
> - for (int listIdc = 0; listIdc < NUM_LISTS; listIdc++)
> + for (int listIdc = 0; listIdc < NUM_LISTS; listIdc += (sizeIdc
> == 3) ? 3 : 1)
> {
> src = m_scalingListCoef[sizeIdc][listIdc];
>
> - fseek(fp, 0, 0);
> do
> {
> char *ret = fgets(line, 1024, fp);
> @@ -282,7 +290,6 @@
>
> if (sizeIdc > BLOCK_8x8)
> {
> - fseek(fp, 0, 0);
> do
> {
> char *ret = fgets(line, 1024, fp);
> @@ -310,7 +317,7 @@
> fclose(fp);
>
> m_bEnabled = true;
> - m_bDataPresent = !checkDefaultScalingList();
> + m_bDataPresent = true;
>
> return false;
> }
> diff -r 4a2f94a59251 -r a1df28310b96 source/encoder/entropy.cpp
> --- a/source/encoder/entropy.cpp Wed Mar 09 14:34:06 2016 +0530
> +++ b/source/encoder/entropy.cpp Tue Mar 15 17:31:41 2016 +0530
> @@ -306,7 +306,7 @@
> {
> for (int sizeId = 0; sizeId < ScalingList::NUM_SIZES; sizeId++)
> {
> - for (int listId = 0; listId < ScalingList::NUM_LISTS; listId++)
> + for (int listId = 0; listId < ScalingList::NUM_LISTS; listId +=
> (sizeId == 3) ? 3 : 1)
> {
> int predList = scalingList.checkPredMode(sizeId, listId);
> WRITE_FLAG(predList < 0, "scaling_list_pred_mode_flag");
> @@ -334,12 +334,7 @@
> for (int i = 0; i < coefNum; i++)
> {
> data = src[scan[i]] - nextCoef;
> - nextCoef = src[scan[i]];
> - if (data > 127)
> - data = data - 256;
> - if (data < -128)
> - data = data + 256;
> -
> + nextCoef = (nextCoef + data + 256) % 256;
> WRITE_SVLC(data, "scaling_list_delta_coef");
> }
> }
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
--
Deepthi Nandakumar
Engineering Manager, x265
Multicoreware, Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160318/9544ad62/attachment.html>
More information about the x265-devel
mailing list