mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
hevc: further reduce code duplication in hls_prediction_unit()
This commit is contained in:
parent
a7b365ae19
commit
84c0ece5fd
@ -1665,12 +1665,6 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
|
|||||||
|
|
||||||
ff_hevc_luma_mv_merge_mode(s, x0, y0, nPbW, nPbH, log2_cb_size,
|
ff_hevc_luma_mv_merge_mode(s, x0, y0, nPbW, nPbH, log2_cb_size,
|
||||||
partIdx, merge_idx, ¤t_mv);
|
partIdx, merge_idx, ¤t_mv);
|
||||||
x_pu = x0 >> s->sps->log2_min_pu_size;
|
|
||||||
y_pu = y0 >> s->sps->log2_min_pu_size;
|
|
||||||
|
|
||||||
for (j = 0; j < nPbH >> s->sps->log2_min_pu_size; j++)
|
|
||||||
for (i = 0; i < nPbW >> s->sps->log2_min_pu_size; i++)
|
|
||||||
tab_mvf[(y_pu + j) * min_pu_width + x_pu + i] = current_mv;
|
|
||||||
} else {
|
} else {
|
||||||
enum InterPredIdc inter_pred_idc = PRED_L0;
|
enum InterPredIdc inter_pred_idc = PRED_L0;
|
||||||
ff_hevc_set_neighbour_available(s, x0, y0, nPbW, nPbH);
|
ff_hevc_set_neighbour_available(s, x0, y0, nPbW, nPbH);
|
||||||
@ -1712,15 +1706,15 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
|
|||||||
current_mv.mv[1].x += lc->pu.mvd.x;
|
current_mv.mv[1].x += lc->pu.mvd.x;
|
||||||
current_mv.mv[1].y += lc->pu.mvd.y;
|
current_mv.mv[1].y += lc->pu.mvd.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
x_pu = x0 >> s->sps->log2_min_pu_size;
|
|
||||||
y_pu = y0 >> s->sps->log2_min_pu_size;
|
|
||||||
|
|
||||||
for(j = 0; j < nPbH >> s->sps->log2_min_pu_size; j++)
|
|
||||||
for (i = 0; i < nPbW >> s->sps->log2_min_pu_size; i++)
|
|
||||||
tab_mvf[(y_pu + j) * min_pu_width + x_pu + i] = current_mv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
x_pu = x0 >> s->sps->log2_min_pu_size;
|
||||||
|
y_pu = y0 >> s->sps->log2_min_pu_size;
|
||||||
|
|
||||||
|
for (j = 0; j < nPbH >> s->sps->log2_min_pu_size; j++)
|
||||||
|
for (i = 0; i < nPbW >> s->sps->log2_min_pu_size; i++)
|
||||||
|
tab_mvf[(y_pu + j) * min_pu_width + x_pu + i] = current_mv;
|
||||||
|
|
||||||
if (current_mv.pred_flag[0]) {
|
if (current_mv.pred_flag[0]) {
|
||||||
ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
|
ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
|
||||||
if (!ref0)
|
if (!ref0)
|
||||||
|
Loading…
Reference in New Issue
Block a user