Permalink
Browse files

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  MSS1 and MSS2: set final pixel format after common stuff has been initialised
  MSS2 decoder
  configure: handle --disable-asm before check_deps
  x86: Split inline and external assembly #ifdefs
  configure: x86: Separate inline from standalone assembler capabilities
  pktdumper: Use a custom define instead of PATH_MAX for buffers
  pktdumper: Use av_strlcpy instead of strncpy
  pktdumper: Use sizeof(variable) instead of the direct buffer length

Conflicts:
	Changelog
	configure
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/dct-test.c
	libavcodec/imgconvert.c
	libavcodec/mss12.c
	libavcodec/version.h
	libavfilter/x86/gradfun.c
	libswscale/x86/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
2 parents 98298eb + ede3d64 commit c617bed34f39a122ab1f89581ddce9cc63885383 @michaelni michaelni committed Aug 31, 2012
Showing with 1,637 additions and 368 deletions.
  1. +1 −0 Changelog
  2. +26 −5 configure
  3. +2 −0 doc/general.texi
  4. +1 −0 libavcodec/Makefile
  5. +1 −0 libavcodec/allcodecs.c
  6. +1 −0 libavcodec/avcodec.h
  7. +7 −0 libavcodec/codec_desc.c
  8. +2 −2 libavcodec/dct-test.c
  9. +5 −1 libavcodec/h263dec.c
  10. +4 −4 libavcodec/imgconvert.c
  11. +8 −5 libavcodec/mpegvideo.c
  12. +45 −66 libavcodec/mss1.c
  13. +252 −130 libavcodec/mss12.c
  14. +62 −8 libavcodec/mss12.h
  15. +864 −0 libavcodec/mss2.c
  16. +153 −0 libavcodec/mss2dsp.c
  17. +50 −0 libavcodec/mss2dsp.h
  18. +8 −1 libavcodec/vc1.c
  19. +2 −0 libavcodec/vc1.h
  20. +7 −3 libavcodec/vc1dec.c
  21. +2 −2 libavcodec/version.h
  22. +4 −4 libavcodec/x86/ac3dsp.asm
  23. +1 −1 libavcodec/x86/dct32.asm
  24. +3 −3 libavcodec/x86/dsputil.asm
  25. +10 −11 libavcodec/x86/dsputil_mmx.c
  26. +4 −4 libavcodec/x86/dsputilenc_mmx.c
  27. +4 −4 libavcodec/x86/fft.asm
  28. +2 −2 libavcodec/x86/h264_chromamc_10bit.asm
  29. +8 −8 libavcodec/x86/h264_idct_10bit.asm
  30. +13 −13 libavcodec/x86/h264_intrapred_10bit.asm
  31. +2 −2 libavcodec/x86/h264_qpel.c
  32. +5 −5 libavcodec/x86/h264dsp_init.c
  33. +12 −18 libavcodec/x86/mpegvideoenc.c
  34. +8 −10 libavfilter/x86/gradfun.c
  35. +6 −8 libavfilter/x86/yadif.c
  36. +1 −0 libavformat/riff.c
  37. +17 −17 libavresample/x86/audio_convert.asm
  38. +5 −5 libavresample/x86/audio_mix.asm
  39. +3 −3 libavutil/internal.h
  40. +2 −2 libavutil/x86/float_dsp.asm
  41. +1 −1 libswscale/swscale.c
  42. +6 −6 libswscale/utils.c
  43. +3 −3 libswscale/x86/swscale.c
  44. +5 −5 libswscale/x86/yuv2rgb.c
  45. +9 −6 tools/pktdumper.c
View
@@ -53,6 +53,7 @@ version next:
-pass and -passlogfile are now per-output stream
- volume measurement filter
- Ut Video encoder
+- Microsoft Screen 2 decoder
- Matroska demuxer now identifies SRT subtitles as AV_CODEC_ID_SUBRIP
instead of AV_CODEC_ID_TEXT
- smartblur filter ported from MPlayer
View
@@ -419,6 +419,12 @@ map(){
for v; do eval $m; done
}
+add_suffix(){
+ suffix=$1
+ shift
+ for v; do echo ${v}${suffix}; done
+}
+
set_all(){
value=$1
shift
@@ -1246,6 +1252,8 @@ HAVE_LIST_PUB='
HAVE_LIST="
$ARCH_EXT_LIST
+ $(add_suffix _external $ARCH_EXT_LIST)
+ $(add_suffix _inline $ARCH_EXT_LIST)
$HAVE_LIST_PUB
$THREADS_LIST
aligned_malloc
@@ -1524,6 +1532,17 @@ sse42_deps="sse4"
avx_deps="sse42"
fma4_deps="avx"
+mmx_external_deps="yasm"
+mmx_inline_deps="inline_asm"
+mmx_suggest="mmx_external mmx_inline"
+
+for ext in $(filter_out mmx $ARCH_EXT_LIST_X86); do
+ eval dep=\$${ext}_deps
+ eval ${ext}_external_deps='"${dep}_external"'
+ eval ${ext}_inline_deps='"${dep}_inline"'
+ eval ${ext}_suggest='"${ext}_external ${ext}_inline"'
+done
+
aligned_stack_if_any="ppc x86"
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
@@ -1645,6 +1664,7 @@ msmpeg4v2_decoder_select="h263_decoder"
msmpeg4v2_encoder_select="h263_encoder"
msmpeg4v3_decoder_select="h263_decoder"
msmpeg4v3_encoder_select="h263_encoder"
+mss2_decoder_select="vc1_decoder"
nellymoser_decoder_select="mdct sinewin"
nellymoser_encoder_select="mdct sinewin"
png_decoder_select="zlib"
@@ -3293,8 +3313,8 @@ EOF
check_inline_asm xmm_clobbers '"":::"%xmm0"'
# check whether binutils is new enough to compile SSSE3/MMXEXT
- enabled ssse3 && check_inline_asm ssse3 '"pabsw %xmm0, %xmm0"'
- enabled mmxext && check_inline_asm mmxext '"pmaxub %mm0, %mm1"'
+ enabled ssse3 && check_inline_asm ssse3_inline '"pabsw %xmm0, %xmm0"'
+ enabled mmxext && check_inline_asm mmxext_inline '"pmaxub %mm0, %mm1"'
if ! disabled_any asm mmx yasm; then
if check_cmd $yasmexe --version; then
@@ -3315,8 +3335,8 @@ EOF
check_yasm "pextrd [eax], xmm0, 1" && enable yasm ||
die "yasm not found, use --disable-yasm for a crippled build"
- check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx
- check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4
+ check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx_external
+ check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
check_yasm "CPU amdnop" && enable cpunop
fi
@@ -3808,13 +3828,14 @@ enabled broken_strtod && force_include compat/strtod.h
enabled_any $THREADS_LIST && enable threads
+enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
+
check_deps $CONFIG_LIST \
$CONFIG_EXTRA \
$HAVE_LIST \
$ALL_COMPONENTS \
$ALL_TESTS \
-enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
if test $target_os = "haiku"; then
disable memalign
View
@@ -592,6 +592,8 @@ following image formats are supported:
@item Microsoft RLE @tab @tab X
@item Microsoft Screen 1 @tab @tab X
@tab Also known as Windows Media Video V7 Screen.
+@item Microsoft Screen 2 @tab @tab X
+ @tab Also known as Windows Media Video V9 Screen.
@item Microsoft Video 1 @tab @tab X
@item Mimic @tab @tab X
@tab Used in MSN Messenger Webcam streams.
View
@@ -309,6 +309,7 @@ OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4.o msmpeg4enc.o msmpeg4data.o \
OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o
OBJS-$(CONFIG_MSA1_DECODER) += mss3.o mss34dsp.o
OBJS-$(CONFIG_MSS1_DECODER) += mss1.o mss12.o
+OBJS-$(CONFIG_MSS2_DECODER) += mss2.o mss12.o mss2dsp.o
OBJS-$(CONFIG_MSVIDEO1_DECODER) += msvideo1.o
OBJS-$(CONFIG_MSVIDEO1_ENCODER) += msvideo1enc.o elbg.o
OBJS-$(CONFIG_MSZH_DECODER) += lcldec.o
View
@@ -177,6 +177,7 @@ void avcodec_register_all(void)
REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3);
REGISTER_DECODER (MSRLE, msrle);
REGISTER_DECODER (MSS1, mss1);
+ REGISTER_DECODER (MSS2, mss2);
REGISTER_ENCDEC (MSVIDEO1, msvideo1);
REGISTER_DECODER (MSZH, mszh);
REGISTER_DECODER (MTS2, mts2);
View
@@ -266,6 +266,7 @@ enum AVCodecID {
AV_CODEC_ID_TSCC2,
AV_CODEC_ID_MTS2,
AV_CODEC_ID_CLLC,
+ AV_CODEC_ID_MSS2,
AV_CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
AV_CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
AV_CODEC_ID_EXR = MKBETAG('0','E','X','R'),
View
@@ -1206,6 +1206,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
},
{
+ .id = AV_CODEC_ID_MSS2,
+ .type = AVMEDIA_TYPE_VIDEO,
+ .name = "mss2",
+ .long_name = NULL_IF_CONFIG_SMALL("MS Windows Media Video V9 Screen"),
+ .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY,
+ },
+ {
.id = AV_CODEC_ID_Y41P,
.type = AVMEDIA_TYPE_VIDEO,
.name = "y41p",
View
@@ -85,7 +85,7 @@ static const struct algo fdct_tab[] = {
{ "IJG-AAN-INT", ff_fdct_ifast, SCALE_PERM },
{ "IJG-LLM-INT", ff_jpeg_fdct_islow_8, NO_PERM },
-#if HAVE_MMX && HAVE_INLINE_ASM
+#if HAVE_MMX_INLINE
{ "MMX", ff_fdct_mmx, NO_PERM, AV_CPU_FLAG_MMX },
{ "MMXEXT", ff_fdct_mmx2, NO_PERM, AV_CPU_FLAG_MMXEXT },
{ "SSE2", ff_fdct_sse2, NO_PERM, AV_CPU_FLAG_SSE2 },
@@ -125,7 +125,7 @@ static const struct algo idct_tab[] = {
{ "INT", ff_j_rev_dct, MMX_PERM },
{ "SIMPLE-C", ff_simple_idct_8, NO_PERM },
-#if HAVE_MMX && HAVE_INLINE_ASM
+#if HAVE_MMX_INLINE
#if CONFIG_GPL
{ "LIBMPEG2-MMX", ff_mmx_idct, MMX_PERM, AV_CPU_FLAG_MMX, 1 },
{ "LIBMPEG2-MMX2", ff_mmxext_idct, MMX_PERM, AV_CPU_FLAG_MMX2, 1 },
View
@@ -60,7 +60,10 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
s->quant_precision=5;
s->decode_mb= ff_h263_decode_mb;
s->low_delay= 1;
- avctx->pix_fmt= avctx->get_format(avctx, avctx->codec->pix_fmts);
+ if (avctx->codec->id == AV_CODEC_ID_MSS2)
+ avctx->pix_fmt = PIX_FMT_YUV420P;
+ else
+ avctx->pix_fmt = avctx->get_format(avctx, avctx->codec->pix_fmts);
s->unrestricted_mv= 1;
/* select sub codec */
@@ -96,6 +99,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
case AV_CODEC_ID_WMV3:
case AV_CODEC_ID_VC1IMAGE:
case AV_CODEC_ID_WMV3IMAGE:
+ case AV_CODEC_ID_MSS2:
s->h263_pred = 1;
s->msmpeg4_version=6;
avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
View
@@ -39,7 +39,7 @@
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
-#if HAVE_MMX && HAVE_YASM
+#if HAVE_MMX_EXTERNAL
#include "x86/dsputil_mmx.h"
#endif
@@ -48,7 +48,7 @@
#define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
#define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
-#if HAVE_MMX && HAVE_YASM
+#if HAVE_MMX_EXTERNAL
#define deinterlace_line_inplace ff_deinterlace_line_inplace_mmx
#define deinterlace_line ff_deinterlace_line_mmx
#else
@@ -815,7 +815,7 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
return 0;
}
-#if !(HAVE_MMX && HAVE_YASM)
+#if !HAVE_MMX_EXTERNAL
/* filter parameters: [-1 4 2 4 -1] // 8 */
static void deinterlace_line_c(uint8_t *dst,
const uint8_t *lum_m4, const uint8_t *lum_m3,
@@ -864,7 +864,7 @@ static void deinterlace_line_inplace_c(uint8_t *lum_m4, uint8_t *lum_m3,
lum++;
}
}
-#endif
+#endif /* !HAVE_MMX_EXTERNAL */
/* deinterlacing : 2 temporal taps, 3 spatial taps linear filter. The
top field is copied as is, but the bottom field is deinterlaced
View
@@ -226,10 +226,11 @@ void ff_copy_picture(Picture *dst, Picture *src)
*/
static void free_frame_buffer(MpegEncContext *s, Picture *pic)
{
- /* Windows Media Image codecs allocate internal buffers with different
- * dimensions; ignore user defined callbacks for these
- */
- if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE)
+ /* WM Image / Screen codecs allocate internal buffers with different
+ * dimensions / colorspaces; ignore user-defined callbacks for these. */
+ if (s->codec_id != AV_CODEC_ID_WMV3IMAGE &&
+ s->codec_id != AV_CODEC_ID_VC1IMAGE &&
+ s->codec_id != AV_CODEC_ID_MSS2)
ff_thread_release_buffer(s->avctx, &pic->f);
else
avcodec_default_release_buffer(s->avctx, &pic->f);
@@ -254,7 +255,9 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
}
}
- if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE)
+ if (s->codec_id != AV_CODEC_ID_WMV3IMAGE &&
+ s->codec_id != AV_CODEC_ID_VC1IMAGE &&
+ s->codec_id != AV_CODEC_ID_MSS2)
r = ff_thread_get_buffer(s->avctx, &pic->f);
else
r = avcodec_default_get_buffer(s->avctx, &pic->f);
Oops, something went wrong.

0 comments on commit c617bed

Please sign in to comment.