[FFmpeg-devel] [PATCH 1/2] avcodec/mips: build fix for MSA
shivraj.patil at imgtec.com
shivraj.patil at imgtec.com
Thu Oct 8 10:33:22 CEST 2015
From: Shivraj Patil <shivraj.patil at imgtec.com>
Modified sps and pps access from old HEVCContext(s) structure to newly introduced HEVCParamSets(ps).
Signed-off-by: Shivraj Patil <shivraj.patil at imgtec.com>
---
libavcodec/mips/hevcpred_msa.c | 282 ++++++++++++++++++++--------------------
1 file changed, 141 insertions(+), 141 deletions(-)
diff --git a/libavcodec/mips/hevcpred_msa.c b/libavcodec/mips/hevcpred_msa.c
index 5d9299f..6a3b281 100644
--- a/libavcodec/mips/hevcpred_msa.c
+++ b/libavcodec/mips/hevcpred_msa.c
@@ -1915,24 +1915,24 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
v16u8 vec0;
HEVCLocalContext *lc = s->HEVClc;
int i;
- int hshift = s->sps->hshift[c_idx];
- int vshift = s->sps->vshift[c_idx];
+ int hshift = s->ps.sps->hshift[c_idx];
+ int vshift = s->ps.sps->vshift[c_idx];
int size_in_luma_h = 16 << hshift;
- int size_in_tbs_h = size_in_luma_h >> s->sps->log2_min_tb_size;
+ int size_in_tbs_h = size_in_luma_h >> s->ps.sps->log2_min_tb_size;
int size_in_luma_v = 16 << vshift;
- int size_in_tbs_v = size_in_luma_v >> s->sps->log2_min_tb_size;
+ int size_in_tbs_v = size_in_luma_v >> s->ps.sps->log2_min_tb_size;
int x = x0 >> hshift;
int y = y0 >> vshift;
- int x_tb = (x0 >> s->sps->log2_min_tb_size) & s->sps->tb_mask;
- int y_tb = (y0 >> s->sps->log2_min_tb_size) & s->sps->tb_mask;
+ int x_tb = (x0 >> s->ps.sps->log2_min_tb_size) & s->ps.sps->tb_mask;
+ int y_tb = (y0 >> s->ps.sps->log2_min_tb_size) & s->ps.sps->tb_mask;
int cur_tb_addr =
- s->pps->min_tb_addr_zs[(y_tb) * (s->sps->tb_mask + 2) + (x_tb)];
+ s->ps.pps->min_tb_addr_zs[(y_tb) * (s->ps.sps->tb_mask + 2) + (x_tb)];
ptrdiff_t stride = s->frame->linesize[c_idx] / sizeof(uint8_t);
uint8_t *src = (uint8_t *) s->frame->data[c_idx] + x + y * stride;
- int min_pu_width = s->sps->min_pu_width;
+ int min_pu_width = s->ps.sps->min_pu_width;
enum IntraPredMode mode = c_idx ? lc->tu.intra_pred_mode_c :
lc->tu.intra_pred_mode;
@@ -1948,41 +1948,41 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
uint8_t *filtered_top = filtered_top_array + 1;
int cand_bottom_left = lc->na.cand_bottom_left
&& cur_tb_addr >
- s->pps->min_tb_addr_zs[((y_tb + size_in_tbs_v) & s->sps->tb_mask) *
- (s->sps->tb_mask + 2) + (x_tb - 1)];
+ s->ps.pps->min_tb_addr_zs[((y_tb + size_in_tbs_v) & s->ps.sps->tb_mask) *
+ (s->ps.sps->tb_mask + 2) + (x_tb - 1)];
int cand_left = lc->na.cand_left;
int cand_up_left = lc->na.cand_up_left;
int cand_up = lc->na.cand_up;
int cand_up_right = lc->na.cand_up_right
&& cur_tb_addr >
- s->pps->min_tb_addr_zs[(y_tb - 1) * (s->sps->tb_mask + 2) +
- ((x_tb + size_in_tbs_h) & s->sps->tb_mask)];
+ s->ps.pps->min_tb_addr_zs[(y_tb - 1) * (s->ps.sps->tb_mask + 2) +
+ ((x_tb + size_in_tbs_h) & s->ps.sps->tb_mask)];
int bottom_left_size =
(((y0 + 2 * size_in_luma_v) >
- (s->sps->height) ? (s->sps->height) : (y0 +
+ (s->ps.sps->height) ? (s->ps.sps->height) : (y0 +
2 * size_in_luma_v)) -
(y0 + size_in_luma_v)) >> vshift;
int top_right_size =
(((x0 + 2 * size_in_luma_h) >
- (s->sps->width) ? (s->sps->width) : (x0 + 2 * size_in_luma_h)) -
+ (s->ps.sps->width) ? (s->ps.sps->width) : (x0 + 2 * size_in_luma_h)) -
(x0 + size_in_luma_h)) >> hshift;
- if (s->pps->constrained_intra_pred_flag == 1) {
- int size_in_luma_pu_v = ((size_in_luma_v) >> s->sps->log2_min_pu_size);
- int size_in_luma_pu_h = ((size_in_luma_h) >> s->sps->log2_min_pu_size);
- int on_pu_edge_x = !(x0 & ((1 << s->sps->log2_min_pu_size) - 1));
- int on_pu_edge_y = !(y0 & ((1 << s->sps->log2_min_pu_size) - 1));
+ if (s->ps.pps->constrained_intra_pred_flag == 1) {
+ int size_in_luma_pu_v = ((size_in_luma_v) >> s->ps.sps->log2_min_pu_size);
+ int size_in_luma_pu_h = ((size_in_luma_h) >> s->ps.sps->log2_min_pu_size);
+ int on_pu_edge_x = !(x0 & ((1 << s->ps.sps->log2_min_pu_size) - 1));
+ int on_pu_edge_y = !(y0 & ((1 << s->ps.sps->log2_min_pu_size) - 1));
if (!size_in_luma_pu_h)
size_in_luma_pu_h++;
if (cand_bottom_left == 1 && on_pu_edge_x) {
- int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
+ int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
int y_bottom_pu =
- ((y0 + size_in_luma_v) >> s->sps->log2_min_pu_size);
+ ((y0 + size_in_luma_v) >> s->ps.sps->log2_min_pu_size);
int max =
((size_in_luma_pu_v) >
- (s->sps->min_pu_height -
- y_bottom_pu) ? (s->sps->min_pu_height -
+ (s->ps.sps->min_pu_height -
+ y_bottom_pu) ? (s->ps.sps->min_pu_height -
y_bottom_pu) : (size_in_luma_pu_v));
cand_bottom_left = 0;
for (i = 0; i < max; i += 2)
@@ -1993,12 +1993,12 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
PF_INTRA);
}
if (cand_left == 1 && on_pu_edge_x) {
- int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
- int y_left_pu = ((y0) >> s->sps->log2_min_pu_size);
+ int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
+ int y_left_pu = ((y0) >> s->ps.sps->log2_min_pu_size);
int max =
((size_in_luma_pu_v) >
- (s->sps->min_pu_height -
- y_left_pu) ? (s->sps->min_pu_height -
+ (s->ps.sps->min_pu_height -
+ y_left_pu) ? (s->ps.sps->min_pu_height -
y_left_pu) : (size_in_luma_pu_v));
cand_left = 0;
for (i = 0; i < max; i += 2)
@@ -2009,20 +2009,20 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
PF_INTRA);
}
if (cand_up_left == 1) {
- int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
- int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
+ int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
+ int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
cand_up_left =
(s->ref->tab_mvf[(x_left_pu) +
(y_top_pu) * min_pu_width]).pred_flag ==
PF_INTRA;
}
if (cand_up == 1 && on_pu_edge_y) {
- int x_top_pu = ((x0) >> s->sps->log2_min_pu_size);
- int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
+ int x_top_pu = ((x0) >> s->ps.sps->log2_min_pu_size);
+ int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int max =
((size_in_luma_pu_h) >
- (s->sps->min_pu_width -
- x_top_pu) ? (s->sps->min_pu_width -
+ (s->ps.sps->min_pu_width -
+ x_top_pu) ? (s->ps.sps->min_pu_width -
x_top_pu) : (size_in_luma_pu_h));
cand_up = 0;
for (i = 0; i < max; i += 2)
@@ -2032,13 +2032,13 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
min_pu_width]).pred_flag == PF_INTRA);
}
if (cand_up_right == 1 && on_pu_edge_y) {
- int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
+ int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int x_right_pu =
- ((x0 + size_in_luma_h) >> s->sps->log2_min_pu_size);
+ ((x0 + size_in_luma_h) >> s->ps.sps->log2_min_pu_size);
int max =
((size_in_luma_pu_h) >
- (s->sps->min_pu_width -
- x_right_pu) ? (s->sps->min_pu_width -
+ (s->ps.sps->min_pu_width -
+ x_right_pu) ? (s->ps.sps->min_pu_width -
x_right_pu) : (size_in_luma_pu_h));
cand_up_right = 0;
for (i = 0; i < max; i += 2)
@@ -2093,56 +2093,56 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
} while (0);
}
- if (s->pps->constrained_intra_pred_flag == 1) {
+ if (s->ps.pps->constrained_intra_pred_flag == 1) {
if (cand_bottom_left || cand_left || cand_up_left || cand_up
|| cand_up_right) {
int size_max_x =
x0 + ((2 * 16) << hshift) <
- s->sps->width ? 2 * 16 : (s->sps->width - x0) >> hshift;
+ s->ps.sps->width ? 2 * 16 : (s->ps.sps->width - x0) >> hshift;
int size_max_y =
y0 + ((2 * 16) << vshift) <
- s->sps->height ? 2 * 16 : (s->sps->height - y0) >> vshift;
+ s->ps.sps->height ? 2 * 16 : (s->ps.sps->height - y0) >> vshift;
int j = 16 + (cand_bottom_left ? bottom_left_size : 0) - 1;
if (!cand_up_right) {
- size_max_x = x0 + ((16) << hshift) < s->sps->width ?
- 16 : (s->sps->width - x0) >> hshift;
+ size_max_x = x0 + ((16) << hshift) < s->ps.sps->width ?
+ 16 : (s->ps.sps->width - x0) >> hshift;
}
if (!cand_bottom_left) {
- size_max_y = y0 + ((16) << vshift) < s->sps->height ?
- 16 : (s->sps->height - y0) >> vshift;
+ size_max_y = y0 + ((16) << vshift) < s->ps.sps->height ?
+ 16 : (s->ps.sps->height - y0) >> vshift;
}
if (cand_bottom_left || cand_left || cand_up_left) {
while (j > -1
&&
!((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((j) <<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
j--;
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 + ((j)
<<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag == PF_INTRA)) {
j = 0;
while (j < size_max_x
&&
!((s->ref->tab_mvf[(((x0 +
- ((j) << hshift)) >> s->sps->
+ ((j) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((-1) <<
vshift))
>> s->
- sps->
+ ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2151,12 +2151,12 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
if (!
((s->ref->tab_mvf[(((x0 +
((i -
- 1) << hshift)) >> s->sps->
+ 1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((-1) <<
vshift))
>> s->
- sps->
+ ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2168,11 +2168,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
while (j < size_max_x
&&
!((s->ref->tab_mvf[(((x0 +
- ((j) << hshift)) >> s->sps->
+ ((j) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2184,11 +2184,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >>
- s->sps->log2_min_pu_size))
+ s->ps.sps->log2_min_pu_size))
+ (((y0 + ((-1)
<< vshift))
>>
- s->sps->log2_min_pu_size))
+ s->ps.sps->log2_min_pu_size))
*
min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2199,11 +2199,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >>
- s->sps->log2_min_pu_size))
+ s->ps.sps->log2_min_pu_size))
+ (((y0 + ((-1)
<< vshift))
>>
- s->sps->log2_min_pu_size))
+ s->ps.sps->log2_min_pu_size))
*
min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2218,11 +2218,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
for (i = 0; i < (0) + (size_max_y); i += 4)
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((i) <<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2247,12 +2247,12 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
i > (size_max_y - 1) - (size_max_y); i -= 4)
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((i -
3) <<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2261,11 +2261,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
a = ((left[i - 3]) * 0x01010101U);
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag == PF_INTRA))
left[-1] = left[0];
@@ -2281,12 +2281,12 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
i > (size_max_y - 1) - (size_max_y); i -= 4)
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((i -
3) <<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2300,11 +2300,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
for (i = 0; i < (0) + (size_max_x); i += 4)
if (!
((s->ref->tab_mvf[(((x0 +
- ((i) << hshift)) >> s->sps->
+ ((i) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2376,8 +2376,8 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
top[-1] = left[-1];
- if (!s->sps->intra_smoothing_disabled_flag
- && (c_idx == 0 || s->sps->chroma_format_idc == 3)) {
+ if (!s->ps.sps->intra_smoothing_disabled_flag
+ && (c_idx == 0 || s->ps.sps->chroma_format_idc == 3)) {
if (mode != INTRA_DC && 16 != 4) {
int intra_hor_ver_dist_thresh[] = { 7, 1, 0 };
int min_dist_vert_hor =
@@ -2432,24 +2432,24 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
v8i16 mul_val1 = { 1, 2, 3, 4, 5, 6, 7, 8 };
HEVCLocalContext *lc = s->HEVClc;
int i;
- int hshift = s->sps->hshift[c_idx];
- int vshift = s->sps->vshift[c_idx];
+ int hshift = s->ps.sps->hshift[c_idx];
+ int vshift = s->ps.sps->vshift[c_idx];
int size_in_luma_h = 32 << hshift;
- int size_in_tbs_h = size_in_luma_h >> s->sps->log2_min_tb_size;
+ int size_in_tbs_h = size_in_luma_h >> s->ps.sps->log2_min_tb_size;
int size_in_luma_v = 32 << vshift;
- int size_in_tbs_v = size_in_luma_v >> s->sps->log2_min_tb_size;
+ int size_in_tbs_v = size_in_luma_v >> s->ps.sps->log2_min_tb_size;
int x = x0 >> hshift;
int y = y0 >> vshift;
- int x_tb = (x0 >> s->sps->log2_min_tb_size) & s->sps->tb_mask;
- int y_tb = (y0 >> s->sps->log2_min_tb_size) & s->sps->tb_mask;
+ int x_tb = (x0 >> s->ps.sps->log2_min_tb_size) & s->ps.sps->tb_mask;
+ int y_tb = (y0 >> s->ps.sps->log2_min_tb_size) & s->ps.sps->tb_mask;
int cur_tb_addr =
- s->pps->min_tb_addr_zs[(y_tb) * (s->sps->tb_mask + 2) + (x_tb)];
+ s->ps.pps->min_tb_addr_zs[(y_tb) * (s->ps.sps->tb_mask + 2) + (x_tb)];
ptrdiff_t stride = s->frame->linesize[c_idx] / sizeof(uint8_t);
uint8_t *src = (uint8_t *) s->frame->data[c_idx] + x + y * stride;
- int min_pu_width = s->sps->min_pu_width;
+ int min_pu_width = s->ps.sps->min_pu_width;
enum IntraPredMode mode = c_idx ? lc->tu.intra_pred_mode_c :
lc->tu.intra_pred_mode;
@@ -2465,41 +2465,41 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
uint8_t *filtered_top = filtered_top_array + 1;
int cand_bottom_left = lc->na.cand_bottom_left
&& cur_tb_addr >
- s->pps->min_tb_addr_zs[((y_tb + size_in_tbs_v) & s->sps->tb_mask) *
- (s->sps->tb_mask + 2) + (x_tb - 1)];
+ s->ps.pps->min_tb_addr_zs[((y_tb + size_in_tbs_v) & s->ps.sps->tb_mask) *
+ (s->ps.sps->tb_mask + 2) + (x_tb - 1)];
int cand_left = lc->na.cand_left;
int cand_up_left = lc->na.cand_up_left;
int cand_up = lc->na.cand_up;
int cand_up_right = lc->na.cand_up_right
&& cur_tb_addr >
- s->pps->min_tb_addr_zs[(y_tb - 1) * (s->sps->tb_mask + 2) +
- ((x_tb + size_in_tbs_h) & s->sps->tb_mask)];
+ s->ps.pps->min_tb_addr_zs[(y_tb - 1) * (s->ps.sps->tb_mask + 2) +
+ ((x_tb + size_in_tbs_h) & s->ps.sps->tb_mask)];
int bottom_left_size =
(((y0 + 2 * size_in_luma_v) >
- (s->sps->height) ? (s->sps->height) : (y0 +
+ (s->ps.sps->height) ? (s->ps.sps->height) : (y0 +
2 * size_in_luma_v)) -
(y0 + size_in_luma_v)) >> vshift;
int top_right_size =
(((x0 + 2 * size_in_luma_h) >
- (s->sps->width) ? (s->sps->width) : (x0 + 2 * size_in_luma_h)) -
+ (s->ps.sps->width) ? (s->ps.sps->width) : (x0 + 2 * size_in_luma_h)) -
(x0 + size_in_luma_h)) >> hshift;
- if (s->pps->constrained_intra_pred_flag == 1) {
- int size_in_luma_pu_v = ((size_in_luma_v) >> s->sps->log2_min_pu_size);
- int size_in_luma_pu_h = ((size_in_luma_h) >> s->sps->log2_min_pu_size);
- int on_pu_edge_x = !(x0 & ((1 << s->sps->log2_min_pu_size) - 1));
- int on_pu_edge_y = !(y0 & ((1 << s->sps->log2_min_pu_size) - 1));
+ if (s->ps.pps->constrained_intra_pred_flag == 1) {
+ int size_in_luma_pu_v = ((size_in_luma_v) >> s->ps.sps->log2_min_pu_size);
+ int size_in_luma_pu_h = ((size_in_luma_h) >> s->ps.sps->log2_min_pu_size);
+ int on_pu_edge_x = !(x0 & ((1 << s->ps.sps->log2_min_pu_size) - 1));
+ int on_pu_edge_y = !(y0 & ((1 << s->ps.sps->log2_min_pu_size) - 1));
if (!size_in_luma_pu_h)
size_in_luma_pu_h++;
if (cand_bottom_left == 1 && on_pu_edge_x) {
- int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
+ int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
int y_bottom_pu =
- ((y0 + size_in_luma_v) >> s->sps->log2_min_pu_size);
+ ((y0 + size_in_luma_v) >> s->ps.sps->log2_min_pu_size);
int max =
((size_in_luma_pu_v) >
- (s->sps->min_pu_height -
- y_bottom_pu) ? (s->sps->min_pu_height -
+ (s->ps.sps->min_pu_height -
+ y_bottom_pu) ? (s->ps.sps->min_pu_height -
y_bottom_pu) : (size_in_luma_pu_v));
cand_bottom_left = 0;
for (i = 0; i < max; i += 2)
@@ -2510,12 +2510,12 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
PF_INTRA);
}
if (cand_left == 1 && on_pu_edge_x) {
- int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
- int y_left_pu = ((y0) >> s->sps->log2_min_pu_size);
+ int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
+ int y_left_pu = ((y0) >> s->ps.sps->log2_min_pu_size);
int max =
((size_in_luma_pu_v) >
- (s->sps->min_pu_height -
- y_left_pu) ? (s->sps->min_pu_height -
+ (s->ps.sps->min_pu_height -
+ y_left_pu) ? (s->ps.sps->min_pu_height -
y_left_pu) : (size_in_luma_pu_v));
cand_left = 0;
for (i = 0; i < max; i += 2)
@@ -2526,20 +2526,20 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
PF_INTRA);
}
if (cand_up_left == 1) {
- int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
- int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
+ int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
+ int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
cand_up_left =
(s->ref->tab_mvf[(x_left_pu) +
(y_top_pu) * min_pu_width]).pred_flag ==
PF_INTRA;
}
if (cand_up == 1 && on_pu_edge_y) {
- int x_top_pu = ((x0) >> s->sps->log2_min_pu_size);
- int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
+ int x_top_pu = ((x0) >> s->ps.sps->log2_min_pu_size);
+ int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int max =
((size_in_luma_pu_h) >
- (s->sps->min_pu_width -
- x_top_pu) ? (s->sps->min_pu_width -
+ (s->ps.sps->min_pu_width -
+ x_top_pu) ? (s->ps.sps->min_pu_width -
x_top_pu) : (size_in_luma_pu_h));
cand_up = 0;
for (i = 0; i < max; i += 2)
@@ -2549,13 +2549,13 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
min_pu_width]).pred_flag == PF_INTRA);
}
if (cand_up_right == 1 && on_pu_edge_y) {
- int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
+ int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int x_right_pu =
- ((x0 + size_in_luma_h) >> s->sps->log2_min_pu_size);
+ ((x0 + size_in_luma_h) >> s->ps.sps->log2_min_pu_size);
int max =
((size_in_luma_pu_h) >
- (s->sps->min_pu_width -
- x_right_pu) ? (s->sps->min_pu_width -
+ (s->ps.sps->min_pu_width -
+ x_right_pu) ? (s->ps.sps->min_pu_width -
x_right_pu) : (size_in_luma_pu_h));
cand_up_right = 0;
for (i = 0; i < max; i += 2)
@@ -2608,56 +2608,56 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
} while (0);
}
- if (s->pps->constrained_intra_pred_flag == 1) {
+ if (s->ps.pps->constrained_intra_pred_flag == 1) {
if (cand_bottom_left || cand_left || cand_up_left || cand_up
|| cand_up_right) {
int size_max_x =
x0 + ((2 * 32) << hshift) <
- s->sps->width ? 2 * 32 : (s->sps->width - x0) >> hshift;
+ s->ps.sps->width ? 2 * 32 : (s->ps.sps->width - x0) >> hshift;
int size_max_y =
y0 + ((2 * 32) << vshift) <
- s->sps->height ? 2 * 32 : (s->sps->height - y0) >> vshift;
+ s->ps.sps->height ? 2 * 32 : (s->ps.sps->height - y0) >> vshift;
int j = 32 + (cand_bottom_left ? bottom_left_size : 0) - 1;
if (!cand_up_right) {
- size_max_x = x0 + ((32) << hshift) < s->sps->width ?
- 32 : (s->sps->width - x0) >> hshift;
+ size_max_x = x0 + ((32) << hshift) < s->ps.sps->width ?
+ 32 : (s->ps.sps->width - x0) >> hshift;
}
if (!cand_bottom_left) {
- size_max_y = y0 + ((32) << vshift) < s->sps->height ?
- 32 : (s->sps->height - y0) >> vshift;
+ size_max_y = y0 + ((32) << vshift) < s->ps.sps->height ?
+ 32 : (s->ps.sps->height - y0) >> vshift;
}
if (cand_bottom_left || cand_left || cand_up_left) {
while (j > -1
&&
!((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((j) <<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
j--;
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 + ((j)
<<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag == PF_INTRA)) {
j = 0;
while (j < size_max_x
&&
!((s->ref->tab_mvf[(((x0 +
- ((j) << hshift)) >> s->sps->
+ ((j) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((-1) <<
vshift))
>> s->
- sps->
+ ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2666,12 +2666,12 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
if (!
((s->ref->tab_mvf[(((x0 +
((i -
- 1) << hshift)) >> s->sps->
+ 1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((-1) <<
vshift))
>> s->
- sps->
+ ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2683,11 +2683,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
while (j < size_max_x
&&
!((s->ref->tab_mvf[(((x0 +
- ((j) << hshift)) >> s->sps->
+ ((j) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2699,11 +2699,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >>
- s->sps->log2_min_pu_size))
+ s->ps.sps->log2_min_pu_size))
+ (((y0 + ((-1)
<< vshift))
>>
- s->sps->log2_min_pu_size))
+ s->ps.sps->log2_min_pu_size))
*
min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2714,11 +2714,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >>
- s->sps->log2_min_pu_size))
+ s->ps.sps->log2_min_pu_size))
+ (((y0 + ((-1)
<< vshift))
>>
- s->sps->log2_min_pu_size))
+ s->ps.sps->log2_min_pu_size))
*
min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2733,11 +2733,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
for (i = 0; i < (0) + (size_max_y); i += 4)
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((i) <<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2761,12 +2761,12 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
i > (size_max_y - 1) - (size_max_y); i -= 4)
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((i -
3) <<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2775,11 +2775,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
a = ((left[i - 3]) * 0x01010101U);
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag == PF_INTRA))
left[-1] = left[0];
@@ -2795,12 +2795,12 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
i > (size_max_y - 1) - (size_max_y); i -= 4)
if (!
((s->ref->tab_mvf[(((x0 +
- ((-1) << hshift)) >> s->sps->
+ ((-1) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 +
((i -
3) <<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2814,11 +2814,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
for (i = 0; i < (0) + (size_max_x); i += 4)
if (!
((s->ref->tab_mvf[(((x0 +
- ((i) << hshift)) >> s->sps->
+ ((i) << hshift)) >> s->ps.sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
- >> s->sps->
+ >> s->ps.sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2893,8 +2893,8 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
top[-1] = left[-1];
- if (!s->sps->intra_smoothing_disabled_flag
- && (c_idx == 0 || s->sps->chroma_format_idc == 3)) {
+ if (!s->ps.sps->intra_smoothing_disabled_flag
+ && (c_idx == 0 || s->ps.sps->chroma_format_idc == 3)) {
if (mode != INTRA_DC && 32 != 4) {
int intra_hor_ver_dist_thresh[] = { 7, 1, 0 };
int min_dist_vert_hor =
@@ -2908,7 +2908,7 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
0 ? ((int) (mode - 26U)) : (-((int) (mode - 26U))))));
if (min_dist_vert_hor > intra_hor_ver_dist_thresh[5 - 3]) {
int threshold = 1 << (8 - 5);
- if (s->sps->sps_strong_intra_smoothing_enable_flag
+ if (s->ps.sps->sps_strong_intra_smoothing_enable_flag
&& c_idx == 0
&& ((top[-1] + top[63] - 2 * top[31]) >=
0 ? (top[-1] + top[63] -
--
1.7.9.5
More information about the ffmpeg-devel
mailing list