* qatar/master:
Fix even more missing includes after the common.h removal
build: Factor out rangecoder dependencies to CONFIG_RANGECODER
build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
x86: avcodec: Consistently name all init files
Add more missing includes after removing the implicit common.h
Add some more missing includes after removing the implicit common.h
Don't include common.h from avutil.h
rtmp: Automatically compute the hash for SWFVerification
Conflicts:
configure
doc/APIchanges
doc/examples/decoding_encoding.c
libavcodec/Makefile
libavcodec/assdec.c
libavcodec/audio_frame_queue.c
libavcodec/avpacket.c
libavcodec/dv_profile.c
libavcodec/dwt.c
libavcodec/libtheoraenc.c
libavcodec/rawdec.c
libavcodec/rv40dsp.c
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/v210dec.h
libavcodec/vc1dsp.c
libavcodec/x86/Makefile
libavfilter/asrc_anullsrc.c
libavfilter/avfilter.c
libavfilter/buffer.c
libavfilter/formats.c
libavfilter/vf_ass.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_select.c
libavfilter/video.c
libavfilter/vsrc_testsrc.c
libavformat/version.h
libavutil/audioconvert.c
libavutil/error.h
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -1365,6 +1365,7 @@ CONFIG_EXTRA=" |
1365 | 1365 |
aandcttables |
1366 | 1366 |
ac3dsp |
1367 | 1367 |
avutil |
1368 |
+ error_resilience |
|
1368 | 1369 |
gcrypt |
1369 | 1370 |
golomb |
1370 | 1371 |
gplv3 |
... | ... |
@@ -1379,6 +1380,7 @@ CONFIG_EXTRA=" |
1379 | 1379 |
mpegvideo |
1380 | 1380 |
mpegvideoenc |
1381 | 1381 |
nettle |
1382 |
+ rangecoder |
|
1382 | 1383 |
rtpdec |
1383 | 1384 |
sinewin |
1384 | 1385 |
vp3dsp |
... | ... |
@@ -1527,11 +1529,12 @@ dnxhd_encoder_select="aandcttables mpegvideoenc" |
1527 | 1527 |
dxa_decoder_select="zlib" |
1528 | 1528 |
eac3_decoder_select="ac3_decoder" |
1529 | 1529 |
eac3_encoder_select="mdct ac3dsp" |
1530 |
-eamad_decoder_select="aandcttables" |
|
1530 |
+eamad_decoder_select="aandcttables error_resilience" |
|
1531 | 1531 |
eatgq_decoder_select="aandcttables" |
1532 |
-eatqi_decoder_select="aandcttables mpegvideo" |
|
1532 |
+eatqi_decoder_select="aandcttables error_resilience mpegvideo" |
|
1533 | 1533 |
exr_decoder_select="zlib" |
1534 |
-ffv1_decoder_select="golomb" |
|
1534 |
+ffv1_decoder_select="golomb rangecoder" |
|
1535 |
+ffv1_encoder_select="rangecoder" |
|
1535 | 1536 |
flac_decoder_select="golomb" |
1536 | 1537 |
flac_encoder_select="golomb lpc" |
1537 | 1538 |
flashsv_decoder_select="zlib" |
... | ... |
@@ -1541,15 +1544,15 @@ flashsv2_decoder_select="zlib" |
1541 | 1541 |
flv_decoder_select="h263_decoder" |
1542 | 1542 |
flv_encoder_select="h263_encoder" |
1543 | 1543 |
fraps_decoder_select="huffman" |
1544 |
-h261_decoder_select="mpegvideo" |
|
1544 |
+h261_decoder_select="error_resilience mpegvideo" |
|
1545 | 1545 |
h261_encoder_select="aandcttables mpegvideoenc" |
1546 |
-h263_decoder_select="h263_parser mpegvideo" |
|
1547 |
-h263_encoder_select="aandcttables mpegvideoenc" |
|
1546 |
+h263_decoder_select="error_resilience h263_parser mpegvideo" |
|
1547 |
+h263_encoder_select="aandcttables error_resilience mpegvideoenc" |
|
1548 | 1548 |
h263_vaapi_hwaccel_select="vaapi h263_decoder" |
1549 | 1549 |
h263i_decoder_select="h263_decoder" |
1550 | 1550 |
h263p_encoder_select="h263_encoder" |
1551 | 1551 |
h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser" |
1552 |
-h264_decoder_select="golomb h264chroma h264dsp h264pred h264qpel mpegvideo" |
|
1552 |
+h264_decoder_select="error_resilience golomb h264chroma h264dsp h264pred h264qpel mpegvideo" |
|
1553 | 1553 |
h264_dxva2_hwaccel_deps="dxva2api_h" |
1554 | 1554 |
h264_dxva2_hwaccel_select="dxva2 h264_decoder" |
1555 | 1555 |
h264_vaapi_hwaccel_select="vaapi h264_decoder" |
... | ... |
@@ -1562,7 +1565,7 @@ jpegls_decoder_select="golomb" |
1562 | 1562 |
jpegls_encoder_select="golomb" |
1563 | 1563 |
ljpeg_encoder_select="aandcttables mpegvideoenc" |
1564 | 1564 |
loco_decoder_select="golomb" |
1565 |
-mdec_decoder_select="mpegvideo" |
|
1565 |
+mdec_decoder_select="error_resilience mpegvideo" |
|
1566 | 1566 |
mjpeg_encoder_select="aandcttables mpegvideoenc" |
1567 | 1567 |
mlp_decoder_select="mlp_parser" |
1568 | 1568 |
mp1_decoder_select="mpegaudiodsp" |
... | ... |
@@ -1582,15 +1585,15 @@ mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h" |
1582 | 1582 |
mpeg_xvmc_decoder_select="mpegvideo_decoder" |
1583 | 1583 |
mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder" |
1584 | 1584 |
mpeg1_vdpau_hwaccel_select="vdpau mpeg1video_decoder" |
1585 |
-mpeg1video_decoder_select="mpegvideo" |
|
1586 |
-mpeg1video_encoder_select="aandcttables mpegvideoenc" |
|
1585 |
+mpeg1video_decoder_select="error_resilience mpegvideo" |
|
1586 |
+mpeg1video_encoder_select="aandcttables error_resilience mpegvideoenc" |
|
1587 | 1587 |
mpeg2_crystalhd_decoder_select="crystalhd" |
1588 | 1588 |
mpeg2_dxva2_hwaccel_deps="dxva2api_h" |
1589 | 1589 |
mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder" |
1590 | 1590 |
mpeg2_vdpau_hwaccel_select="vdpau mpeg2video_decoder" |
1591 | 1591 |
mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder" |
1592 |
-mpeg2video_decoder_select="mpegvideo" |
|
1593 |
-mpeg2video_encoder_select="aandcttables mpegvideoenc" |
|
1592 |
+mpeg2video_decoder_select="error_resilience mpegvideo" |
|
1593 |
+mpeg2video_encoder_select="aandcttables error_resilience mpegvideoenc" |
|
1594 | 1594 |
mpeg4_crystalhd_decoder_select="crystalhd" |
1595 | 1595 |
mpeg4_decoder_select="h263_decoder mpeg4video_parser" |
1596 | 1596 |
mpeg4_encoder_select="h263_encoder" |
... | ... |
@@ -1615,18 +1618,18 @@ rv10_decoder_select="h263_decoder" |
1615 | 1615 |
rv10_encoder_select="h263_encoder" |
1616 | 1616 |
rv20_decoder_select="h263_decoder" |
1617 | 1617 |
rv20_encoder_select="h263_encoder" |
1618 |
-rv30_decoder_select="golomb h264chroma h264pred h264qpel mpegvideo" |
|
1619 |
-rv40_decoder_select="golomb h264chroma h264pred h264qpel mpegvideo" |
|
1618 |
+rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo" |
|
1619 |
+rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo" |
|
1620 | 1620 |
shorten_decoder_select="golomb" |
1621 | 1621 |
sipr_decoder_select="lsp" |
1622 |
-snow_decoder_select="dwt" |
|
1623 |
-snow_encoder_select="aandcttables dwt mpegvideoenc" |
|
1622 |
+snow_decoder_select="dwt rangecoder" |
|
1623 |
+snow_encoder_select="aandcttables dwt error_resilience mpegvideoenc rangecoder" |
|
1624 | 1624 |
sonic_decoder_select="golomb" |
1625 | 1625 |
sonic_encoder_select="golomb" |
1626 | 1626 |
sonic_ls_encoder_select="golomb" |
1627 |
-svq1_decoder_select="mpegvideo" |
|
1628 |
-svq1_encoder_select="aandcttables mpegvideoenc" |
|
1629 |
-svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel mpegvideo" |
|
1627 |
+svq1_decoder_select="error_resilience mpegvideo" |
|
1628 |
+svq1_encoder_select="aandcttables error_resilience mpegvideoenc" |
|
1629 |
+svq3_decoder_select="error_resilience golomb h264chroma h264dsp h264pred h264qpel mpegvideo" |
|
1630 | 1630 |
svq3_decoder_suggest="zlib" |
1631 | 1631 |
theora_decoder_select="vp3_decoder" |
1632 | 1632 |
tiff_decoder_suggest="zlib" |
... | ... |
@@ -1676,10 +1679,10 @@ vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" |
1676 | 1676 |
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" |
1677 | 1677 |
|
1678 | 1678 |
# parsers |
1679 |
-h264_parser_select="golomb h264dsp h264pred mpegvideo" |
|
1680 |
-mpeg4video_parser_select="mpegvideo" |
|
1681 |
-mpegvideo_parser_select="mpegvideo" |
|
1682 |
-vc1_parser_select="mpegvideo" |
|
1679 |
+h264_parser_select="error_resilience golomb h264dsp h264pred mpegvideo" |
|
1680 |
+mpeg4video_parser_select="error_resilience mpegvideo" |
|
1681 |
+mpegvideo_parser_select="error_resilience mpegvideo" |
|
1682 |
+vc1_parser_select="error_resilience mpegvideo" |
|
1683 | 1683 |
|
1684 | 1684 |
# external libraries |
1685 | 1685 |
libaacplus_encoder_deps="libaacplus" |
... | ... |
@@ -281,6 +281,9 @@ Size of the decompressed SWF file, required for SWFVerification. |
281 | 281 |
@item rtmp_swfurl |
282 | 282 |
URL of the SWF player for the media. By default no value will be sent. |
283 | 283 |
|
284 |
+@item rtmp_swfverify |
|
285 |
+URL to player swf file, compute hash/size automatically. |
|
286 |
+ |
|
284 | 287 |
@item rtmp_tcurl |
285 | 288 |
URL of the target stream. Defaults to proto://host[:port]/app. |
286 | 289 |
|
... | ... |
@@ -41,6 +41,7 @@ OBJS-$(CONFIG_ENCODERS) += faandct.o jfdctfst.o jfdctint.o |
41 | 41 |
OBJS-$(CONFIG_DCT) += dct.o dct32_fixed.o dct32_float.o |
42 | 42 |
OBJS-$(CONFIG_DWT) += dwt.o snow.o |
43 | 43 |
OBJS-$(CONFIG_DXVA2) += dxva2.o |
44 |
+OBJS-$(CONFIG_ERROR_RESILIENCE) += error_resilience.o |
|
44 | 45 |
FFT-OBJS-$(CONFIG_HARDCODED_TABLES) += cos_tables.o cos_fixed_tables.o |
45 | 46 |
OBJS-$(CONFIG_FFT) += avfft.o fft_fixed.o fft_float.o \ |
46 | 47 |
$(FFT-OBJS-yes) |
... | ... |
@@ -58,6 +59,7 @@ OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \ |
58 | 58 |
OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o mpegvideo_motion.o |
59 | 59 |
OBJS-$(CONFIG_MPEGVIDEOENC) += mpegvideo_enc.o mpeg12data.o \ |
60 | 60 |
motion_est.o ratecontrol.o |
61 |
+OBJS-$(CONFIG_RANGECODER) += rangecoder.o |
|
61 | 62 |
RDFT-OBJS-$(CONFIG_HARDCODED_TABLES) += sin_tables.o |
62 | 63 |
OBJS-$(CONFIG_RDFT) += rdft.o $(RDFT-OBJS-yes) |
63 | 64 |
OBJS-$(CONFIG_SINEWIN) += sinewin.o |
... | ... |
@@ -164,19 +166,19 @@ OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o ac3enc.o ac3enc_float.o \ |
164 | 164 |
ac3tab.o ac3.o kbdwin.o eac3_data.o |
165 | 165 |
OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o |
166 | 166 |
OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \ |
167 |
- mpeg12data.o error_resilience.o |
|
167 |
+ mpeg12data.o |
|
168 | 168 |
OBJS-$(CONFIG_EATGQ_DECODER) += eatgq.o eaidct.o |
169 | 169 |
OBJS-$(CONFIG_EATGV_DECODER) += eatgv.o |
170 | 170 |
OBJS-$(CONFIG_EATQI_DECODER) += eatqi.o eaidct.o mpeg12.o \ |
171 |
- mpeg12data.o error_resilience.o |
|
171 |
+ mpeg12data.o |
|
172 | 172 |
OBJS-$(CONFIG_EIGHTBPS_DECODER) += 8bps.o |
173 | 173 |
OBJS-$(CONFIG_EIGHTSVX_EXP_DECODER) += 8svx.o |
174 | 174 |
OBJS-$(CONFIG_EIGHTSVX_FIB_DECODER) += 8svx.o |
175 | 175 |
OBJS-$(CONFIG_ESCAPE124_DECODER) += escape124.o |
176 | 176 |
OBJS-$(CONFIG_ESCAPE130_DECODER) += escape130.o |
177 | 177 |
OBJS-$(CONFIG_EXR_DECODER) += exr.o |
178 |
-OBJS-$(CONFIG_FFV1_DECODER) += ffv1.o rangecoder.o |
|
179 |
-OBJS-$(CONFIG_FFV1_ENCODER) += ffv1.o rangecoder.o |
|
178 |
+OBJS-$(CONFIG_FFV1_DECODER) += ffv1.o |
|
179 |
+OBJS-$(CONFIG_FFV1_ENCODER) += ffv1.o |
|
180 | 180 |
OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o |
181 | 181 |
OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o |
182 | 182 |
OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o |
... | ... |
@@ -198,20 +200,18 @@ OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o |
198 | 198 |
OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o |
199 | 199 |
OBJS-$(CONFIG_GSM_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o |
200 | 200 |
OBJS-$(CONFIG_GSM_MS_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o |
201 |
-OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o h261data.o error_resilience.o |
|
201 |
+OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o h261data.o |
|
202 | 202 |
OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261.o h261data.o |
203 | 203 |
OBJS-$(CONFIG_H263_DECODER) += h263dec.o h263.o ituh263dec.o \ |
204 | 204 |
mpeg4video.o mpeg4videodec.o flvdec.o\ |
205 |
- intelh263dec.o error_resilience.o |
|
205 |
+ intelh263dec.o |
|
206 | 206 |
OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o |
207 | 207 |
OBJS-$(CONFIG_H263_ENCODER) += mpeg4videoenc.o mpeg4video.o \ |
208 |
- h263.o ituh263enc.o flvenc.o \ |
|
209 |
- error_resilience.o |
|
208 |
+ h263.o ituh263enc.o flvenc.o |
|
210 | 209 |
OBJS-$(CONFIG_H264_DECODER) += h264.o \ |
211 | 210 |
h264_loopfilter.o h264_direct.o \ |
212 | 211 |
cabac.o h264_sei.o h264_ps.o \ |
213 |
- h264_refs.o h264_cavlc.o h264_cabac.o\ |
|
214 |
- error_resilience.o |
|
212 |
+ h264_refs.o h264_cavlc.o h264_cabac.o |
|
215 | 213 |
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o |
216 | 214 |
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o |
217 | 215 |
OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o |
... | ... |
@@ -243,8 +243,7 @@ OBJS-$(CONFIG_LJPEG_ENCODER) += ljpegenc.o mjpegenc.o mjpeg.o |
243 | 243 |
OBJS-$(CONFIG_LOCO_DECODER) += loco.o |
244 | 244 |
OBJS-$(CONFIG_MACE3_DECODER) += mace.o |
245 | 245 |
OBJS-$(CONFIG_MACE6_DECODER) += mace.o |
246 |
-OBJS-$(CONFIG_MDEC_DECODER) += mdec.o mpeg12.o mpeg12data.o \ |
|
247 |
- error_resilience.o |
|
246 |
+OBJS-$(CONFIG_MDEC_DECODER) += mdec.o mpeg12.o mpeg12data.o |
|
248 | 247 |
OBJS-$(CONFIG_MICRODVD_DECODER) += microdvddec.o ass.o |
249 | 248 |
OBJS-$(CONFIG_MIMIC_DECODER) += mimic.o |
250 | 249 |
OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o mjpeg.o |
... | ... |
@@ -288,18 +287,14 @@ OBJS-$(CONFIG_MPC8_DECODER) += mpc8.o mpc.o mpegaudiodec.o \ |
288 | 288 |
OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o \ |
289 | 289 |
mpegvideo.o error_resilience.o |
290 | 290 |
OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o |
291 |
-OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o \ |
|
292 |
- error_resilience.o |
|
291 |
+OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o |
|
293 | 292 |
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpeg12.o \ |
294 |
- timecode.o \ |
|
295 |
- error_resilience.o |
|
293 |
+ timecode.o |
|
296 | 294 |
OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL) += dxva2_mpeg2.o |
297 | 295 |
OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o |
298 |
-OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12.o mpeg12data.o \ |
|
299 |
- error_resilience.o |
|
296 |
+OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12.o mpeg12data.o |
|
300 | 297 |
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpeg12.o \ |
301 |
- timecode.o \ |
|
302 |
- error_resilience.o |
|
298 |
+ timecode.o |
|
303 | 299 |
OBJS-$(CONFIG_MPEG4_VAAPI_HWACCEL) += vaapi_mpeg4.o |
304 | 300 |
OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4.o msmpeg4data.o |
305 | 301 |
OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \ |
... | ... |
@@ -380,10 +375,8 @@ OBJS-$(CONFIG_RV10_DECODER) += rv10.o |
380 | 380 |
OBJS-$(CONFIG_RV10_ENCODER) += rv10enc.o |
381 | 381 |
OBJS-$(CONFIG_RV20_DECODER) += rv10.o |
382 | 382 |
OBJS-$(CONFIG_RV20_ENCODER) += rv20enc.o |
383 |
-OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o rv34dsp.o \ |
|
384 |
- error_resilience.o |
|
385 |
-OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv34dsp.o rv40dsp.o \ |
|
386 |
- error_resilience.o |
|
383 |
+OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o rv34dsp.o |
|
384 |
+OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv34dsp.o rv40dsp.o |
|
387 | 385 |
OBJS-$(CONFIG_SAMI_DECODER) += samidec.o ass.o |
388 | 386 |
OBJS-$(CONFIG_S302M_DECODER) += s302m.o |
389 | 387 |
OBJS-$(CONFIG_SANM_DECODER) += sanm.o |
... | ... |
@@ -397,10 +390,9 @@ OBJS-$(CONFIG_SIPR_DECODER) += sipr.o acelp_pitch_delay.o \ |
397 | 397 |
OBJS-$(CONFIG_SMACKAUD_DECODER) += smacker.o |
398 | 398 |
OBJS-$(CONFIG_SMACKER_DECODER) += smacker.o |
399 | 399 |
OBJS-$(CONFIG_SMC_DECODER) += smc.o |
400 |
-OBJS-$(CONFIG_SNOW_DECODER) += snowdec.o snow.o rangecoder.o |
|
401 |
-OBJS-$(CONFIG_SNOW_ENCODER) += snowenc.o snow.o rangecoder.o \ |
|
402 |
- h263.o ituh263enc.o \ |
|
403 |
- error_resilience.o |
|
400 |
+OBJS-$(CONFIG_SNOW_DECODER) += snowdec.o snow.o |
|
401 |
+OBJS-$(CONFIG_SNOW_ENCODER) += snowenc.o snow.o \ |
|
402 |
+ h263.o ituh263enc.o |
|
404 | 403 |
OBJS-$(CONFIG_SOL_DPCM_DECODER) += dpcm.o |
405 | 404 |
OBJS-$(CONFIG_SONIC_DECODER) += sonic.o |
406 | 405 |
OBJS-$(CONFIG_SONIC_ENCODER) += sonic.o |
... | ... |
@@ -413,16 +405,13 @@ OBJS-$(CONFIG_SUBRIP_ENCODER) += srtenc.o ass_split.o |
413 | 413 |
OBJS-$(CONFIG_SUBVIEWER_DECODER) += subviewerdec.o ass.o |
414 | 414 |
OBJS-$(CONFIG_SUNRAST_DECODER) += sunrast.o |
415 | 415 |
OBJS-$(CONFIG_SUNRAST_ENCODER) += sunrastenc.o |
416 |
-OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.o svq1.o h263.o \ |
|
417 |
- error_resilience.o |
|
416 |
+OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.o svq1.o h263.o |
|
418 | 417 |
OBJS-$(CONFIG_SVQ1_ENCODER) += svq1enc.o svq1.o \ |
419 |
- h263.o ituh263enc.o \ |
|
420 |
- error_resilience.o |
|
418 |
+ h263.o ituh263enc.o |
|
421 | 419 |
OBJS-$(CONFIG_SVQ3_DECODER) += h264.o svq3.o \ |
422 | 420 |
h264_loopfilter.o h264_direct.o \ |
423 | 421 |
h264_sei.o h264_ps.o h264_refs.o \ |
424 | 422 |
h264_cavlc.o h264_cabac.o cabac.o \ |
425 |
- error_resilience.o \ |
|
426 | 423 |
svq1dec.o svq1.o h263.o |
427 | 424 |
OBJS-$(CONFIG_TARGA_DECODER) += targa.o |
428 | 425 |
OBJS-$(CONFIG_TARGA_ENCODER) += targaenc.o rle.o |
... | ... |
@@ -715,27 +704,24 @@ OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264.o \ |
715 | 715 |
cabac.o \ |
716 | 716 |
h264_refs.o h264_sei.o h264_direct.o \ |
717 | 717 |
h264_loopfilter.o h264_cabac.o \ |
718 |
- h264_cavlc.o h264_ps.o \ |
|
719 |
- error_resilience.o |
|
718 |
+ h264_cavlc.o h264_ps.o |
|
720 | 719 |
OBJS-$(CONFIG_AAC_LATM_PARSER) += latm_parser.o |
721 | 720 |
OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o |
722 | 721 |
OBJS-$(CONFIG_MLP_PARSER) += mlp_parser.o mlp.o |
723 | 722 |
OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o \ |
724 |
- error_resilience.o \ |
|
725 | 723 |
mpeg4videodec.o mpeg4video.o \ |
726 | 724 |
ituh263dec.o h263dec.o |
727 | 725 |
OBJS-$(CONFIG_PNG_PARSER) += png_parser.o |
728 | 726 |
OBJS-$(CONFIG_MPEGAUDIO_PARSER) += mpegaudio_parser.o \ |
729 | 727 |
mpegaudiodecheader.o mpegaudiodata.o |
730 | 728 |
OBJS-$(CONFIG_MPEGVIDEO_PARSER) += mpegvideo_parser.o \ |
731 |
- mpeg12.o mpeg12data.o \ |
|
732 |
- error_resilience.o |
|
729 |
+ mpeg12.o mpeg12data.o |
|
733 | 730 |
OBJS-$(CONFIG_PNM_PARSER) += pnm_parser.o pnm.o |
734 | 731 |
OBJS-$(CONFIG_RV30_PARSER) += rv34_parser.o |
735 | 732 |
OBJS-$(CONFIG_RV40_PARSER) += rv34_parser.o |
736 | 733 |
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o \ |
737 | 734 |
msmpeg4.o msmpeg4data.o mpeg4video.o \ |
738 |
- h263.o error_resilience.o |
|
735 |
+ h263.o |
|
739 | 736 |
OBJS-$(CONFIG_VORBIS_PARSER) += vorbis_parser.o xiph.o |
740 | 737 |
OBJS-$(CONFIG_VP3_PARSER) += vp3_parser.o |
741 | 738 |
OBJS-$(CONFIG_VP8_PARSER) += vp8_parser.o |
... | ... |
@@ -19,9 +19,13 @@ |
19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 |
*/ |
21 | 21 |
|
22 |
+#include <string.h> |
|
23 |
+ |
|
22 | 24 |
#include "avcodec.h" |
23 | 25 |
#include "ass.h" |
24 | 26 |
#include "ass_split.h" |
27 |
+#include "libavutil/internal.h" |
|
28 |
+#include "libavutil/mem.h" |
|
25 | 29 |
|
26 | 30 |
static av_cold int ass_decode_init(AVCodecContext *avctx) |
27 | 31 |
{ |
... | ... |
@@ -19,8 +19,12 @@ |
19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 |
*/ |
21 | 21 |
|
22 |
+#include <string.h> |
|
23 |
+ |
|
22 | 24 |
#include "avcodec.h" |
23 | 25 |
#include "libavutil/avstring.h" |
26 |
+#include "libavutil/internal.h" |
|
27 |
+#include "libavutil/mem.h" |
|
24 | 28 |
|
25 | 29 |
static av_cold int ass_encode_init(AVCodecContext *avctx) |
26 | 30 |
{ |
... | ... |
@@ -19,10 +19,13 @@ |
19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 |
*/ |
21 | 21 |
|
22 |
-#include "internal.h" |
|
22 |
+#include <string.h> |
|
23 |
+ |
|
23 | 24 |
#include "libavutil/avassert.h" |
24 |
-#include "bytestream.h" |
|
25 |
+#include "libavutil/mem.h" |
|
25 | 26 |
#include "avcodec.h" |
27 |
+#include "bytestream.h" |
|
28 |
+#include "internal.h" |
|
26 | 29 |
|
27 | 30 |
void av_destruct_packet_nofree(AVPacket *pkt) |
28 | 31 |
{ |
... | ... |
@@ -18,7 +18,10 @@ |
18 | 18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
19 | 19 |
*/ |
20 | 20 |
|
21 |
+#include <string.h> |
|
22 |
+ |
|
21 | 23 |
#include "avcodec.h" |
24 |
+#include "libavutil/mem.h" |
|
22 | 25 |
|
23 | 26 |
|
24 | 27 |
static int dump_extradata(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, |
... | ... |
@@ -20,8 +20,12 @@ |
20 | 20 |
*/ |
21 | 21 |
|
22 | 22 |
#include <vo-amrwbenc/enc_if.h> |
23 |
+#include <stdio.h> |
|
24 |
+#include <stdlib.h> |
|
23 | 25 |
|
24 | 26 |
#include "libavutil/avstring.h" |
27 |
+#include "libavutil/internal.h" |
|
28 |
+#include "libavutil/mem.h" |
|
25 | 29 |
#include "libavutil/opt.h" |
26 | 30 |
#include "avcodec.h" |
27 | 31 |
#include "internal.h" |
... | ... |
@@ -19,7 +19,9 @@ |
19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 |
*/ |
21 | 21 |
|
22 |
+#include "libavutil/internal.h" |
|
22 | 23 |
#include "libavutil/opt.h" |
24 |
+#include "libavutil/mem.h" |
|
23 | 25 |
#include "libavutil/pixdesc.h" |
24 | 26 |
#include "avcodec.h" |
25 | 27 |
#include "internal.h" |
... | ... |
@@ -18,7 +18,11 @@ |
18 | 18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
19 | 19 |
*/ |
20 | 20 |
|
21 |
+#include <stdlib.h> |
|
22 |
+#include <string.h> |
|
23 |
+ |
|
21 | 24 |
#include "avcodec.h" |
25 |
+#include "libavutil/mem.h" |
|
22 | 26 |
|
23 | 27 |
|
24 | 28 |
static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, |
... | ... |
@@ -27,8 +27,10 @@ |
27 | 27 |
#include "avcodec.h" |
28 | 28 |
#include "internal.h" |
29 | 29 |
#include "libavutil/avassert.h" |
30 |
+#include "libavutil/mem.h" |
|
30 | 31 |
#include "libavutil/opt.h" |
31 | 32 |
#include <float.h> /* FLT_MIN, FLT_MAX */ |
33 |
+#include <string.h> |
|
32 | 34 |
|
33 | 35 |
#include "options_table.h" |
34 | 36 |
|
... | ... |
@@ -22,6 +22,7 @@ |
22 | 22 |
|
23 | 23 |
#include "proresdsp.h" |
24 | 24 |
#include "simple_idct.h" |
25 |
+#include "libavutil/common.h" |
|
25 | 26 |
|
26 | 27 |
#define BIAS (1 << (PRORES_BITS_PER_SAMPLE - 1)) ///< bias value for converting signed pixels into unsigned ones |
27 | 28 |
#define CLIP_MIN (1 << (PRORES_BITS_PER_SAMPLE - 8)) ///< minimum value for clipping resulting pixels |
... | ... |
@@ -19,9 +19,12 @@ |
19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 |
*/ |
21 | 21 |
|
22 |
+#include <string.h> |
|
23 |
+ |
|
22 | 24 |
#include "avcodec.h" |
23 | 25 |
#include "psymodel.h" |
24 | 26 |
#include "iirfilter.h" |
27 |
+#include "libavutil/mem.h" |
|
25 | 28 |
|
26 | 29 |
extern const FFPsyModel ff_aac_psy_model; |
27 | 30 |
|
... | ... |
@@ -24,9 +24,12 @@ |
24 | 24 |
* samplerate conversion for both audio and video |
25 | 25 |
*/ |
26 | 26 |
|
27 |
+#include <string.h> |
|
28 |
+ |
|
27 | 29 |
#include "avcodec.h" |
28 | 30 |
#include "audioconvert.h" |
29 | 31 |
#include "libavutil/opt.h" |
32 |
+#include "libavutil/mem.h" |
|
30 | 33 |
#include "libavutil/samplefmt.h" |
31 | 34 |
|
32 | 35 |
#define MAX_CHANNELS 8 |
... | ... |
@@ -28,6 +28,7 @@ |
28 | 28 |
#include "dsputil.h" |
29 | 29 |
#include "rv34dsp.h" |
30 | 30 |
#include "libavutil/avassert.h" |
31 |
+#include "libavutil/common.h" |
|
31 | 32 |
|
32 | 33 |
#define RV40_LOWPASS(OPNAME, OP) \ |
33 | 34 |
static av_unused void OPNAME ## rv40_qpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride,\ |
... | ... |
@@ -22,8 +22,11 @@ |
22 | 22 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
23 | 23 |
*/ |
24 | 24 |
|
25 |
+#include <stdint.h> |
|
26 |
+ |
|
25 | 27 |
#include "libavcodec/dsputil.h" |
26 | 28 |
#include "dsputil_vis.h" |
29 |
+#include "libavutil/mem.h" |
|
27 | 30 |
|
28 | 31 |
static const DECLARE_ALIGNED(8, int16_t, coeffs)[28] = { |
29 | 32 |
- 1259,- 1259,- 1259,- 1259, |
... | ... |
@@ -30,12 +30,12 @@ |
30 | 30 |
#include "libavutil/opt.h" |
31 | 31 |
|
32 | 32 |
#include "avcodec.h" |
33 |
-#include "internal.h" |
|
33 |
+#include "config.h" |
|
34 | 34 |
#if CONFIG_ZLIB |
35 | 35 |
#include <zlib.h> |
36 | 36 |
#endif |
37 |
-#include "libavutil/opt.h" |
|
38 | 37 |
#include "bytestream.h" |
38 |
+#include "internal.h" |
|
39 | 39 |
#include "tiff.h" |
40 | 40 |
#include "rle.h" |
41 | 41 |
#include "lzw.h" |
... | ... |
@@ -25,9 +25,9 @@ MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_init.o |
25 | 25 |
MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o |
26 | 26 |
MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o |
27 | 27 |
MMX-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec_mmx.o |
28 |
-MMX-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp-init.o |
|
29 |
-MMX-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp-init.o |
|
30 |
-MMX-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp-init.o |
|
28 |
+MMX-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp_init.o |
|
29 |
+MMX-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp_init.o |
|
30 |
+MMX-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp_init.o |
|
31 | 31 |
MMX-OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp_init.o |
32 | 32 |
MMX-OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp_init.o \ |
33 | 33 |
x86/rv40dsp_init.o |
... | ... |
@@ -35,7 +35,7 @@ MMX-OBJS-$(CONFIG_V210_DECODER) += x86/v210-init.o |
35 | 35 |
MMX-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_mmx.o |
36 | 36 |
MMX-OBJS-$(CONFIG_VP5_DECODER) += x86/vp56dsp_init.o |
37 | 37 |
MMX-OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp_init.o |
38 |
-MMX-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp-init.o |
|
38 |
+MMX-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp_init.o |
|
39 | 39 |
|
40 | 40 |
YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o |
41 | 41 |
YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o |
28 | 30 |
deleted file mode 100644 |
... | ... |
@@ -1,51 +0,0 @@ |
1 |
-/* |
|
2 |
- * x86 PNG optimizations. |
|
3 |
- * Copyright (c) 2008 Loren Merrit <lorenm@u.washington.edu> |
|
4 |
- * |
|
5 |
- * This file is part of FFmpeg. |
|
6 |
- * |
|
7 |
- * FFmpeg is free software; you can redistribute it and/or |
|
8 |
- * modify it under the terms of the GNU Lesser General Public |
|
9 |
- * License as published by the Free Software Foundation; either |
|
10 |
- * version 2.1 of the License, or (at your option) any later version. |
|
11 |
- * |
|
12 |
- * FFmpeg is distributed in the hope that it will be useful, |
|
13 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
15 |
- * Lesser General Public License for more details. |
|
16 |
- * |
|
17 |
- * You should have received a copy of the GNU Lesser General Public |
|
18 |
- * License along with FFmpeg; if not, write to the Free Software |
|
19 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
20 |
- */ |
|
21 |
- |
|
22 |
-#include "libavutil/common.h" |
|
23 |
-#include "libavutil/cpu.h" |
|
24 |
-#include "libavcodec/pngdsp.h" |
|
25 |
- |
|
26 |
-void ff_add_png_paeth_prediction_mmx2 (uint8_t *dst, uint8_t *src, |
|
27 |
- uint8_t *top, int w, int bpp); |
|
28 |
-void ff_add_png_paeth_prediction_ssse3(uint8_t *dst, uint8_t *src, |
|
29 |
- uint8_t *top, int w, int bpp); |
|
30 |
-void ff_add_bytes_l2_mmx (uint8_t *dst, uint8_t *src1, |
|
31 |
- uint8_t *src2, int w); |
|
32 |
-void ff_add_bytes_l2_sse2(uint8_t *dst, uint8_t *src1, |
|
33 |
- uint8_t *src2, int w); |
|
34 |
- |
|
35 |
-void ff_pngdsp_init_x86(PNGDSPContext *dsp) |
|
36 |
-{ |
|
37 |
-#if HAVE_YASM |
|
38 |
- int flags = av_get_cpu_flags(); |
|
39 |
- |
|
40 |
-#if ARCH_X86_32 |
|
41 |
- if (flags & AV_CPU_FLAG_MMX) |
|
42 |
- dsp->add_bytes_l2 = ff_add_bytes_l2_mmx; |
|
43 |
-#endif |
|
44 |
- if (flags & AV_CPU_FLAG_MMXEXT) |
|
45 |
- dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmx2; |
|
46 |
- if (flags & AV_CPU_FLAG_SSE2) |
|
47 |
- dsp->add_bytes_l2 = ff_add_bytes_l2_sse2; |
|
48 |
- if (flags & AV_CPU_FLAG_SSSE3) |
|
49 |
- dsp->add_paeth_prediction = ff_add_png_paeth_prediction_ssse3; |
|
50 |
-#endif |
|
51 |
-} |
52 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,51 @@ |
0 |
+/* |
|
1 |
+ * x86 PNG optimizations. |
|
2 |
+ * Copyright (c) 2008 Loren Merrit <lorenm@u.washington.edu> |
|
3 |
+ * |
|
4 |
+ * This file is part of FFmpeg. |
|
5 |
+ * |
|
6 |
+ * FFmpeg is free software; you can redistribute it and/or |
|
7 |
+ * modify it under the terms of the GNU Lesser General Public |
|
8 |
+ * License as published by the Free Software Foundation; either |
|
9 |
+ * version 2.1 of the License, or (at your option) any later version. |
|
10 |
+ * |
|
11 |
+ * FFmpeg is distributed in the hope that it will be useful, |
|
12 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 |
+ * Lesser General Public License for more details. |
|
15 |
+ * |
|
16 |
+ * You should have received a copy of the GNU Lesser General Public |
|
17 |
+ * License along with FFmpeg; if not, write to the Free Software |
|
18 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
19 |
+ */ |
|
20 |
+ |
|
21 |
+#include "libavutil/common.h" |
|
22 |
+#include "libavutil/cpu.h" |
|
23 |
+#include "libavcodec/pngdsp.h" |
|
24 |
+ |
|
25 |
+void ff_add_png_paeth_prediction_mmx2 (uint8_t *dst, uint8_t *src, |
|
26 |
+ uint8_t *top, int w, int bpp); |
|
27 |
+void ff_add_png_paeth_prediction_ssse3(uint8_t *dst, uint8_t *src, |
|
28 |
+ uint8_t *top, int w, int bpp); |
|
29 |
+void ff_add_bytes_l2_mmx (uint8_t *dst, uint8_t *src1, |
|
30 |
+ uint8_t *src2, int w); |
|
31 |
+void ff_add_bytes_l2_sse2(uint8_t *dst, uint8_t *src1, |
|
32 |
+ uint8_t *src2, int w); |
|
33 |
+ |
|
34 |
+void ff_pngdsp_init_x86(PNGDSPContext *dsp) |
|
35 |
+{ |
|
36 |
+#if HAVE_YASM |
|
37 |
+ int flags = av_get_cpu_flags(); |
|
38 |
+ |
|
39 |
+#if ARCH_X86_32 |
|
40 |
+ if (flags & AV_CPU_FLAG_MMX) |
|
41 |
+ dsp->add_bytes_l2 = ff_add_bytes_l2_mmx; |
|
42 |
+#endif |
|
43 |
+ if (flags & AV_CPU_FLAG_MMXEXT) |
|
44 |
+ dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmx2; |
|
45 |
+ if (flags & AV_CPU_FLAG_SSE2) |
|
46 |
+ dsp->add_bytes_l2 = ff_add_bytes_l2_sse2; |
|
47 |
+ if (flags & AV_CPU_FLAG_SSSE3) |
|
48 |
+ dsp->add_paeth_prediction = ff_add_png_paeth_prediction_ssse3; |
|
49 |
+#endif |
|
50 |
+} |
0 | 51 |
deleted file mode 100644 |
... | ... |
@@ -1,57 +0,0 @@ |
1 |
-/* |
|
2 |
- * Apple ProRes compatible decoder |
|
3 |
- * |
|
4 |
- * Copyright (c) 2010-2011 Maxim Poliakovski |
|
5 |
- * |
|
6 |
- * This file is part of Libav. |
|
7 |
- * |
|
8 |
- * Libav is free software; you can redistribute it and/or |
|
9 |
- * modify it under the terms of the GNU Lesser General Public |
|
10 |
- * License as published by the Free Software Foundation; either |
|
11 |
- * version 2.1 of the License, or (at your option) any later version. |
|
12 |
- * |
|
13 |
- * Libav is distributed in the hope that it will be useful, |
|
14 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
16 |
- * Lesser General Public License for more details. |
|
17 |
- * |
|
18 |
- * You should have received a copy of the GNU Lesser General Public |
|
19 |
- * License along with Libav; if not, write to the Free Software |
|
20 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
21 |
- */ |
|
22 |
- |
|
23 |
-#include "libavcodec/proresdsp.h" |
|
24 |
- |
|
25 |
-void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize, |
|
26 |
- DCTELEM *block, const int16_t *qmat); |
|
27 |
-void ff_prores_idct_put_10_sse4(uint16_t *dst, int linesize, |
|
28 |
- DCTELEM *block, const int16_t *qmat); |
|
29 |
-void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize, |
|
30 |
- DCTELEM *block, const int16_t *qmat); |
|
31 |
- |
|
32 |
-void ff_proresdsp_x86_init(ProresDSPContext *dsp, AVCodecContext *avctx) |
|
33 |
-{ |
|
34 |
-#if ARCH_X86_64 && HAVE_YASM |
|
35 |
- int flags = av_get_cpu_flags(); |
|
36 |
- |
|
37 |
- if(avctx->flags & CODEC_FLAG_BITEXACT) |
|
38 |
- return; |
|
39 |
- |
|
40 |
- if (flags & AV_CPU_FLAG_SSE2) { |
|
41 |
- dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
|
42 |
- dsp->idct_put = ff_prores_idct_put_10_sse2; |
|
43 |
- } |
|
44 |
- |
|
45 |
- if (flags & AV_CPU_FLAG_SSE4) { |
|
46 |
- dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
|
47 |
- dsp->idct_put = ff_prores_idct_put_10_sse4; |
|
48 |
- } |
|
49 |
- |
|
50 |
-#if HAVE_AVX |
|
51 |
- if (flags & AV_CPU_FLAG_AVX) { |
|
52 |
- dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
|
53 |
- dsp->idct_put = ff_prores_idct_put_10_avx; |
|
54 |
- } |
|
55 |
-#endif /* HAVE_AVX */ |
|
56 |
-#endif /* ARCH_X86_64 && HAVE_YASM */ |
|
57 |
-} |
58 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,57 @@ |
0 |
+/* |
|
1 |
+ * Apple ProRes compatible decoder |
|
2 |
+ * |
|
3 |
+ * Copyright (c) 2010-2011 Maxim Poliakovski |
|
4 |
+ * |
|
5 |
+ * This file is part of FFmpeg. |
|
6 |
+ * |
|
7 |
+ * FFmpeg is free software; you can redistribute it and/or |
|
8 |
+ * modify it under the terms of the GNU Lesser General Public |
|
9 |
+ * License as published by the Free Software Foundation; either |
|
10 |
+ * version 2.1 of the License, or (at your option) any later version. |
|
11 |
+ * |
|
12 |
+ * FFmpeg is distributed in the hope that it will be useful, |
|
13 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
15 |
+ * Lesser General Public License for more details. |
|
16 |
+ * |
|
17 |
+ * You should have received a copy of the GNU Lesser General Public |
|
18 |
+ * License along with FFmpeg; if not, write to the Free Software |
|
19 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
20 |
+ */ |
|
21 |
+ |
|
22 |
+#include "libavcodec/proresdsp.h" |
|
23 |
+ |
|
24 |
+void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize, |
|
25 |
+ DCTELEM *block, const int16_t *qmat); |
|
26 |
+void ff_prores_idct_put_10_sse4(uint16_t *dst, int linesize, |
|
27 |
+ DCTELEM *block, const int16_t *qmat); |
|
28 |
+void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize, |
|
29 |
+ DCTELEM *block, const int16_t *qmat); |
|
30 |
+ |
|
31 |
+void ff_proresdsp_x86_init(ProresDSPContext *dsp, AVCodecContext *avctx) |
|
32 |
+{ |
|
33 |
+#if ARCH_X86_64 && HAVE_YASM |
|
34 |
+ int flags = av_get_cpu_flags(); |
|
35 |
+ |
|
36 |
+ if(avctx->flags & CODEC_FLAG_BITEXACT) |
|
37 |
+ return; |
|
38 |
+ |
|
39 |
+ if (flags & AV_CPU_FLAG_SSE2) { |
|
40 |
+ dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
|
41 |
+ dsp->idct_put = ff_prores_idct_put_10_sse2; |
|
42 |
+ } |
|
43 |
+ |
|
44 |
+ if (flags & AV_CPU_FLAG_SSE4) { |
|
45 |
+ dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
|
46 |
+ dsp->idct_put = ff_prores_idct_put_10_sse4; |
|
47 |
+ } |
|
48 |
+ |
|
49 |
+#if HAVE_AVX |
|
50 |
+ if (flags & AV_CPU_FLAG_AVX) { |
|
51 |
+ dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
|
52 |
+ dsp->idct_put = ff_prores_idct_put_10_avx; |
|
53 |
+ } |
|
54 |
+#endif /* HAVE_AVX */ |
|
55 |
+#endif /* ARCH_X86_64 && HAVE_YASM */ |
|
56 |
+} |
31 | 33 |
deleted file mode 100644 |
... | ... |
@@ -1,449 +0,0 @@ |
1 |
-/* |
|
2 |
- * VP8 DSP functions x86-optimized |
|
3 |
- * Copyright (c) 2010 Ronald S. Bultje <rsbultje@gmail.com> |
|
4 |
- * Copyright (c) 2010 Jason Garrett-Glaser <darkshikari@gmail.com> |
|
5 |
- * |
|
6 |
- * This file is part of FFmpeg. |
|
7 |
- * |
|
8 |
- * FFmpeg is free software; you can redistribute it and/or |
|
9 |
- * modify it under the terms of the GNU Lesser General Public |
|
10 |
- * License as published by the Free Software Foundation; either |
|
11 |
- * version 2.1 of the License, or (at your option) any later version. |
|
12 |
- * |
|
13 |
- * FFmpeg is distributed in the hope that it will be useful, |
|
14 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
16 |
- * Lesser General Public License for more details. |
|
17 |
- * |
|
18 |
- * You should have received a copy of the GNU Lesser General Public |
|
19 |
- * License along with FFmpeg; if not, write to the Free Software |
|
20 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
21 |
- */ |
|
22 |
- |
|
23 |
-#include "libavutil/cpu.h" |
|
24 |
-#include "libavutil/x86/asm.h" |
|
25 |
-#include "libavcodec/vp8dsp.h" |
|
26 |
- |
|
27 |
-#if HAVE_YASM |
|
28 |
- |
|
29 |
-/* |
|
30 |
- * MC functions |
|
31 |
- */ |
|
32 |
-extern void ff_put_vp8_epel4_h4_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
33 |
- uint8_t *src, ptrdiff_t srcstride, |
|
34 |
- int height, int mx, int my); |
|
35 |
-extern void ff_put_vp8_epel4_h6_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
36 |
- uint8_t *src, ptrdiff_t srcstride, |
|
37 |
- int height, int mx, int my); |
|
38 |
-extern void ff_put_vp8_epel4_v4_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
39 |
- uint8_t *src, ptrdiff_t srcstride, |
|
40 |
- int height, int mx, int my); |
|
41 |
-extern void ff_put_vp8_epel4_v6_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
42 |
- uint8_t *src, ptrdiff_t srcstride, |
|
43 |
- int height, int mx, int my); |
|
44 |
- |
|
45 |
-extern void ff_put_vp8_epel8_h4_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
46 |
- uint8_t *src, ptrdiff_t srcstride, |
|
47 |
- int height, int mx, int my); |
|
48 |
-extern void ff_put_vp8_epel8_h6_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
49 |
- uint8_t *src, ptrdiff_t srcstride, |
|
50 |
- int height, int mx, int my); |
|
51 |
-extern void ff_put_vp8_epel8_v4_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
52 |
- uint8_t *src, ptrdiff_t srcstride, |
|
53 |
- int height, int mx, int my); |
|
54 |
-extern void ff_put_vp8_epel8_v6_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
55 |
- uint8_t *src, ptrdiff_t srcstride, |
|
56 |
- int height, int mx, int my); |
|
57 |
- |
|
58 |
-extern void ff_put_vp8_epel4_h4_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
59 |
- uint8_t *src, ptrdiff_t srcstride, |
|
60 |
- int height, int mx, int my); |
|
61 |
-extern void ff_put_vp8_epel4_h6_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
62 |
- uint8_t *src, ptrdiff_t srcstride, |
|
63 |
- int height, int mx, int my); |
|
64 |
-extern void ff_put_vp8_epel4_v4_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
65 |
- uint8_t *src, ptrdiff_t srcstride, |
|
66 |
- int height, int mx, int my); |
|
67 |
-extern void ff_put_vp8_epel4_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
68 |
- uint8_t *src, ptrdiff_t srcstride, |
|
69 |
- int height, int mx, int my); |
|
70 |
-extern void ff_put_vp8_epel8_h4_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
71 |
- uint8_t *src, ptrdiff_t srcstride, |
|
72 |
- int height, int mx, int my); |
|
73 |
-extern void ff_put_vp8_epel8_h6_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
74 |
- uint8_t *src, ptrdiff_t srcstride, |
|
75 |
- int height, int mx, int my); |
|
76 |
-extern void ff_put_vp8_epel8_v4_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
77 |
- uint8_t *src, ptrdiff_t srcstride, |
|
78 |
- int height, int mx, int my); |
|
79 |
-extern void ff_put_vp8_epel8_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
80 |
- uint8_t *src, ptrdiff_t srcstride, |
|
81 |
- int height, int mx, int my); |
|
82 |
- |
|
83 |
-extern void ff_put_vp8_bilinear4_h_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
84 |
- uint8_t *src, ptrdiff_t srcstride, |
|
85 |
- int height, int mx, int my); |
|
86 |
-extern void ff_put_vp8_bilinear8_h_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
87 |
- uint8_t *src, ptrdiff_t srcstride, |
|
88 |
- int height, int mx, int my); |
|
89 |
-extern void ff_put_vp8_bilinear4_h_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
90 |
- uint8_t *src, ptrdiff_t srcstride, |
|
91 |
- int height, int mx, int my); |
|
92 |
-extern void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
93 |
- uint8_t *src, ptrdiff_t srcstride, |
|
94 |
- int height, int mx, int my); |
|
95 |
- |
|
96 |
-extern void ff_put_vp8_bilinear4_v_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
97 |
- uint8_t *src, ptrdiff_t srcstride, |
|
98 |
- int height, int mx, int my); |
|
99 |
-extern void ff_put_vp8_bilinear8_v_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
100 |
- uint8_t *src, ptrdiff_t srcstride, |
|
101 |
- int height, int mx, int my); |
|
102 |
-extern void ff_put_vp8_bilinear4_v_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
103 |
- uint8_t *src, ptrdiff_t srcstride, |
|
104 |
- int height, int mx, int my); |
|
105 |
-extern void ff_put_vp8_bilinear8_v_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
106 |
- uint8_t *src, ptrdiff_t srcstride, |
|
107 |
- int height, int mx, int my); |
|
108 |
- |
|
109 |
- |
|
110 |
-extern void ff_put_vp8_pixels8_mmx (uint8_t *dst, ptrdiff_t dststride, |
|
111 |
- uint8_t *src, ptrdiff_t srcstride, |
|
112 |
- int height, int mx, int my); |
|
113 |
-extern void ff_put_vp8_pixels16_mmx(uint8_t *dst, ptrdiff_t dststride, |
|
114 |
- uint8_t *src, ptrdiff_t srcstride, |
|
115 |
- int height, int mx, int my); |
|
116 |
-extern void ff_put_vp8_pixels16_sse(uint8_t *dst, ptrdiff_t dststride, |
|
117 |
- uint8_t *src, ptrdiff_t srcstride, |
|
118 |
- int height, int mx, int my); |
|
119 |
- |
|
120 |
-#define TAP_W16(OPT, FILTERTYPE, TAPTYPE) \ |
|
121 |
-static void ff_put_vp8_ ## FILTERTYPE ## 16_ ## TAPTYPE ## _ ## OPT( \ |
|
122 |
- uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ |
|
123 |
- ptrdiff_t srcstride, int height, int mx, int my) \ |
|
124 |
-{ \ |
|
125 |
- ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \ |
|
126 |
- dst, dststride, src, srcstride, height, mx, my); \ |
|
127 |
- ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \ |
|
128 |
- dst + 8, dststride, src + 8, srcstride, height, mx, my); \ |
|
129 |
-} |
|
130 |
-#define TAP_W8(OPT, FILTERTYPE, TAPTYPE) \ |
|
131 |
-static void ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \ |
|
132 |
- uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ |
|
133 |
- ptrdiff_t srcstride, int height, int mx, int my) \ |
|
134 |
-{ \ |
|
135 |
- ff_put_vp8_ ## FILTERTYPE ## 4_ ## TAPTYPE ## _ ## OPT( \ |
|
136 |
- dst, dststride, src, srcstride, height, mx, my); \ |
|
137 |
- ff_put_vp8_ ## FILTERTYPE ## 4_ ## TAPTYPE ## _ ## OPT( \ |
|
138 |
- dst + 4, dststride, src + 4, srcstride, height, mx, my); \ |
|
139 |
-} |
|
140 |
- |
|
141 |
-#if ARCH_X86_32 |
|
142 |
-TAP_W8 (mmx2, epel, h4) |
|
143 |
-TAP_W8 (mmx2, epel, h6) |
|
144 |
-TAP_W16(mmx2, epel, h6) |
|
145 |
-TAP_W8 (mmx2, epel, v4) |
|
146 |
-TAP_W8 (mmx2, epel, v6) |
|
147 |
-TAP_W16(mmx2, epel, v6) |
|
148 |
-TAP_W8 (mmx2, bilinear, h) |
|
149 |
-TAP_W16(mmx2, bilinear, h) |
|
150 |
-TAP_W8 (mmx2, bilinear, v) |
|
151 |
-TAP_W16(mmx2, bilinear, v) |
|
152 |
-#endif |
|
153 |
- |
|
154 |
-TAP_W16(sse2, epel, h6) |
|
155 |
-TAP_W16(sse2, epel, v6) |
|
156 |
-TAP_W16(sse2, bilinear, h) |
|
157 |
-TAP_W16(sse2, bilinear, v) |
|
158 |
- |
|
159 |
-TAP_W16(ssse3, epel, h6) |
|
160 |
-TAP_W16(ssse3, epel, v6) |
|
161 |
-TAP_W16(ssse3, bilinear, h) |
|
162 |
-TAP_W16(ssse3, bilinear, v) |
|
163 |
- |
|
164 |
-#define HVTAP(OPT, ALIGN, TAPNUMX, TAPNUMY, SIZE, MAXHEIGHT) \ |
|
165 |
-static void ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## v ## TAPNUMY ## _ ## OPT( \ |
|
166 |
- uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ |
|
167 |
- ptrdiff_t srcstride, int height, int mx, int my) \ |
|
168 |
-{ \ |
|
169 |
- DECLARE_ALIGNED(ALIGN, uint8_t, tmp)[SIZE * (MAXHEIGHT + TAPNUMY - 1)]; \ |
|
170 |
- uint8_t *tmpptr = tmp + SIZE * (TAPNUMY / 2 - 1); \ |
|
171 |
- src -= srcstride * (TAPNUMY / 2 - 1); \ |
|
172 |
- ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## _ ## OPT( \ |
|
173 |
- tmp, SIZE, src, srcstride, height + TAPNUMY - 1, mx, my); \ |
|
174 |
- ff_put_vp8_epel ## SIZE ## _v ## TAPNUMY ## _ ## OPT( \ |
|
175 |
- dst, dststride, tmpptr, SIZE, height, mx, my); \ |
|
176 |
-} |
|
177 |
- |
|
178 |
-#if ARCH_X86_32 |
|
179 |
-#define HVTAPMMX(x, y) \ |
|
180 |
-HVTAP(mmx2, 8, x, y, 4, 8) \ |
|
181 |
-HVTAP(mmx2, 8, x, y, 8, 16) |
|
182 |
- |
|
183 |
-HVTAP(mmx2, 8, 6, 6, 16, 16) |
|
184 |
-#else |
|
185 |
-#define HVTAPMMX(x, y) \ |
|
186 |
-HVTAP(mmx2, 8, x, y, 4, 8) |
|
187 |
-#endif |
|
188 |
- |
|
189 |
-HVTAPMMX(4, 4) |
|
190 |
-HVTAPMMX(4, 6) |
|
191 |
-HVTAPMMX(6, 4) |
|
192 |
-HVTAPMMX(6, 6) |
|
193 |
- |
|
194 |
-#define HVTAPSSE2(x, y, w) \ |
|
195 |
-HVTAP(sse2, 16, x, y, w, 16) \ |
|
196 |
-HVTAP(ssse3, 16, x, y, w, 16) |
|
197 |
- |
|
198 |
-HVTAPSSE2(4, 4, 8) |
|
199 |
-HVTAPSSE2(4, 6, 8) |
|
200 |
-HVTAPSSE2(6, 4, 8) |
|
201 |
-HVTAPSSE2(6, 6, 8) |
|
202 |
-HVTAPSSE2(6, 6, 16) |
|
203 |
- |
|
204 |
-HVTAP(ssse3, 16, 4, 4, 4, 8) |
|
205 |
-HVTAP(ssse3, 16, 4, 6, 4, 8) |
|
206 |
-HVTAP(ssse3, 16, 6, 4, 4, 8) |
|
207 |
-HVTAP(ssse3, 16, 6, 6, 4, 8) |
|
208 |
- |
|
209 |
-#define HVBILIN(OPT, ALIGN, SIZE, MAXHEIGHT) \ |
|
210 |
-static void ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT( \ |
|
211 |
- uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ |
|
212 |
- ptrdiff_t srcstride, int height, int mx, int my) \ |
|
213 |
-{ \ |
|
214 |
- DECLARE_ALIGNED(ALIGN, uint8_t, tmp)[SIZE * (MAXHEIGHT + 2)]; \ |
|
215 |
- ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT( \ |
|
216 |
- tmp, SIZE, src, srcstride, height + 1, mx, my); \ |
|
217 |
- ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT( \ |
|
218 |
- dst, dststride, tmp, SIZE, height, mx, my); \ |
|
219 |
-} |
|
220 |
- |
|
221 |
-HVBILIN(mmx2, 8, 4, 8) |
|
222 |
-#if ARCH_X86_32 |
|
223 |
-HVBILIN(mmx2, 8, 8, 16) |
|
224 |
-HVBILIN(mmx2, 8, 16, 16) |
|
225 |
-#endif |
|
226 |
-HVBILIN(sse2, 8, 8, 16) |
|
227 |
-HVBILIN(sse2, 8, 16, 16) |
|
228 |
-HVBILIN(ssse3, 8, 4, 8) |
|
229 |
-HVBILIN(ssse3, 8, 8, 16) |
|
230 |
-HVBILIN(ssse3, 8, 16, 16) |
|
231 |
- |
|
232 |
-extern void ff_vp8_idct_dc_add_mmx(uint8_t *dst, DCTELEM block[16], |
|
233 |
- ptrdiff_t stride); |
|
234 |
-extern void ff_vp8_idct_dc_add_sse4(uint8_t *dst, DCTELEM block[16], |
|
235 |
- ptrdiff_t stride); |
|
236 |
-extern void ff_vp8_idct_dc_add4y_mmx(uint8_t *dst, DCTELEM block[4][16], |
|
237 |
- ptrdiff_t stride); |
|
238 |
-extern void ff_vp8_idct_dc_add4y_sse2(uint8_t *dst, DCTELEM block[4][16], |
|
239 |
- ptrdiff_t stride); |
|
240 |
-extern void ff_vp8_idct_dc_add4uv_mmx(uint8_t *dst, DCTELEM block[2][16], |
|
241 |
- ptrdiff_t stride); |
|
242 |
-extern void ff_vp8_luma_dc_wht_mmx(DCTELEM block[4][4][16], DCTELEM dc[16]); |
|
243 |
-extern void ff_vp8_luma_dc_wht_sse(DCTELEM block[4][4][16], DCTELEM dc[16]); |
|
244 |
-extern void ff_vp8_idct_add_mmx(uint8_t *dst, DCTELEM block[16], |
|
245 |
- ptrdiff_t stride); |
|
246 |
-extern void ff_vp8_idct_add_sse(uint8_t *dst, DCTELEM block[16], |
|
247 |
- ptrdiff_t stride); |
|
248 |
- |
|
249 |
-#define DECLARE_LOOP_FILTER(NAME)\ |
|
250 |
-extern void ff_vp8_v_loop_filter_simple_ ## NAME(uint8_t *dst, \ |
|
251 |
- ptrdiff_t stride, \ |
|
252 |
- int flim);\ |
|
253 |
-extern void ff_vp8_h_loop_filter_simple_ ## NAME(uint8_t *dst, \ |
|
254 |
- ptrdiff_t stride, \ |
|
255 |
- int flim);\ |
|
256 |
-extern void ff_vp8_v_loop_filter16y_inner_ ## NAME (uint8_t *dst, \ |
|
257 |
- ptrdiff_t stride,\ |
|
258 |
- int e, int i, int hvt);\ |
|
259 |
-extern void ff_vp8_h_loop_filter16y_inner_ ## NAME (uint8_t *dst, \ |
|
260 |
- ptrdiff_t stride,\ |
|
261 |
- int e, int i, int hvt);\ |
|
262 |
-extern void ff_vp8_v_loop_filter8uv_inner_ ## NAME (uint8_t *dstU, \ |
|
263 |
- uint8_t *dstV,\ |
|
264 |
- ptrdiff_t s, \ |
|
265 |
- int e, int i, int hvt);\ |
|
266 |
-extern void ff_vp8_h_loop_filter8uv_inner_ ## NAME (uint8_t *dstU, \ |
|
267 |
- uint8_t *dstV,\ |
|
268 |
- ptrdiff_t s, \ |
|
269 |
- int e, int i, int hvt);\ |
|
270 |
-extern void ff_vp8_v_loop_filter16y_mbedge_ ## NAME(uint8_t *dst, \ |
|
271 |
- ptrdiff_t stride,\ |
|
272 |
- int e, int i, int hvt);\ |
|
273 |
-extern void ff_vp8_h_loop_filter16y_mbedge_ ## NAME(uint8_t *dst, \ |
|
274 |
- ptrdiff_t stride,\ |
|
275 |
- int e, int i, int hvt);\ |
|
276 |
-extern void ff_vp8_v_loop_filter8uv_mbedge_ ## NAME(uint8_t *dstU, \ |
|
277 |
- uint8_t *dstV,\ |
|
278 |
- ptrdiff_t s, \ |
|
279 |
- int e, int i, int hvt);\ |
|
280 |
-extern void ff_vp8_h_loop_filter8uv_mbedge_ ## NAME(uint8_t *dstU, \ |
|
281 |
- uint8_t *dstV,\ |
|
282 |
- ptrdiff_t s, \ |
|
283 |
- int e, int i, int hvt); |
|
284 |
- |
|
285 |
-DECLARE_LOOP_FILTER(mmx) |
|
286 |
-DECLARE_LOOP_FILTER(mmx2) |
|
287 |
-DECLARE_LOOP_FILTER(sse2) |
|
288 |
-DECLARE_LOOP_FILTER(ssse3) |
|
289 |
-DECLARE_LOOP_FILTER(sse4) |
|
290 |
- |
|
291 |
-#endif |
|
292 |
- |
|
293 |
-#define VP8_LUMA_MC_FUNC(IDX, SIZE, OPT) \ |
|
294 |
- c->put_vp8_epel_pixels_tab[IDX][0][2] = ff_put_vp8_epel ## SIZE ## _h6_ ## OPT; \ |
|
295 |
- c->put_vp8_epel_pixels_tab[IDX][2][0] = ff_put_vp8_epel ## SIZE ## _v6_ ## OPT; \ |
|
296 |
- c->put_vp8_epel_pixels_tab[IDX][2][2] = ff_put_vp8_epel ## SIZE ## _h6v6_ ## OPT |
|
297 |
- |
|
298 |
-#define VP8_MC_FUNC(IDX, SIZE, OPT) \ |
|
299 |
- c->put_vp8_epel_pixels_tab[IDX][0][1] = ff_put_vp8_epel ## SIZE ## _h4_ ## OPT; \ |
|
300 |
- c->put_vp8_epel_pixels_tab[IDX][1][0] = ff_put_vp8_epel ## SIZE ## _v4_ ## OPT; \ |
|
301 |
- c->put_vp8_epel_pixels_tab[IDX][1][1] = ff_put_vp8_epel ## SIZE ## _h4v4_ ## OPT; \ |
|
302 |
- c->put_vp8_epel_pixels_tab[IDX][1][2] = ff_put_vp8_epel ## SIZE ## _h6v4_ ## OPT; \ |
|
303 |
- c->put_vp8_epel_pixels_tab[IDX][2][1] = ff_put_vp8_epel ## SIZE ## _h4v6_ ## OPT; \ |
|
304 |
- VP8_LUMA_MC_FUNC(IDX, SIZE, OPT) |
|
305 |
- |
|
306 |
-#define VP8_BILINEAR_MC_FUNC(IDX, SIZE, OPT) \ |
|
307 |
- c->put_vp8_bilinear_pixels_tab[IDX][0][1] = ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT; \ |
|
308 |
- c->put_vp8_bilinear_pixels_tab[IDX][0][2] = ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT; \ |
|
309 |
- c->put_vp8_bilinear_pixels_tab[IDX][1][0] = ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT; \ |
|
310 |
- c->put_vp8_bilinear_pixels_tab[IDX][1][1] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \ |
|
311 |
- c->put_vp8_bilinear_pixels_tab[IDX][1][2] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \ |
|
312 |
- c->put_vp8_bilinear_pixels_tab[IDX][2][0] = ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT; \ |
|
313 |
- c->put_vp8_bilinear_pixels_tab[IDX][2][1] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \ |
|
314 |
- c->put_vp8_bilinear_pixels_tab[IDX][2][2] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT |
|
315 |
- |
|
316 |
- |
|
317 |
-av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
|
318 |
-{ |
|
319 |
-#if HAVE_YASM |
|
320 |
- int mm_flags = av_get_cpu_flags(); |
|
321 |
- |
|
322 |
- if (mm_flags & AV_CPU_FLAG_MMX) { |
|
323 |
- c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; |
|
324 |
- c->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_mmx; |
|
325 |
-#if ARCH_X86_32 |
|
326 |
- c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_mmx; |
|
327 |
- c->vp8_idct_add = ff_vp8_idct_add_mmx; |
|
328 |
- c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_mmx; |
|
329 |
- c->put_vp8_epel_pixels_tab[0][0][0] = |
|
330 |
- c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_mmx; |
|
331 |
-#endif |
|
332 |
- c->put_vp8_epel_pixels_tab[1][0][0] = |
|
333 |
- c->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_mmx; |
|
334 |
- |
|
335 |
-#if ARCH_X86_32 |
|
336 |
- c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_mmx; |
|
337 |
- c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_mmx; |
|
338 |
- |
|
339 |
- c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_mmx; |
|
340 |
- c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_mmx; |
|
341 |
- c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_mmx; |
|
342 |
- c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_mmx; |
|
343 |
- |
|
344 |
- c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_mmx; |
|
345 |
- c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_mmx; |
|
346 |
- c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_mmx; |
|
347 |
- c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_mmx; |
|
348 |
-#endif |
|
349 |
- } |
|
350 |
- |
|
351 |
- /* note that 4-tap width=16 functions are missing because w=16 |
|
352 |
- * is only used for luma, and luma is always a copy or sixtap. */ |
|
353 |
- if (mm_flags & AV_CPU_FLAG_MMXEXT) { |
|
354 |
- VP8_MC_FUNC(2, 4, mmx2); |
|
355 |
- VP8_BILINEAR_MC_FUNC(2, 4, mmx2); |
|
356 |
-#if ARCH_X86_32 |
|
357 |
- VP8_LUMA_MC_FUNC(0, 16, mmx2); |
|
358 |
- VP8_MC_FUNC(1, 8, mmx2); |
|
359 |
- VP8_BILINEAR_MC_FUNC(0, 16, mmx2); |
|
360 |
- VP8_BILINEAR_MC_FUNC(1, 8, mmx2); |
|
361 |
- |
|
362 |
- c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_mmx2; |
|
363 |
- c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_mmx2; |
|
364 |
- |
|
365 |
- c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_mmx2; |
|
366 |
- c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_mmx2; |
|
367 |
- c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_mmx2; |
|
368 |
- c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_mmx2; |
|
369 |
- |
|
370 |
- c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_mmx2; |
|
371 |
- c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_mmx2; |
|
372 |
- c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_mmx2; |
|
373 |
- c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_mmx2; |
|
374 |
-#endif |
|
375 |
- } |
|
376 |
- |
|
377 |
- if (mm_flags & AV_CPU_FLAG_SSE) { |
|
378 |
- c->vp8_idct_add = ff_vp8_idct_add_sse; |
|
379 |
- c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_sse; |
|
380 |
- c->put_vp8_epel_pixels_tab[0][0][0] = |
|
381 |
- c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_sse; |
|
382 |
- } |
|
383 |
- |
|
384 |
- if (mm_flags & (AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW)) { |
|
385 |
- VP8_LUMA_MC_FUNC(0, 16, sse2); |
|
386 |
- VP8_MC_FUNC(1, 8, sse2); |
|
387 |
- VP8_BILINEAR_MC_FUNC(0, 16, sse2); |
|
388 |
- VP8_BILINEAR_MC_FUNC(1, 8, sse2); |
|
389 |
- |
|
390 |
- c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_sse2; |
|
391 |
- |
|
392 |
-#if ARCH_X86_64 || HAVE_ALIGNED_STACK |
|
393 |
- c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_sse2; |
|
394 |
- c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_sse2; |
|
395 |
- |
|
396 |
- c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_sse2; |
|
397 |
- c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_sse2; |
|
398 |
-#endif |
|
399 |
- } |
|
400 |
- |
|
401 |
- if (mm_flags & AV_CPU_FLAG_SSE2) { |
|
402 |
- c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_sse2; |
|
403 |
- |
|
404 |
- c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse2; |
|
405 |
- |
|
406 |
-#if ARCH_X86_64 || HAVE_ALIGNED_STACK |
|
407 |
- c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_sse2; |
|
408 |
- c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_sse2; |
|
409 |
- |
|
410 |
- c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_sse2; |
|
411 |
- c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse2; |
|
412 |
-#endif |
|
413 |
- } |
|
414 |
- |
|
415 |
- if (mm_flags & AV_CPU_FLAG_SSSE3) { |
|
416 |
- VP8_LUMA_MC_FUNC(0, 16, ssse3); |
|
417 |
- VP8_MC_FUNC(1, 8, ssse3); |
|
418 |
- VP8_MC_FUNC(2, 4, ssse3); |
|
419 |
- VP8_BILINEAR_MC_FUNC(0, 16, ssse3); |
|
420 |
- VP8_BILINEAR_MC_FUNC(1, 8, ssse3); |
|
421 |
- VP8_BILINEAR_MC_FUNC(2, 4, ssse3); |
|
422 |
- |
|
423 |
- c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_ssse3; |
|
424 |
- c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_ssse3; |
|
425 |
- |
|
426 |
-#if ARCH_X86_64 || HAVE_ALIGNED_STACK |
|
427 |
- c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_ssse3; |
|
428 |
- c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_ssse3; |
|
429 |
- c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_ssse3; |
|
430 |
- c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_ssse3; |
|
431 |
- |
|
432 |
- c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_ssse3; |
|
433 |
- c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_ssse3; |
|
434 |
- c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_ssse3; |
|
435 |
- c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_ssse3; |
|
436 |
-#endif |
|
437 |
- } |
|
438 |
- |
|
439 |
- if (mm_flags & AV_CPU_FLAG_SSE4) { |
|
440 |
- c->vp8_idct_dc_add = ff_vp8_idct_dc_add_sse4; |
|
441 |
- |
|
442 |
- c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse4; |
|
443 |
-#if ARCH_X86_64 || HAVE_ALIGNED_STACK |
|
444 |
- c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_sse4; |
|
445 |
- c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse4; |
|
446 |
-#endif |
|
447 |
- } |
|
448 |
-#endif |
|
449 |
-} |
450 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,450 @@ |
0 |
+/* |
|
1 |
+ * VP8 DSP functions x86-optimized |
|
2 |
+ * Copyright (c) 2010 Ronald S. Bultje <rsbultje@gmail.com> |
|
3 |
+ * Copyright (c) 2010 Jason Garrett-Glaser <darkshikari@gmail.com> |
|
4 |
+ * |
|
5 |
+ * This file is part of FFmpeg. |
|
6 |
+ * |
|
7 |
+ * FFmpeg is free software; you can redistribute it and/or |
|
8 |
+ * modify it under the terms of the GNU Lesser General Public |
|
9 |
+ * License as published by the Free Software Foundation; either |
|
10 |
+ * version 2.1 of the License, or (at your option) any later version. |
|
11 |
+ * |
|
12 |
+ * FFmpeg is distributed in the hope that it will be useful, |
|
13 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
15 |
+ * Lesser General Public License for more details. |
|
16 |
+ * |
|
17 |
+ * You should have received a copy of the GNU Lesser General Public |
|
18 |
+ * License along with FFmpeg; if not, write to the Free Software |
|
19 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
20 |
+ */ |
|
21 |
+ |
|
22 |
+#include "libavutil/cpu.h" |
|
23 |
+#include "libavutil/mem.h" |
|
24 |
+#include "libavutil/x86/asm.h" |
|
25 |
+#include "libavcodec/vp8dsp.h" |
|
26 |
+ |
|
27 |
+#if HAVE_YASM |
|
28 |
+ |
|
29 |
+/* |
|
30 |
+ * MC functions |
|
31 |
+ */ |
|
32 |
+extern void ff_put_vp8_epel4_h4_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
33 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
34 |
+ int height, int mx, int my); |
|
35 |
+extern void ff_put_vp8_epel4_h6_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
36 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
37 |
+ int height, int mx, int my); |
|
38 |
+extern void ff_put_vp8_epel4_v4_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
39 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
40 |
+ int height, int mx, int my); |
|
41 |
+extern void ff_put_vp8_epel4_v6_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
42 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
43 |
+ int height, int mx, int my); |
|
44 |
+ |
|
45 |
+extern void ff_put_vp8_epel8_h4_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
46 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
47 |
+ int height, int mx, int my); |
|
48 |
+extern void ff_put_vp8_epel8_h6_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
49 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
50 |
+ int height, int mx, int my); |
|
51 |
+extern void ff_put_vp8_epel8_v4_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
52 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
53 |
+ int height, int mx, int my); |
|
54 |
+extern void ff_put_vp8_epel8_v6_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
55 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
56 |
+ int height, int mx, int my); |
|
57 |
+ |
|
58 |
+extern void ff_put_vp8_epel4_h4_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
59 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
60 |
+ int height, int mx, int my); |
|
61 |
+extern void ff_put_vp8_epel4_h6_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
62 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
63 |
+ int height, int mx, int my); |
|
64 |
+extern void ff_put_vp8_epel4_v4_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
65 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
66 |
+ int height, int mx, int my); |
|
67 |
+extern void ff_put_vp8_epel4_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
68 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
69 |
+ int height, int mx, int my); |
|
70 |
+extern void ff_put_vp8_epel8_h4_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
71 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
72 |
+ int height, int mx, int my); |
|
73 |
+extern void ff_put_vp8_epel8_h6_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
74 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
75 |
+ int height, int mx, int my); |
|
76 |
+extern void ff_put_vp8_epel8_v4_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
77 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
78 |
+ int height, int mx, int my); |
|
79 |
+extern void ff_put_vp8_epel8_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
80 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
81 |
+ int height, int mx, int my); |
|
82 |
+ |
|
83 |
+extern void ff_put_vp8_bilinear4_h_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
84 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
85 |
+ int height, int mx, int my); |
|
86 |
+extern void ff_put_vp8_bilinear8_h_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
87 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
88 |
+ int height, int mx, int my); |
|
89 |
+extern void ff_put_vp8_bilinear4_h_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
90 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
91 |
+ int height, int mx, int my); |
|
92 |
+extern void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
93 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
94 |
+ int height, int mx, int my); |
|
95 |
+ |
|
96 |
+extern void ff_put_vp8_bilinear4_v_mmx2 (uint8_t *dst, ptrdiff_t dststride, |
|
97 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
98 |
+ int height, int mx, int my); |
|
99 |
+extern void ff_put_vp8_bilinear8_v_sse2 (uint8_t *dst, ptrdiff_t dststride, |
|
100 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
101 |
+ int height, int mx, int my); |
|
102 |
+extern void ff_put_vp8_bilinear4_v_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
103 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
104 |
+ int height, int mx, int my); |
|
105 |
+extern void ff_put_vp8_bilinear8_v_ssse3 (uint8_t *dst, ptrdiff_t dststride, |
|
106 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
107 |
+ int height, int mx, int my); |
|
108 |
+ |
|
109 |
+ |
|
110 |
+extern void ff_put_vp8_pixels8_mmx (uint8_t *dst, ptrdiff_t dststride, |
|
111 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
112 |
+ int height, int mx, int my); |
|
113 |
+extern void ff_put_vp8_pixels16_mmx(uint8_t *dst, ptrdiff_t dststride, |
|
114 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
115 |
+ int height, int mx, int my); |
|
116 |
+extern void ff_put_vp8_pixels16_sse(uint8_t *dst, ptrdiff_t dststride, |
|
117 |
+ uint8_t *src, ptrdiff_t srcstride, |
|
118 |
+ int height, int mx, int my); |
|
119 |
+ |
|
120 |
+#define TAP_W16(OPT, FILTERTYPE, TAPTYPE) \ |
|
121 |
+static void ff_put_vp8_ ## FILTERTYPE ## 16_ ## TAPTYPE ## _ ## OPT( \ |
|
122 |
+ uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ |
|
123 |
+ ptrdiff_t srcstride, int height, int mx, int my) \ |
|
124 |
+{ \ |
|
125 |
+ ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \ |
|
126 |
+ dst, dststride, src, srcstride, height, mx, my); \ |
|
127 |
+ ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \ |
|
128 |
+ dst + 8, dststride, src + 8, srcstride, height, mx, my); \ |
|
129 |
+} |
|
130 |
+#define TAP_W8(OPT, FILTERTYPE, TAPTYPE) \ |
|
131 |
+static void ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \ |
|
132 |
+ uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ |
|
133 |
+ ptrdiff_t srcstride, int height, int mx, int my) \ |
|
134 |
+{ \ |
|
135 |
+ ff_put_vp8_ ## FILTERTYPE ## 4_ ## TAPTYPE ## _ ## OPT( \ |
|
136 |
+ dst, dststride, src, srcstride, height, mx, my); \ |
|
137 |
+ ff_put_vp8_ ## FILTERTYPE ## 4_ ## TAPTYPE ## _ ## OPT( \ |
|
138 |
+ dst + 4, dststride, src + 4, srcstride, height, mx, my); \ |
|
139 |
+} |
|
140 |
+ |
|
141 |
+#if ARCH_X86_32 |
|
142 |
+TAP_W8 (mmx2, epel, h4) |
|
143 |
+TAP_W8 (mmx2, epel, h6) |
|
144 |
+TAP_W16(mmx2, epel, h6) |
|
145 |
+TAP_W8 (mmx2, epel, v4) |
|
146 |
+TAP_W8 (mmx2, epel, v6) |
|
147 |
+TAP_W16(mmx2, epel, v6) |
|
148 |
+TAP_W8 (mmx2, bilinear, h) |
|
149 |
+TAP_W16(mmx2, bilinear, h) |
|
150 |
+TAP_W8 (mmx2, bilinear, v) |
|
151 |
+TAP_W16(mmx2, bilinear, v) |
|
152 |
+#endif |
|
153 |
+ |
|
154 |
+TAP_W16(sse2, epel, h6) |
|
155 |
+TAP_W16(sse2, epel, v6) |
|
156 |
+TAP_W16(sse2, bilinear, h) |
|
157 |
+TAP_W16(sse2, bilinear, v) |
|
158 |
+ |
|
159 |
+TAP_W16(ssse3, epel, h6) |
|
160 |
+TAP_W16(ssse3, epel, v6) |
|
161 |
+TAP_W16(ssse3, bilinear, h) |
|
162 |
+TAP_W16(ssse3, bilinear, v) |
|
163 |
+ |
|
164 |
+#define HVTAP(OPT, ALIGN, TAPNUMX, TAPNUMY, SIZE, MAXHEIGHT) \ |
|
165 |
+static void ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## v ## TAPNUMY ## _ ## OPT( \ |
|
166 |
+ uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ |
|
167 |
+ ptrdiff_t srcstride, int height, int mx, int my) \ |
|
168 |
+{ \ |
|
169 |
+ DECLARE_ALIGNED(ALIGN, uint8_t, tmp)[SIZE * (MAXHEIGHT + TAPNUMY - 1)]; \ |
|
170 |
+ uint8_t *tmpptr = tmp + SIZE * (TAPNUMY / 2 - 1); \ |
|
171 |
+ src -= srcstride * (TAPNUMY / 2 - 1); \ |
|
172 |
+ ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## _ ## OPT( \ |
|
173 |
+ tmp, SIZE, src, srcstride, height + TAPNUMY - 1, mx, my); \ |
|
174 |
+ ff_put_vp8_epel ## SIZE ## _v ## TAPNUMY ## _ ## OPT( \ |
|
175 |
+ dst, dststride, tmpptr, SIZE, height, mx, my); \ |
|
176 |
+} |
|
177 |
+ |
|
178 |
+#if ARCH_X86_32 |
|
179 |
+#define HVTAPMMX(x, y) \ |
|
180 |
+HVTAP(mmx2, 8, x, y, 4, 8) \ |
|
181 |
+HVTAP(mmx2, 8, x, y, 8, 16) |
|
182 |
+ |
|
183 |
+HVTAP(mmx2, 8, 6, 6, 16, 16) |
|
184 |
+#else |
|
185 |
+#define HVTAPMMX(x, y) \ |
|
186 |
+HVTAP(mmx2, 8, x, y, 4, 8) |
|
187 |
+#endif |
|
188 |
+ |
|
189 |
+HVTAPMMX(4, 4) |
|
190 |
+HVTAPMMX(4, 6) |
|
191 |
+HVTAPMMX(6, 4) |
|
192 |
+HVTAPMMX(6, 6) |
|
193 |
+ |
|
194 |
+#define HVTAPSSE2(x, y, w) \ |
|
195 |
+HVTAP(sse2, 16, x, y, w, 16) \ |
|
196 |
+HVTAP(ssse3, 16, x, y, w, 16) |
|
197 |
+ |
|
198 |
+HVTAPSSE2(4, 4, 8) |
|
199 |
+HVTAPSSE2(4, 6, 8) |
|
200 |
+HVTAPSSE2(6, 4, 8) |
|
201 |
+HVTAPSSE2(6, 6, 8) |
|
202 |
+HVTAPSSE2(6, 6, 16) |
|
203 |
+ |
|
204 |
+HVTAP(ssse3, 16, 4, 4, 4, 8) |
|
205 |
+HVTAP(ssse3, 16, 4, 6, 4, 8) |
|
206 |
+HVTAP(ssse3, 16, 6, 4, 4, 8) |
|
207 |
+HVTAP(ssse3, 16, 6, 6, 4, 8) |
|
208 |
+ |
|
209 |
+#define HVBILIN(OPT, ALIGN, SIZE, MAXHEIGHT) \ |
|
210 |
+static void ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT( \ |
|
211 |
+ uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ |
|
212 |
+ ptrdiff_t srcstride, int height, int mx, int my) \ |
|
213 |
+{ \ |
|
214 |
+ DECLARE_ALIGNED(ALIGN, uint8_t, tmp)[SIZE * (MAXHEIGHT + 2)]; \ |
|
215 |
+ ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT( \ |
|
216 |
+ tmp, SIZE, src, srcstride, height + 1, mx, my); \ |
|
217 |
+ ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT( \ |
|
218 |
+ dst, dststride, tmp, SIZE, height, mx, my); \ |
|
219 |
+} |
|
220 |
+ |
|
221 |
+HVBILIN(mmx2, 8, 4, 8) |
|
222 |
+#if ARCH_X86_32 |
|
223 |
+HVBILIN(mmx2, 8, 8, 16) |
|
224 |
+HVBILIN(mmx2, 8, 16, 16) |
|
225 |
+#endif |
|
226 |
+HVBILIN(sse2, 8, 8, 16) |
|
227 |
+HVBILIN(sse2, 8, 16, 16) |
|
228 |
+HVBILIN(ssse3, 8, 4, 8) |
|
229 |
+HVBILIN(ssse3, 8, 8, 16) |
|
230 |
+HVBILIN(ssse3, 8, 16, 16) |
|
231 |
+ |
|
232 |
+extern void ff_vp8_idct_dc_add_mmx(uint8_t *dst, DCTELEM block[16], |
|
233 |
+ ptrdiff_t stride); |
|
234 |
+extern void ff_vp8_idct_dc_add_sse4(uint8_t *dst, DCTELEM block[16], |
|
235 |
+ ptrdiff_t stride); |
|
236 |
+extern void ff_vp8_idct_dc_add4y_mmx(uint8_t *dst, DCTELEM block[4][16], |
|
237 |
+ ptrdiff_t stride); |
|
238 |
+extern void ff_vp8_idct_dc_add4y_sse2(uint8_t *dst, DCTELEM block[4][16], |
|
239 |
+ ptrdiff_t stride); |
|
240 |
+extern void ff_vp8_idct_dc_add4uv_mmx(uint8_t *dst, DCTELEM block[2][16], |
|
241 |
+ ptrdiff_t stride); |
|
242 |
+extern void ff_vp8_luma_dc_wht_mmx(DCTELEM block[4][4][16], DCTELEM dc[16]); |
|
243 |
+extern void ff_vp8_luma_dc_wht_sse(DCTELEM block[4][4][16], DCTELEM dc[16]); |
|
244 |
+extern void ff_vp8_idct_add_mmx(uint8_t *dst, DCTELEM block[16], |
|
245 |
+ ptrdiff_t stride); |
|
246 |
+extern void ff_vp8_idct_add_sse(uint8_t *dst, DCTELEM block[16], |
|
247 |
+ ptrdiff_t stride); |
|
248 |
+ |
|
249 |
+#define DECLARE_LOOP_FILTER(NAME)\ |
|
250 |
+extern void ff_vp8_v_loop_filter_simple_ ## NAME(uint8_t *dst, \ |
|
251 |
+ ptrdiff_t stride, \ |
|
252 |
+ int flim);\ |
|
253 |
+extern void ff_vp8_h_loop_filter_simple_ ## NAME(uint8_t *dst, \ |
|
254 |
+ ptrdiff_t stride, \ |
|
255 |
+ int flim);\ |
|
256 |
+extern void ff_vp8_v_loop_filter16y_inner_ ## NAME (uint8_t *dst, \ |
|
257 |
+ ptrdiff_t stride,\ |
|
258 |
+ int e, int i, int hvt);\ |
|
259 |
+extern void ff_vp8_h_loop_filter16y_inner_ ## NAME (uint8_t *dst, \ |
|
260 |
+ ptrdiff_t stride,\ |
|
261 |
+ int e, int i, int hvt);\ |
|
262 |
+extern void ff_vp8_v_loop_filter8uv_inner_ ## NAME (uint8_t *dstU, \ |
|
263 |
+ uint8_t *dstV,\ |
|
264 |
+ ptrdiff_t s, \ |
|
265 |
+ int e, int i, int hvt);\ |
|
266 |
+extern void ff_vp8_h_loop_filter8uv_inner_ ## NAME (uint8_t *dstU, \ |
|
267 |
+ uint8_t *dstV,\ |
|
268 |
+ ptrdiff_t s, \ |
|
269 |
+ int e, int i, int hvt);\ |
|
270 |
+extern void ff_vp8_v_loop_filter16y_mbedge_ ## NAME(uint8_t *dst, \ |
|
271 |
+ ptrdiff_t stride,\ |
|
272 |
+ int e, int i, int hvt);\ |
|
273 |
+extern void ff_vp8_h_loop_filter16y_mbedge_ ## NAME(uint8_t *dst, \ |
|
274 |
+ ptrdiff_t stride,\ |
|
275 |
+ int e, int i, int hvt);\ |
|
276 |
+extern void ff_vp8_v_loop_filter8uv_mbedge_ ## NAME(uint8_t *dstU, \ |
|
277 |
+ uint8_t *dstV,\ |
|
278 |
+ ptrdiff_t s, \ |
|
279 |
+ int e, int i, int hvt);\ |
|
280 |
+extern void ff_vp8_h_loop_filter8uv_mbedge_ ## NAME(uint8_t *dstU, \ |
|
281 |
+ uint8_t *dstV,\ |
|
282 |
+ ptrdiff_t s, \ |
|
283 |
+ int e, int i, int hvt); |
|
284 |
+ |
|
285 |
+DECLARE_LOOP_FILTER(mmx) |
|
286 |
+DECLARE_LOOP_FILTER(mmx2) |
|
287 |
+DECLARE_LOOP_FILTER(sse2) |
|
288 |
+DECLARE_LOOP_FILTER(ssse3) |
|
289 |
+DECLARE_LOOP_FILTER(sse4) |
|
290 |
+ |
|
291 |
+#endif |
|
292 |
+ |
|
293 |
+#define VP8_LUMA_MC_FUNC(IDX, SIZE, OPT) \ |
|
294 |
+ c->put_vp8_epel_pixels_tab[IDX][0][2] = ff_put_vp8_epel ## SIZE ## _h6_ ## OPT; \ |
|
295 |
+ c->put_vp8_epel_pixels_tab[IDX][2][0] = ff_put_vp8_epel ## SIZE ## _v6_ ## OPT; \ |
|
296 |
+ c->put_vp8_epel_pixels_tab[IDX][2][2] = ff_put_vp8_epel ## SIZE ## _h6v6_ ## OPT |
|
297 |
+ |
|
298 |
+#define VP8_MC_FUNC(IDX, SIZE, OPT) \ |
|
299 |
+ c->put_vp8_epel_pixels_tab[IDX][0][1] = ff_put_vp8_epel ## SIZE ## _h4_ ## OPT; \ |
|
300 |
+ c->put_vp8_epel_pixels_tab[IDX][1][0] = ff_put_vp8_epel ## SIZE ## _v4_ ## OPT; \ |
|
301 |
+ c->put_vp8_epel_pixels_tab[IDX][1][1] = ff_put_vp8_epel ## SIZE ## _h4v4_ ## OPT; \ |
|
302 |
+ c->put_vp8_epel_pixels_tab[IDX][1][2] = ff_put_vp8_epel ## SIZE ## _h6v4_ ## OPT; \ |
|
303 |
+ c->put_vp8_epel_pixels_tab[IDX][2][1] = ff_put_vp8_epel ## SIZE ## _h4v6_ ## OPT; \ |
|
304 |
+ VP8_LUMA_MC_FUNC(IDX, SIZE, OPT) |
|
305 |
+ |
|
306 |
+#define VP8_BILINEAR_MC_FUNC(IDX, SIZE, OPT) \ |
|
307 |
+ c->put_vp8_bilinear_pixels_tab[IDX][0][1] = ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT; \ |
|
308 |
+ c->put_vp8_bilinear_pixels_tab[IDX][0][2] = ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT; \ |
|
309 |
+ c->put_vp8_bilinear_pixels_tab[IDX][1][0] = ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT; \ |
|
310 |
+ c->put_vp8_bilinear_pixels_tab[IDX][1][1] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \ |
|
311 |
+ c->put_vp8_bilinear_pixels_tab[IDX][1][2] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \ |
|
312 |
+ c->put_vp8_bilinear_pixels_tab[IDX][2][0] = ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT; \ |
|
313 |
+ c->put_vp8_bilinear_pixels_tab[IDX][2][1] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \ |
|
314 |
+ c->put_vp8_bilinear_pixels_tab[IDX][2][2] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT |
|
315 |
+ |
|
316 |
+ |
|
317 |
+av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
|
318 |
+{ |
|
319 |
+#if HAVE_YASM |
|
320 |
+ int mm_flags = av_get_cpu_flags(); |
|
321 |
+ |
|
322 |
+ if (mm_flags & AV_CPU_FLAG_MMX) { |
|
323 |
+ c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; |
|
324 |
+ c->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_mmx; |
|
325 |
+#if ARCH_X86_32 |
|
326 |
+ c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_mmx; |
|
327 |
+ c->vp8_idct_add = ff_vp8_idct_add_mmx; |
|
328 |
+ c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_mmx; |
|
329 |
+ c->put_vp8_epel_pixels_tab[0][0][0] = |
|
330 |
+ c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_mmx; |
|
331 |
+#endif |
|
332 |
+ c->put_vp8_epel_pixels_tab[1][0][0] = |
|
333 |
+ c->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_mmx; |
|
334 |
+ |
|
335 |
+#if ARCH_X86_32 |
|
336 |
+ c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_mmx; |
|
337 |
+ c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_mmx; |
|
338 |
+ |
|
339 |
+ c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_mmx; |
|
340 |
+ c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_mmx; |
|
341 |
+ c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_mmx; |
|
342 |
+ c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_mmx; |
|
343 |
+ |
|
344 |
+ c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_mmx; |
|
345 |
+ c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_mmx; |
|
346 |
+ c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_mmx; |
|
347 |
+ c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_mmx; |
|
348 |
+#endif |
|
349 |
+ } |
|
350 |
+ |
|
351 |
+ /* note that 4-tap width=16 functions are missing because w=16 |
|
352 |
+ * is only used for luma, and luma is always a copy or sixtap. */ |
|
353 |
+ if (mm_flags & AV_CPU_FLAG_MMXEXT) { |
|
354 |
+ VP8_MC_FUNC(2, 4, mmx2); |
|
355 |
+ VP8_BILINEAR_MC_FUNC(2, 4, mmx2); |
|
356 |
+#if ARCH_X86_32 |
|
357 |
+ VP8_LUMA_MC_FUNC(0, 16, mmx2); |
|
358 |
+ VP8_MC_FUNC(1, 8, mmx2); |
|
359 |
+ VP8_BILINEAR_MC_FUNC(0, 16, mmx2); |
|
360 |
+ VP8_BILINEAR_MC_FUNC(1, 8, mmx2); |
|
361 |
+ |
|
362 |
+ c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_mmx2; |
|
363 |
+ c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_mmx2; |
|
364 |
+ |
|
365 |
+ c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_mmx2; |
|
366 |
+ c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_mmx2; |
|
367 |
+ c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_mmx2; |
|
368 |
+ c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_mmx2; |
|
369 |
+ |
|
370 |
+ c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_mmx2; |
|
371 |
+ c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_mmx2; |
|
372 |
+ c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_mmx2; |
|
373 |
+ c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_mmx2; |
|
374 |
+#endif |
|
375 |
+ } |
|
376 |
+ |
|
377 |
+ if (mm_flags & AV_CPU_FLAG_SSE) { |
|
378 |
+ c->vp8_idct_add = ff_vp8_idct_add_sse; |
|
379 |
+ c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_sse; |
|
380 |
+ c->put_vp8_epel_pixels_tab[0][0][0] = |
|
381 |
+ c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_sse; |
|
382 |
+ } |
|
383 |
+ |
|
384 |
+ if (mm_flags & (AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW)) { |
|
385 |
+ VP8_LUMA_MC_FUNC(0, 16, sse2); |
|
386 |
+ VP8_MC_FUNC(1, 8, sse2); |
|
387 |
+ VP8_BILINEAR_MC_FUNC(0, 16, sse2); |
|
388 |
+ VP8_BILINEAR_MC_FUNC(1, 8, sse2); |
|
389 |
+ |
|
390 |
+ c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_sse2; |
|
391 |
+ |
|
392 |
+#if ARCH_X86_64 || HAVE_ALIGNED_STACK |
|
393 |
+ c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_sse2; |
|
394 |
+ c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_sse2; |
|
395 |
+ |
|
396 |
+ c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_sse2; |
|
397 |
+ c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_sse2; |
|
398 |
+#endif |
|
399 |
+ } |
|
400 |
+ |
|
401 |
+ if (mm_flags & AV_CPU_FLAG_SSE2) { |
|
402 |
+ c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_sse2; |
|
403 |
+ |
|
404 |
+ c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse2; |
|
405 |
+ |
|
406 |
+#if ARCH_X86_64 || HAVE_ALIGNED_STACK |
|
407 |
+ c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_sse2; |
|
408 |
+ c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_sse2; |
|
409 |
+ |
|
410 |
+ c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_sse2; |
|
411 |
+ c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse2; |
|
412 |
+#endif |
|
413 |
+ } |
|
414 |
+ |
|
415 |
+ if (mm_flags & AV_CPU_FLAG_SSSE3) { |
|
416 |
+ VP8_LUMA_MC_FUNC(0, 16, ssse3); |
|
417 |
+ VP8_MC_FUNC(1, 8, ssse3); |
|
418 |
+ VP8_MC_FUNC(2, 4, ssse3); |
|
419 |
+ VP8_BILINEAR_MC_FUNC(0, 16, ssse3); |
|
420 |
+ VP8_BILINEAR_MC_FUNC(1, 8, ssse3); |
|
421 |
+ VP8_BILINEAR_MC_FUNC(2, 4, ssse3); |
|
422 |
+ |
|
423 |
+ c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_ssse3; |
|
424 |
+ c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_ssse3; |
|
425 |
+ |
|
426 |
+#if ARCH_X86_64 || HAVE_ALIGNED_STACK |
|
427 |
+ c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_ssse3; |
|
428 |
+ c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_ssse3; |
|
429 |
+ c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_ssse3; |
|
430 |
+ c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_ssse3; |
|
431 |
+ |
|
432 |
+ c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_ssse3; |
|
433 |
+ c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_ssse3; |
|
434 |
+ c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_ssse3; |
|
435 |
+ c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_ssse3; |
|
436 |
+#endif |
|
437 |
+ } |
|
438 |
+ |
|
439 |
+ if (mm_flags & AV_CPU_FLAG_SSE4) { |
|
440 |
+ c->vp8_idct_dc_add = ff_vp8_idct_dc_add_sse4; |
|
441 |
+ |
|
442 |
+ c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse4; |
|
443 |
+#if ARCH_X86_64 || HAVE_ALIGNED_STACK |
|
444 |
+ c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_sse4; |
|
445 |
+ c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse4; |
|
446 |
+#endif |
|
447 |
+ } |
|
448 |
+#endif |
|
449 |
+} |
... | ... |
@@ -24,14 +24,17 @@ |
24 | 24 |
* null audio source |
25 | 25 |
*/ |
26 | 26 |
|
27 |
-#include "internal.h" |
|
28 |
-#include "libavutil/audioconvert.h" |
|
29 |
-#include "libavutil/opt.h" |
|
27 |
+#include <inttypes.h> |
|
28 |
+#include <stdio.h> |
|
30 | 29 |
|
31 | 30 |
#include "audio.h" |
32 | 31 |
#include "avfilter.h" |
33 | 32 |
#include "internal.h" |
34 | 33 |
|
34 |
+#include "libavutil/audioconvert.h" |
|
35 |
+#include "libavutil/internal.h" |
|
36 |
+#include "libavutil/opt.h" |
|
37 |
+ |
|
35 | 38 |
typedef struct { |
36 | 39 |
const AVClass *class; |
37 | 40 |
char *channel_layout_str; |
... | ... |
@@ -19,8 +19,11 @@ |
19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 |
*/ |
21 | 21 |
|
22 |
+#include <string.h> |
|
23 |
+ |
|
22 | 24 |
#include "libavutil/avutil.h" |
23 | 25 |
#include "libavutil/colorspace.h" |
26 |
+#include "libavutil/mem.h" |
|
24 | 27 |
#include "libavutil/pixdesc.h" |
25 | 28 |
#include "drawutils.h" |
26 | 29 |
#include "formats.h" |
... | ... |
@@ -23,8 +23,12 @@ |
23 | 23 |
* Set timebase for the output link. |
24 | 24 |
*/ |
25 | 25 |
|
26 |
+#include <inttypes.h> |
|
27 |
+#include <stdio.h> |
|
28 |
+ |
|
26 | 29 |
#include "libavutil/avstring.h" |
27 | 30 |
#include "libavutil/eval.h" |
31 |
+#include "libavutil/internal.h" |
|
28 | 32 |
#include "libavutil/mathematics.h" |
29 | 33 |
#include "libavutil/rational.h" |
30 | 34 |
#include "avfilter.h" |
... | ... |
@@ -25,12 +25,15 @@ |
25 | 25 |
|
26 | 26 |
/* #define DEBUG */ |
27 | 27 |
|
28 |
+#include <stdio.h> |
|
29 |
+ |
|
28 | 30 |
#include "avfilter.h" |
29 | 31 |
#include "formats.h" |
30 | 32 |
#include "internal.h" |
31 | 33 |
#include "video.h" |
32 | 34 |
#include "libavutil/eval.h" |
33 | 35 |
#include "libavutil/avstring.h" |
36 |
+#include "libavutil/internal.h" |
|
34 | 37 |
#include "libavutil/libm.h" |
35 | 38 |
#include "libavutil/imgutils.h" |
36 | 39 |
#include "libavutil/mathematics.h" |
... | ... |
@@ -24,11 +24,14 @@ |
24 | 24 |
* horizontal flip filter |
25 | 25 |
*/ |
26 | 26 |
|
27 |
+#include <string.h> |
|
28 |
+ |
|
27 | 29 |
#include "avfilter.h" |
28 | 30 |
#include "formats.h" |
29 | 31 |
#include "internal.h" |
30 | 32 |
#include "video.h" |
31 | 33 |
#include "libavutil/pixdesc.h" |
34 |
+#include "libavutil/internal.h" |
|
32 | 35 |
#include "libavutil/intreadwrite.h" |
33 | 36 |
#include "libavutil/imgutils.h" |
34 | 37 |
|
... | ... |
@@ -23,12 +23,16 @@ |
23 | 23 |
* scale video filter |
24 | 24 |
*/ |
25 | 25 |
|
26 |
+#include <stdio.h> |
|
27 |
+#include <string.h> |
|
28 |
+ |
|
26 | 29 |
#include "avfilter.h" |
27 | 30 |
#include "formats.h" |
28 | 31 |
#include "internal.h" |
29 | 32 |
#include "video.h" |
30 | 33 |
#include "libavutil/avstring.h" |
31 | 34 |
#include "libavutil/eval.h" |
35 |
+#include "libavutil/internal.h" |
|
32 | 36 |
#include "libavutil/mathematics.h" |
33 | 37 |
#include "libavutil/opt.h" |
34 | 38 |
#include "libavutil/pixdesc.h" |
... | ... |
@@ -25,9 +25,12 @@ |
25 | 25 |
* Based on MPlayer libmpcodecs/vf_rotate.c. |
26 | 26 |
*/ |
27 | 27 |
|
28 |
+#include <stdio.h> |
|
29 |
+ |
|
28 | 30 |
#include "libavutil/intreadwrite.h" |
29 | 31 |
#include "libavutil/pixdesc.h" |
30 | 32 |
#include "libavutil/imgutils.h" |
33 |
+#include "libavutil/internal.h" |
|
31 | 34 |
#include "avfilter.h" |
32 | 35 |
#include "formats.h" |
33 | 36 |
#include "internal.h" |
... | ... |
@@ -20,8 +20,12 @@ |
20 | 20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
21 | 21 |
*/ |
22 | 22 |
|
23 |
+#include <string.h> |
|
24 |
+#include <stdio.h> |
|
25 |
+ |
|
23 | 26 |
#include "libavutil/avassert.h" |
24 | 27 |
#include "libavutil/imgutils.h" |
28 |
+#include "libavutil/mem.h" |
|
25 | 29 |
|
26 | 30 |
#include "avfilter.h" |
27 | 31 |
#include "internal.h" |
... | ... |
@@ -41,6 +41,10 @@ |
41 | 41 |
#include "rtmppkt.h" |
42 | 42 |
#include "url.h" |
43 | 43 |
|
44 |
+#if CONFIG_ZLIB |
|
45 |
+#include <zlib.h> |
|
46 |
+#endif |
|
47 |
+ |
|
44 | 48 |
//#define DEBUG |
45 | 49 |
|
46 | 50 |
#define APP_MAX_LENGTH 128 |
... | ... |
@@ -95,6 +99,7 @@ typedef struct RTMPContext { |
95 | 95 |
int swfhash_len; ///< length of the SHA256 hash |
96 | 96 |
int swfsize; ///< size of the decompressed SWF file |
97 | 97 |
char* swfurl; ///< url of the swf player |
98 |
+ char* swfverify; ///< URL to player swf file, compute hash/size automatically |
|
98 | 99 |
char swfverification[42]; ///< hash of the SWF verification |
99 | 100 |
char* pageurl; ///< url of the web page |
100 | 101 |
char* subscribe; ///< name of live stream to subscribe |
... | ... |
@@ -825,6 +830,129 @@ static int rtmp_calc_swf_verification(URLContext *s, RTMPContext *rt, |
825 | 825 |
return 0; |
826 | 826 |
} |
827 | 827 |
|
828 |
+#if CONFIG_ZLIB |
|
829 |
+static int rtmp_uncompress_swfplayer(uint8_t *in_data, int64_t in_size, |
|
830 |
+ uint8_t **out_data, int64_t *out_size) |
|
831 |
+{ |
|
832 |
+ z_stream zs = { 0 }; |
|
833 |
+ void *ptr; |
|
834 |
+ int size; |
|
835 |
+ int ret = 0; |
|
836 |
+ |
|
837 |
+ zs.avail_in = in_size; |
|
838 |
+ zs.next_in = in_data; |
|
839 |
+ ret = inflateInit(&zs); |
|
840 |
+ if (ret != Z_OK) |
|
841 |
+ return AVERROR_UNKNOWN; |
|
842 |
+ |
|
843 |
+ do { |
|
844 |
+ uint8_t tmp_buf[16384]; |
|
845 |
+ |
|
846 |
+ zs.avail_out = sizeof(tmp_buf); |
|
847 |
+ zs.next_out = tmp_buf; |
|
848 |
+ |
|
849 |
+ ret = inflate(&zs, Z_NO_FLUSH); |
|
850 |
+ if (ret != Z_OK && ret != Z_STREAM_END) { |
|
851 |
+ ret = AVERROR_UNKNOWN; |
|
852 |
+ goto fail; |
|
853 |
+ } |
|
854 |
+ |
|
855 |
+ size = sizeof(tmp_buf) - zs.avail_out; |
|
856 |
+ if (!(ptr = av_realloc(*out_data, *out_size + size))) { |
|
857 |
+ ret = AVERROR(ENOMEM); |
|
858 |
+ goto fail; |
|
859 |
+ } |
|
860 |
+ *out_data = ptr; |
|
861 |
+ |
|
862 |
+ memcpy(*out_data + *out_size, tmp_buf, size); |
|
863 |
+ *out_size += size; |
|
864 |
+ } while (zs.avail_out == 0); |
|
865 |
+ |
|
866 |
+fail: |
|
867 |
+ inflateEnd(&zs); |
|
868 |
+ return ret; |
|
869 |
+} |
|
870 |
+#endif |
|
871 |
+ |
|
872 |
+static int rtmp_calc_swfhash(URLContext *s) |
|
873 |
+{ |
|
874 |
+ RTMPContext *rt = s->priv_data; |
|
875 |
+ uint8_t *in_data = NULL, *out_data = NULL, *swfdata; |
|
876 |
+ int64_t in_size, out_size; |
|
877 |
+ URLContext *stream; |
|
878 |
+ char swfhash[32]; |
|
879 |
+ int swfsize; |
|
880 |
+ int ret = 0; |
|
881 |
+ |
|
882 |
+ /* Get the SWF player file. */ |
|
883 |
+ if ((ret = ffurl_open(&stream, rt->swfverify, AVIO_FLAG_READ, |
|
884 |
+ &s->interrupt_callback, NULL)) < 0) { |
|
885 |
+ av_log(s, AV_LOG_ERROR, "Cannot open connection %s.\n", rt->swfverify); |
|
886 |
+ goto fail; |
|
887 |
+ } |
|
888 |
+ |
|
889 |
+ if ((in_size = ffurl_seek(stream, 0, AVSEEK_SIZE)) < 0) { |
|
890 |
+ ret = AVERROR(EIO); |
|
891 |
+ goto fail; |
|
892 |
+ } |
|
893 |
+ |
|
894 |
+ if (!(in_data = av_malloc(in_size))) { |
|
895 |
+ ret = AVERROR(ENOMEM); |
|
896 |
+ goto fail; |
|
897 |
+ } |
|
898 |
+ |
|
899 |
+ if ((ret = ffurl_read_complete(stream, in_data, in_size)) < 0) |
|
900 |
+ goto fail; |
|
901 |
+ |
|
902 |
+ if (in_size < 3) { |
|
903 |
+ ret = AVERROR_INVALIDDATA; |
|
904 |
+ goto fail; |
|
905 |
+ } |
|
906 |
+ |
|
907 |
+ if (!memcmp(in_data, "CWS", 3)) { |
|
908 |
+ /* Decompress the SWF player file using Zlib. */ |
|
909 |
+ if (!(out_data = av_malloc(8))) { |
|
910 |
+ ret = AVERROR(ENOMEM); |
|
911 |
+ goto fail; |
|
912 |
+ } |
|
913 |
+ *in_data = 'F'; // magic stuff |
|
914 |
+ memcpy(out_data, in_data, 8); |
|
915 |
+ out_size = 8; |
|
916 |
+ |
|
917 |
+#if CONFIG_ZLIB |
|
918 |
+ if ((ret = rtmp_uncompress_swfplayer(in_data + 8, in_size - 8, |
|
919 |
+ &out_data, &out_size)) < 0) |
|
920 |
+ goto fail; |
|
921 |
+#else |
|
922 |
+ av_log(s, AV_LOG_ERROR, |
|
923 |
+ "Zlib is required for decompressing the SWF player file.\n"); |
|
924 |
+ ret = AVERROR(EINVAL); |
|
925 |
+ goto fail; |
|
926 |
+#endif |
|
927 |
+ swfsize = out_size; |
|
928 |
+ swfdata = out_data; |
|
929 |
+ } else { |
|
930 |
+ swfsize = in_size; |
|
931 |
+ swfdata = in_data; |
|
932 |
+ } |
|
933 |
+ |
|
934 |
+ /* Compute the SHA256 hash of the SWF player file. */ |
|
935 |
+ if ((ret = ff_rtmp_calc_digest(swfdata, swfsize, 0, |
|
936 |
+ "Genuine Adobe Flash Player 001", 30, |
|
937 |
+ swfhash)) < 0) |
|
938 |
+ goto fail; |
|
939 |
+ |
|
940 |
+ /* Set SWFVerification parameters. */ |
|
941 |
+ av_opt_set_bin(rt, "rtmp_swfhash", swfhash, 32, 0); |
|
942 |
+ rt->swfsize = swfsize; |
|
943 |
+ |
|
944 |
+fail: |
|
945 |
+ av_freep(&in_data); |
|
946 |
+ av_freep(&out_data); |
|
947 |
+ ffurl_close(stream); |
|
948 |
+ return ret; |
|
949 |
+} |
|
950 |
+ |
|
828 | 951 |
/** |
829 | 952 |
* Perform handshake with the server by means of exchanging pseudorandom data |
830 | 953 |
* signed with HMAC-SHA2 digest. |
... | ... |
@@ -1492,6 +1620,11 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) |
1492 | 1492 |
goto fail; |
1493 | 1493 |
} |
1494 | 1494 |
|
1495 |
+ if (rt->swfverify) { |
|
1496 |
+ if ((ret = rtmp_calc_swfhash(s)) < 0) |
|
1497 |
+ goto fail; |
|
1498 |
+ } |
|
1499 |
+ |
|
1495 | 1500 |
rt->state = STATE_START; |
1496 | 1501 |
if ((ret = rtmp_handshake(s, rt)) < 0) |
1497 | 1502 |
goto fail; |
... | ... |
@@ -1784,6 +1917,7 @@ static const AVOption rtmp_options[] = { |
1784 | 1784 |
{"rtmp_swfhash", "SHA256 hash of the decompressed SWF file (32 bytes).", OFFSET(swfhash), AV_OPT_TYPE_BINARY, .flags = DEC}, |
1785 | 1785 |
{"rtmp_swfsize", "Size of the decompressed SWF file, required for SWFVerification.", OFFSET(swfsize), AV_OPT_TYPE_INT, {0}, 0, INT_MAX, DEC}, |
1786 | 1786 |
{"rtmp_swfurl", "URL of the SWF player. By default no value will be sent", OFFSET(swfurl), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC}, |
1787 |
+ {"rtmp_swfverify", "URL to player swf file, compute hash/size automatically.", OFFSET(swfverify), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC}, |
|
1787 | 1788 |
{"rtmp_tcurl", "URL of the target stream. Defaults to proto://host[:port]/app.", OFFSET(tcurl), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC}, |
1788 | 1789 |
{ NULL }, |
1789 | 1790 |
}; |
... | ... |
@@ -31,7 +31,7 @@ |
31 | 31 |
|
32 | 32 |
#define LIBAVFORMAT_VERSION_MAJOR 54 |
33 | 33 |
#define LIBAVFORMAT_VERSION_MINOR 24 |
34 |
-#define LIBAVFORMAT_VERSION_MICRO 100 |
|
34 |
+#define LIBAVFORMAT_VERSION_MICRO 101 |
|
35 | 35 |
|
36 | 36 |
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |
37 | 37 |
LIBAVFORMAT_VERSION_MINOR, \ |
... | ... |
@@ -20,6 +20,7 @@ |
20 | 20 |
*/ |
21 | 21 |
|
22 | 22 |
#include <stdarg.h> |
23 |
+#include <stdint.h> |
|
23 | 24 |
#include <stdio.h> |
24 | 25 |
#include <string.h> |
25 | 26 |
#include <ctype.h> |
... | ... |
@@ -212,6 +213,7 @@ int av_strncasecmp(const char *a, const char *b, size_t n) |
212 | 212 |
|
213 | 213 |
#ifdef TEST |
214 | 214 |
|
215 |
+#include "common.h" |
|
215 | 216 |
#undef printf |
216 | 217 |
|
217 | 218 |
int main(void) |
... | ... |
@@ -19,6 +19,7 @@ |
19 | 19 |
*/ |
20 | 20 |
|
21 | 21 |
#include "log.h" |
22 |
+#include "mem.h" |
|
22 | 23 |
#include "tree.h" |
23 | 24 |
|
24 | 25 |
typedef struct AVTreeNode { |
... | ... |
@@ -157,6 +158,7 @@ void av_tree_enumerate(AVTreeNode *t, void *opaque, |
157 | 157 |
|
158 | 158 |
#ifdef TEST |
159 | 159 |
|
160 |
+#include "common.h" |
|
160 | 161 |
#include "lfg.h" |
161 | 162 |
|
162 | 163 |
static int check(AVTreeNode *t) |
... | ... |
@@ -19,9 +19,11 @@ |
19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 |
*/ |
21 | 21 |
|
22 |
+#include <inttypes.h> |
|
22 | 23 |
#include <stdint.h> |
23 | 24 |
#include <stdlib.h> |
24 | 25 |
#include <stdarg.h> |
26 |
+#include <string.h> |
|
25 | 27 |
|
26 | 28 |
#include "libavutil/bswap.h" |
27 | 29 |
|