1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-28 04:06:12 +02:00

Merge commit '53a11135f2fb2123408b295f9aaae3d6f861aea5'

* commit '53a11135f2fb2123408b295f9aaae3d6f861aea5':
  hevc: simplify splitting the transform tree blocks

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-07-28 13:03:59 +02:00
commit 2fb8aa9b10

View File

@ -1152,29 +1152,25 @@ static int hls_transform_tree(HEVCContext *s, int x0, int y0,
} }
if (split_transform_flag) { if (split_transform_flag) {
int x1 = x0 + ((1 << log2_trafo_size) >> 1); const int trafo_size_split = 1 << (log2_trafo_size - 1);
int y1 = y0 + ((1 << log2_trafo_size) >> 1); const int x1 = x0 + trafo_size_split;
const int y1 = y0 + trafo_size_split;
ret = hls_transform_tree(s, x0, y0, x0, y0, cb_xBase, cb_yBase, #define SUBDIVIDE(x, y, idx) \
log2_cb_size, log2_trafo_size - 1, do { \
trafo_depth + 1, 0, cbf_cb, cbf_cr); ret = hls_transform_tree(s, x, y, x0, y0, cb_xBase, cb_yBase, log2_cb_size, \
if (ret < 0) log2_trafo_size - 1, trafo_depth + 1, idx, \
return ret; cbf_cb, cbf_cr); \
ret = hls_transform_tree(s, x1, y0, x0, y0, cb_xBase, cb_yBase, if (ret < 0) \
log2_cb_size, log2_trafo_size - 1, return ret; \
trafo_depth + 1, 1, cbf_cb, cbf_cr); } while (0)
if (ret < 0)
return ret; SUBDIVIDE(x0, y0, 0);
ret = hls_transform_tree(s, x0, y1, x0, y0, cb_xBase, cb_yBase, SUBDIVIDE(x1, y0, 1);
log2_cb_size, log2_trafo_size - 1, SUBDIVIDE(x0, y1, 2);
trafo_depth + 1, 2, cbf_cb, cbf_cr); SUBDIVIDE(x1, y1, 3);
if (ret < 0)
return ret; #undef SUBDIVIDE
ret = hls_transform_tree(s, x1, y1, x0, y0, cb_xBase, cb_yBase,
log2_cb_size, log2_trafo_size - 1,
trafo_depth + 1, 3, cbf_cb, cbf_cr);
if (ret < 0)
return ret;
} else { } else {
int min_tu_size = 1 << s->sps->log2_min_tb_size; int min_tu_size = 1 << s->sps->log2_min_tb_size;
int log2_min_tu_size = s->sps->log2_min_tb_size; int log2_min_tu_size = s->sps->log2_min_tb_size;