diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-05 01:32:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-10 02:17:52 +0200 |
commit | e8b9e1e2942355660e246cf4b9a18ce1a095419f (patch) | |
tree | 85c2fee42d71c8ad749e1e61836aba3f29f4e4c3 /libavcodec/dsputil_template.c | |
parent | 1a8b0025f153c48d0a06ac57f211fb692ca7dd0b (diff) | |
download | ffmpeg-streaming-e8b9e1e2942355660e246cf4b9a18ce1a095419f.zip ffmpeg-streaming-e8b9e1e2942355660e246cf4b9a18ce1a095419f.tar.gz |
dsputil: extend things to 12 and 14 bits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dsputil_template.c')
-rw-r--r-- | libavcodec/dsputil_template.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/libavcodec/dsputil_template.c b/libavcodec/dsputil_template.c index 85d4fec..72d8d4a 100644 --- a/libavcodec/dsputil_template.c +++ b/libavcodec/dsputil_template.c @@ -829,7 +829,7 @@ static av_unused void FUNC(OPNAME ## h264_qpel2_v_lowpass)(uint8_t *p_dst, uint8 }\ }\ \ -static av_unused void FUNC(OPNAME ## h264_qpel2_hv_lowpass)(uint8_t *p_dst, int16_t *tmp, uint8_t *p_src, int dstStride, int tmpStride, int srcStride){\ +static av_unused void FUNC(OPNAME ## h264_qpel2_hv_lowpass)(uint8_t *p_dst, pixeltmp *tmp, uint8_t *p_src, int dstStride, int tmpStride, int srcStride){\ const int h=2;\ const int w=2;\ const int pad = (BIT_DEPTH > 9) ? (-10 * ((1<<BIT_DEPTH)-1)) : 0;\ @@ -910,7 +910,7 @@ static void FUNC(OPNAME ## h264_qpel4_v_lowpass)(uint8_t *p_dst, uint8_t *p_src, }\ }\ \ -static void FUNC(OPNAME ## h264_qpel4_hv_lowpass)(uint8_t *p_dst, int16_t *tmp, uint8_t *p_src, int dstStride, int tmpStride, int srcStride){\ +static void FUNC(OPNAME ## h264_qpel4_hv_lowpass)(uint8_t *p_dst, pixeltmp *tmp, uint8_t *p_src, int dstStride, int tmpStride, int srcStride){\ const int h=4;\ const int w=4;\ const int pad = (BIT_DEPTH > 9) ? (-10 * ((1<<BIT_DEPTH)-1)) : 0;\ @@ -1010,7 +1010,7 @@ static void FUNC(OPNAME ## h264_qpel8_v_lowpass)(uint8_t *p_dst, uint8_t *p_src, }\ }\ \ -static void FUNC(OPNAME ## h264_qpel8_hv_lowpass)(uint8_t *p_dst, int16_t *tmp, uint8_t *p_src, int dstStride, int tmpStride, int srcStride){\ +static void FUNC(OPNAME ## h264_qpel8_hv_lowpass)(uint8_t *p_dst, pixeltmp *tmp, uint8_t *p_src, int dstStride, int tmpStride, int srcStride){\ const int h=8;\ const int w=8;\ const int pad = (BIT_DEPTH > 9) ? (-10 * ((1<<BIT_DEPTH)-1)) : 0;\ @@ -1081,7 +1081,7 @@ static void FUNC(OPNAME ## h264_qpel16_h_lowpass)(uint8_t *dst, uint8_t *src, in FUNC(OPNAME ## h264_qpel8_h_lowpass)(dst+8*sizeof(pixel), src+8*sizeof(pixel), dstStride, srcStride);\ }\ \ -static void FUNC(OPNAME ## h264_qpel16_hv_lowpass)(uint8_t *dst, int16_t *tmp, uint8_t *src, int dstStride, int tmpStride, int srcStride){\ +static void FUNC(OPNAME ## h264_qpel16_hv_lowpass)(uint8_t *dst, pixeltmp *tmp, uint8_t *src, int dstStride, int tmpStride, int srcStride){\ FUNC(OPNAME ## h264_qpel8_hv_lowpass)(dst , tmp , src , dstStride, tmpStride, srcStride);\ FUNC(OPNAME ## h264_qpel8_hv_lowpass)(dst+8*sizeof(pixel), tmp+8, src+8*sizeof(pixel), dstStride, tmpStride, srcStride);\ src += 8*srcStride;\ @@ -1181,12 +1181,12 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc33)(uint8_t *dst, uint8_t *s }\ \ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc22)(uint8_t *dst, uint8_t *src, int stride){\ - int16_t tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ + pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ FUNC(OPNAME ## h264_qpel ## SIZE ## _hv_lowpass)(dst, tmp, src, stride, SIZE*sizeof(pixel), stride);\ }\ \ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc21)(uint8_t *dst, uint8_t *src, int stride){\ - int16_t tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ + pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ uint8_t halfH[SIZE*SIZE*sizeof(pixel)];\ uint8_t halfHV[SIZE*SIZE*sizeof(pixel)];\ FUNC(put_h264_qpel ## SIZE ## _h_lowpass)(halfH, src, SIZE*sizeof(pixel), stride);\ @@ -1195,7 +1195,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc21)(uint8_t *dst, uint8_t *s }\ \ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc23)(uint8_t *dst, uint8_t *src, int stride){\ - int16_t tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ + pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ uint8_t halfH[SIZE*SIZE*sizeof(pixel)];\ uint8_t halfHV[SIZE*SIZE*sizeof(pixel)];\ FUNC(put_h264_qpel ## SIZE ## _h_lowpass)(halfH, src + stride, SIZE*sizeof(pixel), stride);\ @@ -1206,7 +1206,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc23)(uint8_t *dst, uint8_t *s static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc12)(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\ uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\ - int16_t tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ + pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ uint8_t halfV[SIZE*SIZE*sizeof(pixel)];\ uint8_t halfHV[SIZE*SIZE*sizeof(pixel)];\ FUNC(copy_block ## SIZE )(full, src - stride*2, SIZE*sizeof(pixel), stride, SIZE + 5);\ @@ -1218,7 +1218,7 @@ static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc12)(uint8_t *dst, uint8_t *s static void FUNCC(OPNAME ## h264_qpel ## SIZE ## _mc32)(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)*sizeof(pixel)];\ uint8_t * const full_mid= full + SIZE*2*sizeof(pixel);\ - int16_t tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ + pixeltmp tmp[SIZE*(SIZE+5)*sizeof(pixel)];\ uint8_t halfV[SIZE*SIZE*sizeof(pixel)];\ uint8_t halfHV[SIZE*SIZE*sizeof(pixel)];\ FUNC(copy_block ## SIZE )(full, src - stride*2 + sizeof(pixel), SIZE*sizeof(pixel), stride, SIZE + 5);\ @@ -1263,6 +1263,16 @@ H264_MC(avg_, 16) # define avg_h264_qpel8_mc00_10_c ff_avg_pixels8x8_10_c # define put_h264_qpel16_mc00_10_c ff_put_pixels16x16_10_c # define avg_h264_qpel16_mc00_10_c ff_avg_pixels16x16_10_c +#elif BIT_DEPTH == 12 +# define put_h264_qpel8_mc00_12_c ff_put_pixels8x8_12_c +# define avg_h264_qpel8_mc00_12_c ff_avg_pixels8x8_12_c +# define put_h264_qpel16_mc00_12_c ff_put_pixels16x16_12_c +# define avg_h264_qpel16_mc00_12_c ff_avg_pixels16x16_12_c +#elif BIT_DEPTH == 14 +# define put_h264_qpel8_mc00_14_c ff_put_pixels8x8_14_c +# define avg_h264_qpel8_mc00_14_c ff_avg_pixels8x8_14_c +# define put_h264_qpel16_mc00_14_c ff_put_pixels16x16_14_c +# define avg_h264_qpel16_mc00_14_c ff_avg_pixels16x16_14_c #endif void FUNCC(ff_put_pixels8x8)(uint8_t *dst, uint8_t *src, int stride) { |