Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/hevcpred_template.c')
-rw-r--r--libavcodec/hevcpred_template.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/libavcodec/hevcpred_template.c b/libavcodec/hevcpred_template.c
index 27f4b9eed1..86097234f3 100644
--- a/libavcodec/hevcpred_template.c
+++ b/libavcodec/hevcpred_template.c
@@ -1,30 +1,28 @@
/*
- * HEVC video decoder
+ * HEVC video Decoder
*
* Copyright (C) 2012 - 2013 Guillaume Martres
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/pixdesc.h"
-
-#include "hevc.h"
-
#include "bit_depth_template.c"
+#include "hevcpred.h"
#define POS(x, y) src[(x) + stride * (y)]
@@ -67,7 +65,7 @@ static void FUNC(intra_pred)(HEVCContext *s, int x0, int y0, int log2_size, int
for (i = (start); i < (start) + (length); i++) \
if (!IS_INTRA(-1, i)) \
ptr[i] = ptr[i - 1]
- HEVCLocalContext *lc = &s->HEVClc;
+ HEVCLocalContext *lc = s->HEVClc;
int i;
int hshift = s->sps->hshift[c_idx];
int vshift = s->sps->vshift[c_idx];
@@ -293,11 +291,25 @@ static void FUNC(intra_pred)(HEVCContext *s, int x0, int y0, int log2_size, int
top[-1] = left[-1];
+#undef EXTEND_LEFT_CIP
+#undef EXTEND_RIGHT_CIP
+#undef EXTEND_UP_CIP
+#undef EXTEND_DOWN_CIP
+#undef IS_INTRA
+#undef MVF_PU
+#undef MVF
+#undef PU
+#undef EXTEND_LEFT
+#undef EXTEND_RIGHT
+#undef EXTEND_UP
+#undef EXTEND_DOWN
+#undef MIN_TB_ADDR_ZS
+
// Filtering process
if (c_idx == 0 && mode != INTRA_DC && size != 4) {
int intra_hor_ver_dist_thresh[] = { 7, 1, 0 };
- int min_dist_vert_hor = FFMIN(FFABS((int)mode - 26),
- FFABS((int)mode - 10));
+ int min_dist_vert_hor = FFMIN(FFABS((int)(mode - 26U)),
+ FFABS((int)(mode - 10U)));
if (min_dist_vert_hor > intra_hor_ver_dist_thresh[log2_size - 3]) {
int threshold = 1 << (BIT_DEPTH - 5);
if (s->sps->sps_strong_intra_smoothing_enable_flag &&
@@ -478,8 +490,9 @@ static av_always_inline void FUNC(pred_angular)(uint8_t *_src,
fact * ref[x + idx + 2] + 16) >> 5;
}
} else {
- for (x = 0; x < size; x++)
+ for (x = 0; x < size; x++) {
POS(x, y) = ref[x + idx + 1];
+ }
}
}
if (mode == 26 && c_idx == 0 && size < 32) {
@@ -505,8 +518,9 @@ static av_always_inline void FUNC(pred_angular)(uint8_t *_src,
fact * ref[y + idx + 2] + 16) >> 5;
}
} else {
- for (y = 0; y < size; y++)
+ for (y = 0; y < size; y++) {
POS(x, y) = ref[y + idx + 1];
+ }
}
}
if (mode == 10 && c_idx == 0 && size < 32) {
@@ -543,18 +557,4 @@ static void FUNC(pred_angular_3)(uint8_t *src, const uint8_t *top,
{
FUNC(pred_angular)(src, top, left, stride, c_idx, mode, 1 << 5);
}
-
-#undef EXTEND_LEFT_CIP
-#undef EXTEND_RIGHT_CIP
-#undef EXTEND_UP_CIP
-#undef EXTEND_DOWN_CIP
-#undef IS_INTRA
-#undef MVF_PU
-#undef MVF
-#undef PU
-#undef EXTEND_LEFT
-#undef EXTEND_RIGHT
-#undef EXTEND_UP
-#undef EXTEND_DOWN
-#undef MIN_TB_ADDR_ZS
#undef POS