diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-19 13:56:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-19 13:56:56 +0200 |
commit | 93318983c3e565b3079362ec69cf3362febc5004 (patch) | |
tree | 52535077257899903db9906d27e618a4734a2f62 /libavcodec | |
parent | 4a30f08505a4e85718896ff233c97be41a9754ca (diff) | |
parent | 04db5794cd97e4b33ec2f963ef7f967722a456eb (diff) | |
download | ffmpeg-93318983c3e565b3079362ec69cf3362febc5004.tar.gz |
Merge commit '04db5794cd97e4b33ec2f963ef7f967722a456eb'
* commit '04db5794cd97e4b33ec2f963ef7f967722a456eb':
hevc: templatize pred_planar
Conflicts:
libavcodec/hevcpred_template.c
See: 053fdacde76a38186dc9db658572e38686efe0c4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/hevcpred_template.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/libavcodec/hevcpred_template.c b/libavcodec/hevcpred_template.c index 5ed7647f92..ece40ddbaf 100644 --- a/libavcodec/hevcpred_template.c +++ b/libavcodec/hevcpred_template.c @@ -377,29 +377,19 @@ static av_always_inline void FUNC(pred_planar)(uint8_t *_src, const uint8_t *_to (size - 1 - y) * top[x] + (y + 1) * left[size] + size) >> (trafo_size + 1); } -static void FUNC(pred_planar_0)(uint8_t *_src, const uint8_t *_top, - const uint8_t *_left, ptrdiff_t stride) -{ - FUNC(pred_planar)(_src, _top, _left, stride, 2); -} - -static void FUNC(pred_planar_1)(uint8_t *_src, const uint8_t *_top, - const uint8_t *_left, ptrdiff_t stride) -{ - FUNC(pred_planar)(_src, _top, _left, stride, 3); +#define PRED_PLANAR(size)\ +static void FUNC(pred_planar_ ## size)(uint8_t *src, const uint8_t *top, \ + const uint8_t *left, ptrdiff_t stride) \ +{ \ + FUNC(pred_planar)(src, top, left, stride, size + 2); \ } -static void FUNC(pred_planar_2)(uint8_t *_src, const uint8_t *_top, - const uint8_t *_left, ptrdiff_t stride) -{ - FUNC(pred_planar)(_src, _top, _left, stride, 4); -} +PRED_PLANAR(0) +PRED_PLANAR(1) +PRED_PLANAR(2) +PRED_PLANAR(3) -static void FUNC(pred_planar_3)(uint8_t *_src, const uint8_t *_top, - const uint8_t *_left, ptrdiff_t stride) -{ - FUNC(pred_planar)(_src, _top, _left, stride, 5); -} +#undef PRED_PLANAR static void FUNC(pred_dc)(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, |