1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  x86: vc1: call ff_vc1dsp_init_x86() under if (ARCH_X86)
  x86: cavs: call ff_cavsdsp_init_x86() under if (ARCH_X86)
  x86: call most of the x86 dsp init functions under if (ARCH_X86)
  doc: support the new website layout
  doc: remove a warning from filters.texi
  doc: initial nut documentation
  segment: drop global headers setting
  lavu: fix typo in Makefile

Conflicts:
	doc/Makefile
	doc/filters.texi
	doc/t2h.init
	libavcodec/fmtconvert.c
	libavcodec/proresdsp.c
	libavcodec/x86/Makefile
	libavcodec/x86/vc1dsp_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-08 21:36:14 +02:00
commit 52dc18d414
38 changed files with 1643 additions and 471 deletions

View File

@ -6,6 +6,7 @@ HTMLPAGES = $(PROGS-yes:%=doc/%.html) \
doc/fate.html \ doc/fate.html \
doc/general.html \ doc/general.html \
doc/git-howto.html \ doc/git-howto.html \
doc/nut.html \
doc/platform.html \ doc/platform.html \
doc/syntax.html \ doc/syntax.html \

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,9 @@
</div>
<div id="footer"> <footer class="footer pagination-right">
<span class="label label-info">
Generated on $datetime for $projectname by&#160;<a href="http://www.doxygen.org/index.html">doxygen</a> $doxygenversion Generated on $datetime for $projectname by&#160;<a href="http://www.doxygen.org/index.html">doxygen</a> $doxygenversion
</span>
</footer>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -1,14 +1,16 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME--> <!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME--> <!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath$doxy_stylesheet.css" rel="stylesheet" type="text/css" /> <link href="$relpath$doxy_stylesheet.css" rel="stylesheet" type="text/css" />
<!--Header replace -->
</head> </head>
<div id="container"> <div class="container">
<div id="body"> <!--Header replace -->
<div> <div class="menu">

View File

@ -2446,14 +2446,10 @@ corresponding pixel component values.
The @var{lut} filter requires either YUV or RGB pixel formats in The @var{lut} filter requires either YUV or RGB pixel formats in
input, and accepts the options: input, and accepts the options:
@table @option @table @option
@item c0 @item @var{c0} (first pixel component)
first pixel component @item @var{c1} (second pixel component)
@item c1 @item @var{c2} (third pixel component)
second pixel component @item @var{c3} (fourth pixel component, corresponds to the alpha component)
@item c2
third pixel component
@item c3
fourth pixel component, corresponds to the alpha component
@end table @end table
The exact component associated to each option depends on the format in The exact component associated to each option depends on the format in
@ -2462,27 +2458,19 @@ input.
The @var{lutrgb} filter requires RGB pixel formats in input, and The @var{lutrgb} filter requires RGB pixel formats in input, and
accepts the options: accepts the options:
@table @option @table @option
@item r @item @var{r} (red component)
red component @item @var{g} (green component)
@item g @item @var{b} (blue component)
green component @item @var{a} (alpha component)
@item b
blue component
@item a
alpha component
@end table @end table
The @var{lutyuv} filter requires YUV pixel formats in input, and The @var{lutyuv} filter requires YUV pixel formats in input, and
accepts the options: accepts the options:
@table @option @table @option
@item y @item @var{y} (Y/luminance component)
Y/luminance component @item @var{u} (U/Cb component)
@item u @item @var{v} (V/Cr component)
U/Cb component @item @var{a} (alpha component)
@item v
V/Cr component
@item a
alpha component
@end table @end table
The expressions can contain the following constants and functions: The expressions can contain the following constants and functions:

128
doc/nut.texi Normal file
View File

@ -0,0 +1,128 @@
\input texinfo @c -*- texinfo -*-
@settitle NUT
@titlepage
@center @titlefont{NUT}
@end titlepage
@top
@contents
@chapter Description
NUT is a low overhead generic container format. It stores audio, video,
subtitle and user-defined streams in a simple, yet efficient, way.
It was created by a group of FFmpeg and MPlayer developers in 2003
and was finalized in 2008.
@chapter Container-specific codec tags
@section Generic raw YUVA formats
Since many exotic planar YUVA pixel formats are not considered by
the AVI/QuickTime FourCC lists, the following scheme is adopted for
representing them.
The first two bytes can contain the values:
Y1 = only Y
Y2 = Y+A
Y3 = YUV
Y4 = YUVA
The third byte represents the width and height chroma subsampling
values for the UV planes, that is the amount to shift the luma
width/height right to find the chroma width/height.
The fourth byte is the number of bits used (8, 16, ...).
If the order of bytes is inverted, that means that each component has
to be read big-endian.
@section Raw Audio
@multitable @columnfractions .4 .4
@item ALAW @tab A-LAW
@item ULAW @tab MU-LAW
@item P<type><interleaving><bits> @tab little-endian PCM
@item <bits><interleaving><type>P @tab big-endian PCM
@end multitable
<type> is S for signed integer, U for unsigned integer, F for IEEE float
<interleaving> is D for default, as a historical artefact.
<bits> is 8/16/24/32
@example
PFD[32] would for example be signed 32 bit little-endian IEEE float
@end example
@section Subtitles
@multitable @columnfractions .4 .4
@item UTF8 @tab Raw UTF-8
@item SSA[0] @tab SubStation Alpha
@item DVDS @tab DVD subtitles
@item DVBS @tab DVB subtitles
@end multitable
@section Codecs
@multitable @columnfractions .4 .4
@item 3IV1 @tab non-compliant MPEG-4 generated by old 3ivx
@item ASV1 @tab Asus Video
@item ASV2 @tab Asus Video 2
@item CVID @tab Cinepak
@item CYUV @tab Creative YUV
@item DIVX @tab non-compliant MPEG-4 generated by old DivX
@item DUCK @tab Truemotion 1
@item FFV1 @tab FFmpeg video 1
@item FFVH @tab FFmpeg Huffyuv
@item H261 @tab ITU H.261
@item H262 @tab ITU H.262
@item H263 @tab ITU H.263
@item H264 @tab ITU H.264
@item HFYU @tab Huffyuv
@item I263 @tab Intel H.263
@item IV31 @tab Indeo 3.1
@item IV32 @tab Indeo 3.2
@item IV50 @tab Indeo 5.0
@item LJPG @tab ITU JPEG (lossless)
@item MJLS @tab ITU JPEG-LS
@item MJPG @tab ITU JPEG
@item MPG4 @tab MS MPEG-4v1 (not ISO MPEG-4)
@item MP42 @tab MS MPEG-4v2
@item MP43 @tab MS MPEG-4v3
@item MP4V @tab ISO MPEG-4 Part 2 Video (from old encoders)
@item mpg1 @tab ISO MPEG-1 Video
@item mpg2 @tab ISO MPEG-2 Video
@item MRLE @tab MS RLE
@item MSVC @tab MS Video 1
@item RT21 @tab Indeo 2.1
@item RV10 @tab RealVideo 1.0
@item RV20 @tab RealVideo 2.0
@item RV30 @tab RealVideo 3.0
@item RV40 @tab RealVideo 4.0
@item SNOW @tab FFmpeg Snow
@item SVQ1 @tab Sorenson Video 1
@item SVQ3 @tab Sorenson Video 3
@item theo @tab Xiph Theora
@item TM20 @tab Truemotion 2.0
@item UMP4 @tab non-compliant MPEG-4 generated by UB Video MPEG-4
@item VCR1 @tab ATI VCR1
@item VP30 @tab VP 3.0
@item VP31 @tab VP 3.1
@item VP50 @tab VP 5.0
@item VP60 @tab VP 6.0
@item VP61 @tab VP 6.1
@item VP62 @tab VP 6.2
@item VP70 @tab VP 7.0
@item WMV1 @tab MS WMV7
@item WMV2 @tab MS WMV8
@item WMV3 @tab MS WMV9
@item WV1F @tab non-compliant MPEG-4 generated by ?
@item WVC1 @tab VC-1
@item XVID @tab non-compliant MPEG-4 generated by old Xvid
@item XVIX @tab non-compliant MPEG-4 generated by old Xvid with interlacing bug
@end multitable

View File

@ -6,73 +6,135 @@ sub FFmpeg_end_section($$)
$EXTRA_HEAD = $EXTRA_HEAD =
'<link rel="icon" href="favicon.png" type="image/png" /> '<link rel="icon" href="favicon.png" type="image/png" />
<link rel="stylesheet" type="text/css" href="default.css" />
'; ';
$CSS_LINES = <<EOT; $CSS_LINES = $ENV{"FFMPEG_CSS"} || <<EOT;
<style type="text/css"> <style type="text/css">
<!-- <!--
a.summary-letter { text-decoration: none } .container {
a { color: #2D6198; } margin-right: auto;
a:visited { color: #884488; } margin-left: auto;
h1 a, h2 a, h3 a { text-decoration: inherit; color: inherit; } width: 1070px;
p { margin-left: 1em; margin-right: 1em; } }
table { margin-left: 2em; } body {
pre { margin-left: 2em; } font-size: 14px;
#footer { text-align: center; } line-height: 20px;
#body { margin-left: 1em; margin-right: 1em; } color: #333333;
body { background-color: #313131; margin: 0; } background-color: #ffffff;
}
#container { a {
background-color: white; color: #0088cc;
color: #202020; text-decoration: none;
margin-left: 1em; }
margin-right: 1em; a:hover {
color: #005580;
text-decoration: underline;
}
p {
margin: 0 0 10px;
}
h2,
h3,
h4 {
margin: 10px 0;
font-family: inherit;
font-weight: bold;
line-height: 1;
border-color: #D6E9C6;
color: #468847;
border-style: solid;
border-width: 0 0 1px;
padding-left: 0.5em;
} }
h1 a,
h2 a,
h3 a,
h4 a {
color: inherit;
}
h1 { h1 {
background-color: #7BB37B; font-size: 30px;
border: 1px solid #6A996A; line-height: 40px;
color: #151515;
font-size: 1.2em;
padding-bottom: 0.2em;
padding-left: 0.4em;
padding-top: 0.2em;
} }
h2 { h2 {
color: #313131; font-size: 20px;
font-size: 1.2em; line-height: 40px;
} }
h3 { h3 {
color: #313131; font-size: 18px;
font-size: 0.8em; line-height: 40px;
margin-bottom: -8px; }
code,
pre {
padding: 0 3px 2px;
font-family: monospace;
font-size: 12px;
color: #333333;
border-radius: 3px;
}
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 20px;
word-break: break-all;
word-wrap: break-word;
white-space: pre;
white-space: pre-wrap;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
} }
.note { code {
margin: 1em; padding: 2px 4px;
border: 1px solid #bbc9d8; color: #d14;
background-color: #dde1e1; background-color: #f7f7f9;
border: 1px solid #e1e1e8;
}
pre code {
padding: 0;
color: inherit;
background-color: transparent;
border: 0;
}
.alert {
padding: 8px 35px 8px 14px;
margin-bottom: 20px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: #fcf8e3;
border: 1px solid #fbeed5;
border-radius: 4px;
color: #c09853;
} }
.important { .alert-danger,
margin: 1em; .alert-error {
border: 1px solid #d26767; background-color: #f2dede;
background-color: #f8e1e1; border-color: #eed3d7;
color: #b94a48;
}
.alert-info {
background-color: #d9edf7;
border-color: #bce8f1;
color: #3a87ad;
} }
ul.toc {
list-style-type: none;
}
--> -->
</style> </style>
EOT EOT
my $FFMPEG_NAVBAR = $ENV{"FFMPEG_NAVBAR"} || ''; my $TEMPLATE_HEADER = $ENV{"FFMPEG_HEADER"} || <<EOT;
<link rel="icon" href="favicon.png" type="image/png" />
$AFTER_BODY_OPEN = </head>
'<div id="container">' . <body>
"\n$FFMPEG_NAVBAR\n" . <div class="container">
'<div id="body">'; EOT
$PRE_BODY_CLOSE = '</div></div>'; $PRE_BODY_CLOSE = '</div></div>';
@ -83,9 +145,10 @@ $print_page_foot = \&FFmpeg_print_page_foot;
sub FFmpeg_print_page_foot($$) sub FFmpeg_print_page_foot($$)
{ {
my $fh = shift; my $fh = shift;
print $fh '<div id="footer">' . "\n"; my $program_string = T2H_DEFAULT_program_string();
T2H_DEFAULT_print_page_foot($fh); print $fh '<footer class="footer pagination-right">' . "\n";
print $fh "</div>\n"; print $fh '<span class="label label-info">' . $program_string;
print $fh "</span></footer></div>\n";
} }
$float = \&FFmpeg_float; $float = \&FFmpeg_float;
@ -107,11 +170,11 @@ sub FFmpeg_float($$$$)
if ($caption =~ /NOTE/) if ($caption =~ /NOTE/)
{ {
$class = "note"; $class = "alert alert-info";
} }
elsif ($caption =~ /IMPORTANT/) elsif ($caption =~ /IMPORTANT/)
{ {
$class = "important"; $class = "alert alert-warning";
} }
return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>'; return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>';
@ -134,7 +197,7 @@ sub FFmpeg_print_page_head($$)
$longtitle = "FFmpeg documentation : " . $longtitle; $longtitle = "FFmpeg documentation : " . $longtitle;
print $fh <<EOT; print $fh <<EOT;
$DOCTYPE <!DOCTYPE html>
<html> <html>
$Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} --> $Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
<!-- <!--
@ -150,11 +213,7 @@ $description
<meta name="Generator" content="$Texi2HTML::THISDOC{program}"> <meta name="Generator" content="$Texi2HTML::THISDOC{program}">
$encoding $encoding
$CSS_LINES $CSS_LINES
$EXTRA_HEAD $TEMPLATE_HEADER
</head>
<body $BODYTEXT>
$AFTER_BODY_OPEN
EOT EOT
} }

View File

@ -256,6 +256,6 @@ av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
if (ARCH_ARM) if (ARCH_ARM)
ff_ac3dsp_init_arm(c, bit_exact); ff_ac3dsp_init_arm(c, bit_exact);
if (HAVE_MMX) if (ARCH_X86)
ff_ac3dsp_init_x86(c, bit_exact); ff_ac3dsp_init_x86(c, bit_exact);
} }

View File

@ -546,5 +546,6 @@ av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) {
c->cavs_idct8_add = cavs_idct8_add_c; c->cavs_idct8_add = cavs_idct8_add_c;
c->idct_perm = FF_NO_IDCT_PERM; c->idct_perm = FF_NO_IDCT_PERM;
if (HAVE_MMX) ff_cavsdsp_init_mmx(c, avctx); if (ARCH_X86)
ff_cavsdsp_init_x86(c, avctx);
} }

View File

@ -37,6 +37,6 @@ typedef struct CAVSDSPContext {
} CAVSDSPContext; } CAVSDSPContext;
void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx); void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx);
void ff_cavsdsp_init_mmx(CAVSDSPContext* c, AVCodecContext *avctx); void ff_cavsdsp_init_x86(CAVSDSPContext* c, AVCodecContext *avctx);
#endif /* AVCODEC_CAVSDSP_H */ #endif /* AVCODEC_CAVSDSP_H */

View File

@ -209,8 +209,8 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
} }
s->dct32 = ff_dct32_float; s->dct32 = ff_dct32_float;
if (HAVE_MMX) if (ARCH_X86)
ff_dct_init_mmx(s); ff_dct_init_x86(s);
return 0; return 0;
} }

View File

@ -47,6 +47,6 @@ struct DCTContext {
int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type); int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type);
void ff_dct_end (DCTContext *s); void ff_dct_end (DCTContext *s);
void ff_dct_init_mmx(DCTContext *s); void ff_dct_init_x86(DCTContext *s);
#endif /* AVCODEC_DCT_H */ #endif /* AVCODEC_DCT_H */

View File

@ -160,7 +160,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
#if CONFIG_FFT_FLOAT #if CONFIG_FFT_FLOAT
if (ARCH_ARM) ff_fft_init_arm(s); if (ARCH_ARM) ff_fft_init_arm(s);
if (HAVE_ALTIVEC) ff_fft_init_altivec(s); if (HAVE_ALTIVEC) ff_fft_init_altivec(s);
if (HAVE_MMX) ff_fft_init_mmx(s); if (ARCH_X86) ff_fft_init_x86(s);
if (CONFIG_MDCT) s->mdct_calcw = s->mdct_calc; if (CONFIG_MDCT) s->mdct_calcw = s->mdct_calc;
if (HAVE_MIPSFPU) ff_fft_init_mips(s); if (HAVE_MIPSFPU) ff_fft_init_mips(s);
#else #else

View File

@ -135,7 +135,7 @@ int ff_fft_init(FFTContext *s, int nbits, int inverse);
#if CONFIG_FFT_FLOAT #if CONFIG_FFT_FLOAT
void ff_fft_init_altivec(FFTContext *s); void ff_fft_init_altivec(FFTContext *s);
void ff_fft_init_mmx(FFTContext *s); void ff_fft_init_x86(FFTContext *s);
void ff_fft_init_arm(FFTContext *s); void ff_fft_init_arm(FFTContext *s);
void ff_fft_init_mips(FFTContext *s); void ff_fft_init_mips(FFTContext *s);
#else #else

View File

@ -85,7 +85,7 @@ av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
if (ARCH_ARM) ff_fmt_convert_init_arm(c, avctx); if (ARCH_ARM) ff_fmt_convert_init_arm(c, avctx);
if (HAVE_ALTIVEC) ff_fmt_convert_init_altivec(c, avctx); if (HAVE_ALTIVEC) ff_fmt_convert_init_altivec(c, avctx);
if (HAVE_MMX) ff_fmt_convert_init_x86(c, avctx); if (ARCH_X86) ff_fmt_convert_init_x86(c, avctx);
if (HAVE_MIPSFPU) ff_fmt_convert_init_mips(c); if (HAVE_MIPSFPU) ff_fmt_convert_init_mips(c);
} }

View File

@ -130,5 +130,5 @@ void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_fo
if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc); if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc);
if (HAVE_ALTIVEC) ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc); if (HAVE_ALTIVEC) ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc);
if (HAVE_MMX) ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc); if (ARCH_X86) ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc);
} }

View File

@ -549,5 +549,5 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co
} }
if (ARCH_ARM) ff_h264_pred_init_arm(h, codec_id, bit_depth, chroma_format_idc); if (ARCH_ARM) ff_h264_pred_init_arm(h, codec_id, bit_depth, chroma_format_idc);
if (HAVE_MMX) ff_h264_pred_init_x86(h, codec_id, bit_depth, chroma_format_idc); if (ARCH_X86) ff_h264_pred_init_x86(h, codec_id, bit_depth, chroma_format_idc);
} }

View File

@ -262,7 +262,7 @@ av_cold int ff_lpc_init(LPCContext *s, int blocksize, int max_order,
s->lpc_apply_welch_window = lpc_apply_welch_window_c; s->lpc_apply_welch_window = lpc_apply_welch_window_c;
s->lpc_compute_autocorr = lpc_compute_autocorr_c; s->lpc_compute_autocorr = lpc_compute_autocorr_c;
if (HAVE_MMX) if (ARCH_X86)
ff_lpc_init_x86(s); ff_lpc_init_x86(s);
return 0; return 0;

View File

@ -41,7 +41,7 @@ void ff_mpadsp_init(MPADSPContext *s)
s->imdct36_blocks_fixed = ff_imdct36_blocks_fixed; s->imdct36_blocks_fixed = ff_imdct36_blocks_fixed;
if (ARCH_ARM) ff_mpadsp_init_arm(s); if (ARCH_ARM) ff_mpadsp_init_arm(s);
if (HAVE_MMX) ff_mpadsp_init_mmx(s); if (ARCH_X86) ff_mpadsp_init_x86(s);
if (HAVE_ALTIVEC) ff_mpadsp_init_altivec(s); if (HAVE_ALTIVEC) ff_mpadsp_init_altivec(s);
if (HAVE_MIPSFPU) ff_mpadsp_init_mipsfpu(s); if (HAVE_MIPSFPU) ff_mpadsp_init_mipsfpu(s);
if (HAVE_MIPSDSPR1) ff_mpadsp_init_mipsdspr1(s); if (HAVE_MIPSDSPR1) ff_mpadsp_init_mipsdspr1(s);

View File

@ -56,7 +56,7 @@ void ff_mpa_synth_filter_float(MPADSPContext *s,
float *sb_samples); float *sb_samples);
void ff_mpadsp_init_arm(MPADSPContext *s); void ff_mpadsp_init_arm(MPADSPContext *s);
void ff_mpadsp_init_mmx(MPADSPContext *s); void ff_mpadsp_init_x86(MPADSPContext *s);
void ff_mpadsp_init_altivec(MPADSPContext *s); void ff_mpadsp_init_altivec(MPADSPContext *s);
void ff_mpadsp_init_mipsfpu(MPADSPContext *s); void ff_mpadsp_init_mipsfpu(MPADSPContext *s);
void ff_mpadsp_init_mipsdspr1(MPADSPContext *s); void ff_mpadsp_init_mipsdspr1(MPADSPContext *s);

View File

@ -44,5 +44,5 @@ void ff_pngdsp_init(PNGDSPContext *dsp)
dsp->add_bytes_l2 = add_bytes_l2_c; dsp->add_bytes_l2 = add_bytes_l2_c;
dsp->add_paeth_prediction = ff_add_png_paeth_prediction; dsp->add_paeth_prediction = ff_add_png_paeth_prediction;
if (HAVE_MMX) ff_pngdsp_init_x86(dsp); if (ARCH_X86) ff_pngdsp_init_x86(dsp);
} }

View File

@ -75,7 +75,7 @@ void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx)
dsp->idct_put = prores_idct_put_c; dsp->idct_put = prores_idct_put_c;
dsp->idct_permutation_type = FF_NO_IDCT_PERM; dsp->idct_permutation_type = FF_NO_IDCT_PERM;
if (HAVE_MMX) ff_proresdsp_x86_init(dsp, avctx); if (ARCH_X86) ff_proresdsp_x86_init(dsp, avctx);
ff_init_scantable_permutation(dsp->idct_permutation, ff_init_scantable_permutation(dsp->idct_permutation,
dsp->idct_permutation_type); dsp->idct_permutation_type);

View File

@ -137,6 +137,6 @@ av_cold void ff_rv34dsp_init(RV34DSPContext *c, DSPContext* dsp) {
if (HAVE_NEON) if (HAVE_NEON)
ff_rv34dsp_init_neon(c, dsp); ff_rv34dsp_init_neon(c, dsp);
if (HAVE_MMX) if (ARCH_X86)
ff_rv34dsp_init_x86(c, dsp); ff_rv34dsp_init_x86(c, dsp);
} }

View File

@ -604,7 +604,7 @@ av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) {
c->rv40_loop_filter_strength[0] = rv40_h_loop_filter_strength; c->rv40_loop_filter_strength[0] = rv40_h_loop_filter_strength;
c->rv40_loop_filter_strength[1] = rv40_v_loop_filter_strength; c->rv40_loop_filter_strength[1] = rv40_v_loop_filter_strength;
if (HAVE_MMX) if (ARCH_X86)
ff_rv40dsp_init_x86(c, dsp); ff_rv40dsp_init_x86(c, dsp);
if (HAVE_NEON) if (HAVE_NEON)
ff_rv40dsp_init_neon(c, dsp); ff_rv40dsp_init_neon(c, dsp);

View File

@ -243,6 +243,6 @@ av_cold void ff_sbrdsp_init(SBRDSPContext *s)
if (ARCH_ARM) if (ARCH_ARM)
ff_sbrdsp_init_arm(s); ff_sbrdsp_init_arm(s);
if (HAVE_MMX) if (ARCH_X86)
ff_sbrdsp_init_x86(s); ff_sbrdsp_init_x86(s);
} }

View File

@ -850,6 +850,6 @@ av_cold void ff_vc1dsp_init(VC1DSPContext* dsp) {
if (HAVE_ALTIVEC) if (HAVE_ALTIVEC)
ff_vc1dsp_init_altivec(dsp); ff_vc1dsp_init_altivec(dsp);
if (HAVE_MMX) if (ARCH_X86)
ff_vc1dsp_init_mmx(dsp); ff_vc1dsp_init_x86(dsp);
} }

View File

@ -74,6 +74,6 @@ typedef struct VC1DSPContext {
void ff_vc1dsp_init(VC1DSPContext* c); void ff_vc1dsp_init(VC1DSPContext* c);
void ff_vc1dsp_init_altivec(VC1DSPContext* c); void ff_vc1dsp_init_altivec(VC1DSPContext* c);
void ff_vc1dsp_init_mmx(VC1DSPContext* dsp); void ff_vc1dsp_init_x86(VC1DSPContext* dsp);
#endif /* AVCODEC_VC1DSP_H */ #endif /* AVCODEC_VC1DSP_H */

View File

@ -90,5 +90,5 @@ void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec)
} }
if (ARCH_ARM) ff_vp56dsp_init_arm(s, codec); if (ARCH_ARM) ff_vp56dsp_init_arm(s, codec);
if (HAVE_MMX) ff_vp56dsp_init_x86(s, codec); if (ARCH_X86) ff_vp56dsp_init_x86(s, codec);
} }

View File

@ -521,7 +521,7 @@ av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
VP8_BILINEAR_MC_FUNC(1, 8); VP8_BILINEAR_MC_FUNC(1, 8);
VP8_BILINEAR_MC_FUNC(2, 4); VP8_BILINEAR_MC_FUNC(2, 4);
if (HAVE_MMX) if (ARCH_X86)
ff_vp8dsp_init_x86(dsp); ff_vp8dsp_init_x86(dsp);
if (HAVE_ALTIVEC) if (HAVE_ALTIVEC)
ff_vp8dsp_init_altivec(dsp); ff_vp8dsp_init_altivec(dsp);

View File

@ -1,42 +1,43 @@
OBJS += x86/fmtconvert_init.o
OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp_init.o
OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_init.o
OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp.o
OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhdenc.o OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhdenc.o
OBJS-$(CONFIG_FFT) += x86/fft_init.o
OBJS-$(CONFIG_GPL) += x86/idct_mmx.o
OBJS-$(CONFIG_H264DSP) += x86/h264dsp_init.o
OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
OBJS-$(CONFIG_LPC) += x86/lpc.o
OBJS-$(CONFIG_MLP_DECODER) += x86/mlpdsp.o OBJS-$(CONFIG_MLP_DECODER) += x86/mlpdsp.o
OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec.o
OBJS-$(CONFIG_MPEGVIDEO) += x86/mpegvideo.o OBJS-$(CONFIG_MPEGVIDEO) += x86/mpegvideo.o
OBJS-$(CONFIG_MPEGVIDEOENC) += x86/mpegvideoenc.o OBJS-$(CONFIG_MPEGVIDEOENC) += x86/mpegvideoenc.o
OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp_init.o
OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp_init.o
OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp_init.o
OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp_init.o \
x86/rv40dsp_init.o
OBJS-$(CONFIG_V210_DECODER) += x86/v210-init.o
OBJS-$(CONFIG_TRUEHD_DECODER) += x86/mlpdsp.o OBJS-$(CONFIG_TRUEHD_DECODER) += x86/mlpdsp.o
OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_init.o
OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp_init.o OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp_init.o
OBJS-$(CONFIG_VP5_DECODER) += x86/vp56dsp_init.o
OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp_init.o
OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp_init.o
OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
MMX-OBJS += x86/dsputil_mmx.o \ MMX-OBJS += x86/dsputil_mmx.o \
x86/fdct.o \ x86/fdct.o \
x86/fmtconvert_init.o \
x86/idct_mmx_xvid.o \ x86/idct_mmx_xvid.o \
x86/idct_sse2_xvid.o \ x86/idct_sse2_xvid.o \
x86/simple_idct.o \ x86/simple_idct.o \
MMX-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp_init.o
MMX-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_init.o
MMX-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp.o
MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp.o \ MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp.o \
x86/dwt.o x86/dwt.o
MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o \ MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o \
x86/motion_est.o x86/motion_est.o
MMX-OBJS-$(CONFIG_FFT) += x86/fft_init.o
MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o
MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_init.o
MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
MMX-OBJS-$(CONFIG_LPC) += x86/lpc.o
MMX-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec.o
MMX-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp_init.o
MMX-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp_init.o
MMX-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp_init.o
MMX-OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp_init.o
MMX-OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp_init.o \
x86/rv40dsp_init.o
MMX-OBJS-$(CONFIG_V210_DECODER) += x86/v210-init.o
MMX-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_mmx.o MMX-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_mmx.o
MMX-OBJS-$(CONFIG_VP5_DECODER) += x86/vp56dsp_init.o
MMX-OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp_init.o
MMX-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp_init.o
YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o
YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o

View File

@ -25,11 +25,13 @@
#include "libavutil/common.h" #include "libavutil/common.h"
#include "libavutil/cpu.h" #include "libavutil/cpu.h"
#include "libavutil/x86/asm.h" #include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/dsputil.h" #include "libavcodec/dsputil.h"
#include "libavcodec/cavsdsp.h" #include "libavcodec/cavsdsp.h"
#include "dsputil_mmx.h" #include "dsputil_mmx.h"
#include "config.h"
#if HAVE_INLINE_ASM #if (HAVE_MMXEXT_INLINE || HAVE_AMD3DNOW_INLINE)
/* in/out: mma=mma+mmb, mmb=mmb-mma */ /* in/out: mma=mma+mmb, mmb=mmb-mma */
#define SUMSUB_BA( a, b ) \ #define SUMSUB_BA( a, b ) \
@ -433,15 +435,12 @@ static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, ui
"pavgb " #temp ", " #a " \n\t"\ "pavgb " #temp ", " #a " \n\t"\
"mov" #size " " #a ", " #b " \n\t" "mov" #size " " #a ", " #b " \n\t"
QPEL_CAVS(put_, PUT_OP, 3dnow) #endif /* (HAVE_MMXEXT_INLINE || HAVE_AMD3DNOW_INLINE) */
QPEL_CAVS(avg_, AVG_3DNOW_OP, 3dnow)
#if HAVE_MMXEXT_INLINE
QPEL_CAVS(put_, PUT_OP, mmx2) QPEL_CAVS(put_, PUT_OP, mmx2)
QPEL_CAVS(avg_, AVG_MMX2_OP, mmx2) QPEL_CAVS(avg_, AVG_MMX2_OP, mmx2)
CAVS_MC(put_, 8, 3dnow)
CAVS_MC(put_, 16,3dnow)
CAVS_MC(avg_, 8, 3dnow)
CAVS_MC(avg_, 16,3dnow)
CAVS_MC(put_, 8, mmx2) CAVS_MC(put_, 8, mmx2)
CAVS_MC(put_, 16,mmx2) CAVS_MC(put_, 16,mmx2)
CAVS_MC(avg_, 8, mmx2) CAVS_MC(avg_, 8, mmx2)
@ -463,6 +462,16 @@ static void ff_cavsdsp_init_mmx2(CAVSDSPContext* c, AVCodecContext *avctx) {
c->cavs_idct8_add = cavs_idct8_add_mmx; c->cavs_idct8_add = cavs_idct8_add_mmx;
c->idct_perm = FF_TRANSPOSE_IDCT_PERM; c->idct_perm = FF_TRANSPOSE_IDCT_PERM;
} }
#endif /* HAVE_MMXEXT_INLINE */
#if HAVE_AMD3DNOW_INLINE
QPEL_CAVS(put_, PUT_OP, 3dnow)
QPEL_CAVS(avg_, AVG_3DNOW_OP, 3dnow)
CAVS_MC(put_, 8, 3dnow)
CAVS_MC(put_, 16,3dnow)
CAVS_MC(avg_, 8, 3dnow)
CAVS_MC(avg_, 16,3dnow)
static void ff_cavsdsp_init_3dnow(CAVSDSPContext* c, AVCodecContext *avctx) { static void ff_cavsdsp_init_3dnow(CAVSDSPContext* c, AVCodecContext *avctx) {
#define dspfunc(PFX, IDX, NUM) \ #define dspfunc(PFX, IDX, NUM) \
@ -480,15 +489,16 @@ static void ff_cavsdsp_init_3dnow(CAVSDSPContext* c, AVCodecContext *avctx) {
c->cavs_idct8_add = cavs_idct8_add_mmx; c->cavs_idct8_add = cavs_idct8_add_mmx;
c->idct_perm = FF_TRANSPOSE_IDCT_PERM; c->idct_perm = FF_TRANSPOSE_IDCT_PERM;
} }
#endif /* HAVE_AMD3DNOW_INLINE */
#endif /* HAVE_INLINE_ASM */ av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx)
void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx)
{ {
int mm_flags = av_get_cpu_flags(); int mm_flags = av_get_cpu_flags();
#if HAVE_INLINE_ASM #if HAVE_MMXEXT_INLINE
if (mm_flags & AV_CPU_FLAG_MMXEXT) ff_cavsdsp_init_mmx2(c, avctx); if (mm_flags & AV_CPU_FLAG_MMXEXT) ff_cavsdsp_init_mmx2(c, avctx);
#endif /* HAVE_MMXEXT_INLINE */
#if HAVE_AMD3DNOW_INLINE
if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx); if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx);
#endif /* HAVE_INLINE_ASM */ #endif /* HAVE_AMD3DNOW_INLINE */
} }

View File

@ -22,7 +22,7 @@
#include "libavcodec/dct.h" #include "libavcodec/dct.h"
#include "fft.h" #include "fft.h"
av_cold void ff_fft_init_mmx(FFTContext *s) av_cold void ff_fft_init_x86(FFTContext *s)
{ {
int has_vectors = av_get_cpu_flags(); int has_vectors = av_get_cpu_flags();
#if ARCH_X86_32 #if ARCH_X86_32
@ -56,7 +56,7 @@ av_cold void ff_fft_init_mmx(FFTContext *s)
} }
#if CONFIG_DCT #if CONFIG_DCT
av_cold void ff_dct_init_mmx(DCTContext *s) av_cold void ff_dct_init_x86(DCTContext *s)
{ {
int has_vectors = av_get_cpu_flags(); int has_vectors = av_get_cpu_flags();
if (EXTERNAL_SSE(has_vectors)) if (EXTERNAL_SSE(has_vectors))

View File

@ -232,7 +232,7 @@ DECL_IMDCT_BLOCKS(avx,avx)
#endif #endif
#endif /* HAVE_YASM */ #endif /* HAVE_YASM */
void ff_mpadsp_init_mmx(MPADSPContext *s) void ff_mpadsp_init_x86(MPADSPContext *s)
{ {
int mm_flags = av_get_cpu_flags(); int mm_flags = av_get_cpu_flags();

View File

@ -195,12 +195,12 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
if (EXTERNAL_MMX(mm_flags)) { if (EXTERNAL_MMX(mm_flags)) {
c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx; c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx;
c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx; c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx;
#if HAVE_INLINE_ASM #if HAVE_MMX_INLINE
c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_mmx; c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_mmx;
c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_mmx; c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_mmx;
c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_mmx; c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_mmx;
c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_mmx; c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_mmx;
#endif /* HAVE_INLINE_ASM */ #endif /* HAVE_MMX_INLINE */
#if ARCH_X86_32 #if ARCH_X86_32
QPEL_MC_SET(put_, _mmx) QPEL_MC_SET(put_, _mmx)
#endif #endif

29
libavcodec/x86/vc1dsp.h Normal file
View File

@ -0,0 +1,29 @@
/*
* VC-1 and WMV3 decoder - X86 DSP init functions
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_X86_VC1DSP_H
#define AVCODEC_X86_VC1DSP_H
#include "libavcodec/vc1dsp.h"
void ff_vc1dsp_init_mmx(VC1DSPContext *dsp);
void ff_vc1dsp_init_mmxext(VC1DSPContext *dsp);
#endif /* AVCODEC_X86_VC1DSP_H */

View File

@ -0,0 +1,123 @@
/*
* VC-1 and WMV3 - DSP functions MMX-optimized
* Copyright (c) 2007 Christophe GISQUET <christophe.gisquet@free.fr>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "libavutil/cpu.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/vc1dsp.h"
#include "vc1dsp.h"
#include "config.h"
#define LOOP_FILTER(EXT) \
void ff_vc1_v_loop_filter4_ ## EXT(uint8_t *src, int stride, int pq); \
void ff_vc1_h_loop_filter4_ ## EXT(uint8_t *src, int stride, int pq); \
void ff_vc1_v_loop_filter8_ ## EXT(uint8_t *src, int stride, int pq); \
void ff_vc1_h_loop_filter8_ ## EXT(uint8_t *src, int stride, int pq); \
\
static void vc1_v_loop_filter16_ ## EXT(uint8_t *src, int stride, int pq) \
{ \
ff_vc1_v_loop_filter8_ ## EXT(src, stride, pq); \
ff_vc1_v_loop_filter8_ ## EXT(src+8, stride, pq); \
} \
\
static void vc1_h_loop_filter16_ ## EXT(uint8_t *src, int stride, int pq) \
{ \
ff_vc1_h_loop_filter8_ ## EXT(src, stride, pq); \
ff_vc1_h_loop_filter8_ ## EXT(src+8*stride, stride, pq); \
}
#if HAVE_YASM
LOOP_FILTER(mmx2)
LOOP_FILTER(sse2)
LOOP_FILTER(ssse3)
void ff_vc1_h_loop_filter8_sse4(uint8_t *src, int stride, int pq);
static void vc1_h_loop_filter16_sse4(uint8_t *src, int stride, int pq)
{
ff_vc1_h_loop_filter8_sse4(src, stride, pq);
ff_vc1_h_loop_filter8_sse4(src+8*stride, stride, pq);
}
#endif /* HAVE_YASM */
void ff_put_vc1_chroma_mc8_mmx_nornd (uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_avg_vc1_chroma_mc8_mmx2_nornd (uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_avg_vc1_chroma_mc8_3dnow_nornd(uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_put_vc1_chroma_mc8_ssse3_nornd(uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_avg_vc1_chroma_mc8_ssse3_nornd(uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
{
int mm_flags = av_get_cpu_flags();
if (INLINE_MMX(mm_flags))
ff_vc1dsp_init_mmx(dsp);
if (INLINE_MMXEXT(mm_flags))
ff_vc1dsp_init_mmxext(dsp);
#define ASSIGN_LF(EXT) \
dsp->vc1_v_loop_filter4 = ff_vc1_v_loop_filter4_ ## EXT; \
dsp->vc1_h_loop_filter4 = ff_vc1_h_loop_filter4_ ## EXT; \
dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_ ## EXT; \
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_ ## EXT; \
dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_ ## EXT; \
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_ ## EXT
#if HAVE_YASM
if (mm_flags & AV_CPU_FLAG_MMX) {
dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= ff_put_vc1_chroma_mc8_mmx_nornd;
}
if (mm_flags & AV_CPU_FLAG_MMXEXT) {
ASSIGN_LF(mmx2);
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_mmx2_nornd;
} else if (mm_flags & AV_CPU_FLAG_3DNOW) {
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_3dnow_nornd;
}
if (mm_flags & AV_CPU_FLAG_SSE2) {
dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_sse2;
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse2;
dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_sse2;
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse2;
}
if (mm_flags & AV_CPU_FLAG_SSSE3) {
ASSIGN_LF(ssse3);
dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= ff_put_vc1_chroma_mc8_ssse3_nornd;
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_ssse3_nornd;
}
if (mm_flags & AV_CPU_FLAG_SSE4) {
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse4;
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse4;
}
#endif /* HAVE_YASM */
}

View File

@ -27,9 +27,11 @@
#include "libavutil/cpu.h" #include "libavutil/cpu.h"
#include "libavutil/mem.h" #include "libavutil/mem.h"
#include "libavutil/x86/asm.h" #include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/dsputil.h" #include "libavcodec/dsputil.h"
#include "dsputil_mmx.h" #include "dsputil_mmx.h"
#include "libavcodec/vc1dsp.h" #include "libavcodec/vc1dsp.h"
#include "vc1dsp.h"
#if HAVE_INLINE_ASM #if HAVE_INLINE_ASM
@ -685,57 +687,8 @@ static void vc1_inv_trans_8x8_dc_mmx2(uint8_t *dest, int linesize, DCTELEM *bloc
); );
} }
#endif /* HAVE_INLINE_ASM */ av_cold void ff_vc1dsp_init_mmx(VC1DSPContext *dsp)
#define LOOP_FILTER(EXT) \
void ff_vc1_v_loop_filter4_ ## EXT(uint8_t *src, int stride, int pq); \
void ff_vc1_h_loop_filter4_ ## EXT(uint8_t *src, int stride, int pq); \
void ff_vc1_v_loop_filter8_ ## EXT(uint8_t *src, int stride, int pq); \
void ff_vc1_h_loop_filter8_ ## EXT(uint8_t *src, int stride, int pq); \
\
static void vc1_v_loop_filter16_ ## EXT(uint8_t *src, int stride, int pq) \
{ \
ff_vc1_v_loop_filter8_ ## EXT(src, stride, pq); \
ff_vc1_v_loop_filter8_ ## EXT(src+8, stride, pq); \
} \
\
static void vc1_h_loop_filter16_ ## EXT(uint8_t *src, int stride, int pq) \
{ \
ff_vc1_h_loop_filter8_ ## EXT(src, stride, pq); \
ff_vc1_h_loop_filter8_ ## EXT(src+8*stride, stride, pq); \
}
#if HAVE_YASM
LOOP_FILTER(mmx2)
LOOP_FILTER(sse2)
LOOP_FILTER(ssse3)
void ff_vc1_h_loop_filter8_sse4(uint8_t *src, int stride, int pq);
static void vc1_h_loop_filter16_sse4(uint8_t *src, int stride, int pq)
{ {
ff_vc1_h_loop_filter8_sse4(src, stride, pq);
ff_vc1_h_loop_filter8_sse4(src+8*stride, stride, pq);
}
#endif /* HAVE_YASM */
void ff_put_vc1_chroma_mc8_mmx_nornd (uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_avg_vc1_chroma_mc8_mmx2_nornd (uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_avg_vc1_chroma_mc8_3dnow_nornd(uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_put_vc1_chroma_mc8_ssse3_nornd(uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_avg_vc1_chroma_mc8_ssse3_nornd(uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);
void ff_vc1dsp_init_mmx(VC1DSPContext *dsp)
{
int mm_flags = av_get_cpu_flags();
#if HAVE_INLINE_ASM
if (mm_flags & AV_CPU_FLAG_MMX) {
dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_vc1_mspel_mc00_mmx; dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_vc1_mspel_mc00_mmx;
dsp->put_vc1_mspel_pixels_tab[ 4] = put_vc1_mspel_mc01_mmx; dsp->put_vc1_mspel_pixels_tab[ 4] = put_vc1_mspel_mc01_mmx;
dsp->put_vc1_mspel_pixels_tab[ 8] = put_vc1_mspel_mc02_mmx; dsp->put_vc1_mspel_pixels_tab[ 8] = put_vc1_mspel_mc02_mmx;
@ -755,12 +708,10 @@ void ff_vc1dsp_init_mmx(VC1DSPContext *dsp)
dsp->put_vc1_mspel_pixels_tab[ 7] = put_vc1_mspel_mc31_mmx; dsp->put_vc1_mspel_pixels_tab[ 7] = put_vc1_mspel_mc31_mmx;
dsp->put_vc1_mspel_pixels_tab[11] = put_vc1_mspel_mc32_mmx; dsp->put_vc1_mspel_pixels_tab[11] = put_vc1_mspel_mc32_mmx;
dsp->put_vc1_mspel_pixels_tab[15] = put_vc1_mspel_mc33_mmx; dsp->put_vc1_mspel_pixels_tab[15] = put_vc1_mspel_mc33_mmx;
if (HAVE_YASM)
dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= ff_put_vc1_chroma_mc8_mmx_nornd;
} }
if (mm_flags & AV_CPU_FLAG_MMXEXT) { av_cold void ff_vc1dsp_init_mmxext(VC1DSPContext *dsp)
{
dsp->avg_vc1_mspel_pixels_tab[ 0] = ff_avg_vc1_mspel_mc00_mmx2; dsp->avg_vc1_mspel_pixels_tab[ 0] = ff_avg_vc1_mspel_mc00_mmx2;
dsp->avg_vc1_mspel_pixels_tab[ 4] = avg_vc1_mspel_mc01_mmx2; dsp->avg_vc1_mspel_pixels_tab[ 4] = avg_vc1_mspel_mc01_mmx2;
dsp->avg_vc1_mspel_pixels_tab[ 8] = avg_vc1_mspel_mc02_mmx2; dsp->avg_vc1_mspel_pixels_tab[ 8] = avg_vc1_mspel_mc02_mmx2;
@ -785,47 +736,5 @@ void ff_vc1dsp_init_mmx(VC1DSPContext *dsp)
dsp->vc1_inv_trans_4x8_dc = vc1_inv_trans_4x8_dc_mmx2; dsp->vc1_inv_trans_4x8_dc = vc1_inv_trans_4x8_dc_mmx2;
dsp->vc1_inv_trans_8x4_dc = vc1_inv_trans_8x4_dc_mmx2; dsp->vc1_inv_trans_8x4_dc = vc1_inv_trans_8x4_dc_mmx2;
dsp->vc1_inv_trans_4x4_dc = vc1_inv_trans_4x4_dc_mmx2; dsp->vc1_inv_trans_4x4_dc = vc1_inv_trans_4x4_dc_mmx2;
if (HAVE_YASM)
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_mmx2_nornd;
} else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_3DNOW) {
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_3dnow_nornd;
}
if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSSE3) {
dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= ff_put_vc1_chroma_mc8_ssse3_nornd;
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_ssse3_nornd;
} }
#endif /* HAVE_INLINE_ASM */ #endif /* HAVE_INLINE_ASM */
#define ASSIGN_LF(EXT) \
dsp->vc1_v_loop_filter4 = ff_vc1_v_loop_filter4_ ## EXT; \
dsp->vc1_h_loop_filter4 = ff_vc1_h_loop_filter4_ ## EXT; \
dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_ ## EXT; \
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_ ## EXT; \
dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_ ## EXT; \
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_ ## EXT
#if HAVE_YASM
if (mm_flags & AV_CPU_FLAG_MMX) {
}
if (mm_flags & AV_CPU_FLAG_MMXEXT) {
ASSIGN_LF(mmx2);
}
if (mm_flags & AV_CPU_FLAG_SSE2) {
dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_sse2;
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse2;
dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_sse2;
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse2;
}
if (mm_flags & AV_CPU_FLAG_SSSE3) {
ASSIGN_LF(ssse3);
}
if (mm_flags & AV_CPU_FLAG_SSE4) {
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse4;
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse4;
}
#endif /* HAVE_YASM */
}

View File

@ -547,7 +547,7 @@ AVOutputFormat ff_segment_muxer = {
.name = "segment", .name = "segment",
.long_name = NULL_IF_CONFIG_SMALL("segment"), .long_name = NULL_IF_CONFIG_SMALL("segment"),
.priv_data_size = sizeof(SegmentContext), .priv_data_size = sizeof(SegmentContext),
.flags = AVFMT_GLOBALHEADER | AVFMT_NOFILE, .flags = AVFMT_NOFILE,
.write_header = seg_write_header, .write_header = seg_write_header,
.write_packet = seg_write_packet, .write_packet = seg_write_packet,
.write_trailer = seg_write_trailer, .write_trailer = seg_write_trailer,