Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
27efa296
Commit
27efa296
authored
Mar 12, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.ffmpeg.org/ffmpeg
Merged-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parents
3efbbbb5
0215006a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
169 additions
and
127 deletions
+169
-127
configure
configure
+57
-31
ffmpeg.c
ffmpeg.c
+0
-1
Makefile
libavcodec/Makefile
+3
-4
avcodec.h
libavcodec/avcodec.h
+5
-0
vc1dec.c
libavcodec/vc1dec.c
+19
-4
vp8.c
libavcodec/vp8.c
+4
-3
vp8.h
libavcodec/vp8.h
+79
-80
Makefile
libavcodec/x86/Makefile
+2
-4
No files found.
configure
View file @
27efa296
...
@@ -357,6 +357,16 @@ set_weak(){
...
@@ -357,6 +357,16 @@ set_weak(){
done
done
}
}
set_safe
(){
var
=
$1
shift
eval
$(
echo
"
$var
"
|
sed
's/[^A-Za-z0-9_]/_/g'
)
=
'$*'
}
get_safe
(){
eval echo
\$
$(
echo
"
$1
"
|
sed
's/[^A-Za-z0-9_]/_/g'
)
}
pushvar
(){
pushvar
(){
for
var
in
$*
;
do
for
var
in
$*
;
do
eval
level
=
\$
{
${
var
}
_level:
=
0
}
eval
level
=
\$
{
${
var
}
_level:
=
0
}
...
@@ -700,20 +710,17 @@ EOF
...
@@ -700,20 +710,17 @@ EOF
check_func_headers
(){
check_func_headers
(){
log check_func_headers
"
$@
"
log check_func_headers
"
$@
"
headers
=
$1
headers
=
$1
func
=
$2
func
s
=
$2
shift
2
shift
2
disable
$func
{
incs
=
""
for
hdr
in
$headers
;
do
for
hdr
in
$headers
;
do
echo
"#include <
$hdr
>"
incs
=
"
$incs
done
#include <
$hdr
>"
for
func
in
$funcs
;
do
done
echo
"long check_
$func
(void) { return (long)
$func
; }"
check_ld
"
$@
"
<<
EOF
&& enable
$func
&& enable_safe
$headers
done
$incs
echo
"int main(void) { return 0; }"
int main(int argc, char **argv){
}
| check_ld
"
$@
"
&&
enable
$funcs
&&
enable_safe
$headers
return (long)
$func
;
}
EOF
}
}
check_cpp_condition
(){
check_cpp_condition
(){
...
@@ -740,9 +747,23 @@ check_lib(){
...
@@ -740,9 +747,23 @@ check_lib(){
check_lib2
(){
check_lib2
(){
log check_lib2
"
$@
"
log check_lib2
"
$@
"
headers
=
"
$1
"
headers
=
"
$1
"
func
=
"
$2
"
func
s
=
"
$2
"
shift
2
shift
2
check_func_headers
"
$headers
"
$func
"
$@
"
&&
add_extralibs
"
$@
"
check_func_headers
"
$headers
"
"
$funcs
"
"
$@
"
&&
add_extralibs
"
$@
"
}
check_pkg_config
(){
log check_pkg_config
"
$@
"
pkg
=
"
$1
"
headers
=
"
$2
"
funcs
=
"
$3
"
shift
3
$pkg_config
--exists
$pkg
||
return
pkg_cflags
=
$(
$pkg_config
--cflags
$pkg
)
pkg_libs
=
$(
$pkg_config
--libs
$pkg
)
check_func_headers
"
$headers
"
"
$funcs
"
$pkg_cflags
$pkg_libs
"
$@
"
&&
set_safe
${
pkg
}
_cflags
$pkg_cflags
&&
set_safe
${
pkg
}
_libs
$pkg_libs
}
}
check_exec
(){
check_exec
(){
...
@@ -826,6 +847,13 @@ require2(){
...
@@ -826,6 +847,13 @@ require2(){
check_lib2
"
$headers
"
$func
"
$@
"
||
die
"ERROR:
$name
not found"
check_lib2
"
$headers
"
$func
"
$@
"
||
die
"ERROR:
$name
not found"
}
}
require_pkg_config
(){
pkg
=
"
$1
"
check_pkg_config
"
$@
"
||
die
"ERROR:
$pkg
not found"
add_cflags
$(
get_safe
${
pkg
}
_cflags
)
add_extralibs
$(
get_safe
${
pkg
}
_libs
)
}
check_host_cc
(){
check_host_cc
(){
log check_host_cc
"
$@
"
log check_host_cc
"
$@
"
cat
>
$TMPC
cat
>
$TMPC
...
@@ -872,6 +900,7 @@ COMPONENT_LIST="
...
@@ -872,6 +900,7 @@ COMPONENT_LIST="
CONFIG_LIST
=
"
CONFIG_LIST
=
"
$COMPONENT_LIST
$COMPONENT_LIST
aandct
aandct
ac3dsp
avcodec
avcodec
avdevice
avdevice
avfilter
avfilter
...
@@ -1151,6 +1180,7 @@ CMDLINE_SET="
...
@@ -1151,6 +1180,7 @@ CMDLINE_SET="
logfile
logfile
malloc_prefix
malloc_prefix
nm
nm
pkg_config
samples
samples
source_path
source_path
strip
strip
...
@@ -1212,7 +1242,8 @@ aac_decoder_select="mdct rdft"
...
@@ -1212,7 +1242,8 @@ aac_decoder_select="mdct rdft"
aac_encoder_select
=
"mdct"
aac_encoder_select
=
"mdct"
aac_latm_decoder_select
=
"aac_decoder aac_latm_parser"
aac_latm_decoder_select
=
"aac_decoder aac_latm_parser"
ac3_decoder_select
=
"mdct ac3_parser"
ac3_decoder_select
=
"mdct ac3_parser"
ac3_encoder_select
=
"mdct"
ac3_encoder_select
=
"mdct ac3dsp"
ac3_fixed_encoder_select
=
"ac3dsp"
alac_encoder_select
=
"lpc"
alac_encoder_select
=
"lpc"
amrnb_decoder_select
=
"lsp"
amrnb_decoder_select
=
"lsp"
amrwb_decoder_select
=
"lsp"
amrwb_decoder_select
=
"lsp"
...
@@ -1588,6 +1619,7 @@ host_cc_default="gcc"
...
@@ -1588,6 +1619,7 @@ host_cc_default="gcc"
ln_s
=
"ln -sf"
ln_s
=
"ln -sf"
nm_default
=
"nm"
nm_default
=
"nm"
objformat
=
"elf"
objformat
=
"elf"
pkg_config_default
=
pkg-config
ranlib
=
"ranlib"
ranlib
=
"ranlib"
strip_default
=
"strip"
strip_default
=
"strip"
yasmexe
=
"yasm"
yasmexe
=
"yasm"
...
@@ -1797,12 +1829,13 @@ set_default arch target_os
...
@@ -1797,12 +1829,13 @@ set_default arch target_os
ar_default
=
"
${
cross_prefix
}${
ar_default
}
"
ar_default
=
"
${
cross_prefix
}${
ar_default
}
"
cc_default
=
"
${
cross_prefix
}${
cc_default
}
"
cc_default
=
"
${
cross_prefix
}${
cc_default
}
"
nm_default
=
"
${
cross_prefix
}${
nm_default
}
"
nm_default
=
"
${
cross_prefix
}${
nm_default
}
"
pkg_config_default
=
"
${
cross_prefix
}${
pkg_config_default
}
"
ranlib
=
"
${
cross_prefix
}${
ranlib
}
"
ranlib
=
"
${
cross_prefix
}${
ranlib
}
"
strip_default
=
"
${
cross_prefix
}${
strip_default
}
"
strip_default
=
"
${
cross_prefix
}${
strip_default
}
"
sysinclude_default
=
"
${
sysroot
}
/usr/include"
sysinclude_default
=
"
${
sysroot
}
/usr/include"
set_default cc nm strip sysinclude
set_default cc nm
pkg_config
strip sysinclude
enabled cross_compile
||
host_cc_default
=
$cc
enabled cross_compile
||
host_cc_default
=
$cc
set_default host_cc
set_default host_cc
...
@@ -2835,9 +2868,9 @@ check_mathfunc truncf
...
@@ -2835,9 +2868,9 @@ check_mathfunc truncf
# these are off by default, so fail if requested and not available
# these are off by default, so fail if requested and not available
enabled avisynth
&&
require2 vfw32
"windows.h vfw.h"
AVIFileInit
-lavifil32
enabled avisynth
&&
require2 vfw32
"windows.h vfw.h"
AVIFileInit
-lavifil32
enabled frei0r
&&
{
check_header frei0r.h
||
die
"ERROR: frei0r.h header not found"
;
}
enabled frei0r
&&
{
check_header frei0r.h
||
die
"ERROR: frei0r.h header not found"
;
}
enabled libdirac
&&
add_cflags
$(
pkg-config
--cflags
dirac
)
&&
enabled libdirac
&&
require_pkg_config dirac
\
require libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init
$(
pkg-config
--libs
dirac
)
&&
"libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h"
\
require libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init
$(
pkg-config
--libs
dirac
)
"dirac_decoder_init dirac_encoder_init"
enabled libfaac
&&
require2 libfaac
"stdint.h faac.h"
faacEncGetVersion
-lfaac
enabled libfaac
&&
require2 libfaac
"stdint.h faac.h"
faacEncGetVersion
-lfaac
enabled libfreetype
&&
add_cflags
$(
pkg-config
--cflags
freetype2
)
&&
require libfreetype ft2build.h FT_Init_FreeType
-lfreetype
enabled libfreetype
&&
add_cflags
$(
pkg-config
--cflags
freetype2
)
&&
require libfreetype ft2build.h FT_Init_FreeType
-lfreetype
enabled libgsm
&&
require libgsm gsm/gsm.h gsm_create
-lgsm
enabled libgsm
&&
require libgsm gsm/gsm.h gsm_create
-lgsm
...
@@ -2845,13 +2878,10 @@ enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_q
...
@@ -2845,13 +2878,10 @@ enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_q
enabled libnut
&&
require libnut libnut.h nut_demuxer_init
-lnut
enabled libnut
&&
require libnut libnut.h nut_demuxer_init
-lnut
enabled libopencore_amrnb
&&
require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init
-lopencore-amrnb
enabled libopencore_amrnb
&&
require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init
-lopencore-amrnb
enabled libopencore_amrwb
&&
require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init
-lopencore-amrwb
enabled libopencore_amrwb
&&
require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init
-lopencore-amrwb
enabled libopencv
&&
{
check_lib opencv/cv.h cvCreateImageHeader
$(
pkg-config
--libs
opencv
)
||
enabled libopencv
&&
require_pkg_config opencv opencv/cv.h cvCreateImageHeader
die
"ERROR: libopencv not found"
;
}
enabled libopenjpeg
&&
require libopenjpeg openjpeg.h opj_version
-lopenjpeg
enabled libopenjpeg
&&
require libopenjpeg openjpeg.h opj_version
-lopenjpeg
enabled librtmp
&&
{
check_lib librtmp/rtmp.h RTMP_Socket
$(
pkg-config
--libs
librtmp
)
||
enabled librtmp
&&
require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
die
"ERROR: librtmp not found or RTMP_Socket() missing, librtmp version must be >= 2.2.f"
;
}
enabled libschroedinger
&&
require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
enabled libschroedinger
&&
add_cflags
$(
pkg-config
--cflags
schroedinger-1.0
)
&&
require libschroedinger schroedinger/schro.h schro_init
$(
pkg-config
--libs
schroedinger-1.0
)
enabled libspeex
&&
require libspeex speex/speex.h speex_decoder_init
-lspeex
enabled libspeex
&&
require libspeex speex/speex.h speex_decoder_init
-lspeex
enabled libtheora
&&
require libtheora theora/theoraenc.h th_info_init
-ltheoraenc
-ltheoradec
-logg
enabled libtheora
&&
require libtheora theora/theoraenc.h th_info_init
-ltheoraenc
-ltheoradec
-logg
enabled libvorbis
&&
require libvorbis vorbis/vorbisenc.h vorbis_info_init
-lvorbisenc
-lvorbis
-logg
enabled libvorbis
&&
require libvorbis vorbis/vorbisenc.h vorbis_info_init
-lvorbisenc
-lvorbis
-logg
...
@@ -2876,11 +2906,7 @@ if enabled libdc1394; then
...
@@ -2876,11 +2906,7 @@ if enabled libdc1394; then
die
"ERROR: No version of libdc1394 found "
die
"ERROR: No version of libdc1394 found "
fi
fi
SDL_CONFIG
=
"
${
cross_prefix
}
sdl-config"
if
check_pkg_config sdl SDL.h SDL_Init
;
then
if
"
${
SDL_CONFIG
}
"
--version
>
/dev/null 2>&1
;
then
sdl_cflags
=
$(
"
${
SDL_CONFIG
}
"
--cflags
)
sdl_libs
=
$(
"
${
SDL_CONFIG
}
"
--libs
)
check_func_headers SDL.h SDL_Init
$sdl_cflags
$sdl_libs
&&
check_cpp_condition SDL.h
"(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201"
$sdl_cflags
&&
check_cpp_condition SDL.h
"(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201"
$sdl_cflags
&&
enable
sdl
&&
enable
sdl
&&
check_struct SDL.h SDL_VideoInfo current_w
$sdl_cflags
&&
enable
sdl_video_size
check_struct SDL.h SDL_VideoInfo current_w
$sdl_cflags
&&
enable
sdl_video_size
...
...
ffmpeg.c
View file @
27efa296
...
@@ -520,7 +520,6 @@ static int ffmpeg_exit(int ret)
...
@@ -520,7 +520,6 @@ static int ffmpeg_exit(int ret)
/* close files */
/* close files */
for
(
i
=
0
;
i
<
nb_output_files
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_output_files
;
i
++
)
{
AVFormatContext
*
s
=
output_files
[
i
];
AVFormatContext
*
s
=
output_files
[
i
];
int
j
;
if
(
!
(
s
->
oformat
->
flags
&
AVFMT_NOFILE
)
&&
s
->
pb
)
if
(
!
(
s
->
oformat
->
flags
&
AVFMT_NOFILE
)
&&
s
->
pb
)
avio_close
(
s
->
pb
);
avio_close
(
s
->
pb
);
avformat_free_context
(
s
);
avformat_free_context
(
s
);
...
...
libavcodec/Makefile
View file @
27efa296
...
@@ -26,6 +26,7 @@ OBJS = allcodecs.o \
...
@@ -26,6 +26,7 @@ OBJS = allcodecs.o \
# parts needed for many different codecs
# parts needed for many different codecs
OBJS-$(CONFIG_AANDCT)
+=
aandcttab.o
OBJS-$(CONFIG_AANDCT)
+=
aandcttab.o
OBJS-$(CONFIG_AC3DSP)
+=
ac3dsp.o
OBJS-$(CONFIG_CRYSTALHD)
+=
crystalhd.o
OBJS-$(CONFIG_CRYSTALHD)
+=
crystalhd.o
OBJS-$(CONFIG_ENCODERS)
+=
faandct.o
jfdctfst.o
jfdctint.o
OBJS-$(CONFIG_ENCODERS)
+=
faandct.o
jfdctfst.o
jfdctint.o
OBJS-$(CONFIG_DCT)
+=
dct.o
OBJS-$(CONFIG_DCT)
+=
dct.o
...
@@ -56,10 +57,8 @@ OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o \
...
@@ -56,10 +57,8 @@ OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o \
mpeg4audio.o
mpeg4audio.o
OBJS-$(CONFIG_AASC_DECODER)
+=
aasc.o
msrledec.o
OBJS-$(CONFIG_AASC_DECODER)
+=
aasc.o
msrledec.o
OBJS-$(CONFIG_AC3_DECODER)
+=
ac3dec.o
ac3dec_data.o
ac3.o
OBJS-$(CONFIG_AC3_DECODER)
+=
ac3dec.o
ac3dec_data.o
ac3.o
OBJS-$(CONFIG_AC3_ENCODER)
+=
ac3enc_float.o
ac3tab.o
ac3.o
\
OBJS-$(CONFIG_AC3_ENCODER)
+=
ac3enc_float.o
ac3tab.o
ac3.o
ac3dsp.o
OBJS-$(CONFIG_AC3_FIXED_ENCODER)
+=
ac3enc_fixed.o
ac3tab.o
ac3.o
OBJS-$(CONFIG_AC3_FIXED_ENCODER)
+=
ac3enc_fixed.o
ac3tab.o
ac3.o
\
ac3dsp.o
OBJS-$(CONFIG_ALAC_DECODER)
+=
alac.o
OBJS-$(CONFIG_ALAC_DECODER)
+=
alac.o
OBJS-$(CONFIG_ALAC_ENCODER)
+=
alacenc.o
OBJS-$(CONFIG_ALAC_ENCODER)
+=
alacenc.o
OBJS-$(CONFIG_ALS_DECODER)
+=
alsdec.o
bgmc.o
mpeg4audio.o
OBJS-$(CONFIG_ALS_DECODER)
+=
alsdec.o
bgmc.o
mpeg4audio.o
...
...
libavcodec/avcodec.h
View file @
27efa296
...
@@ -2323,6 +2323,11 @@ typedef struct AVCodecContext {
...
@@ -2323,6 +2323,11 @@ typedef struct AVCodecContext {
#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
#define FF_PROFILE_H264_CAVLC_444 44
#define FF_PROFILE_H264_CAVLC_444 44
#define FF_PROFILE_VC1_SIMPLE 0
#define FF_PROFILE_VC1_MAIN 1
#define FF_PROFILE_VC1_COMPLEX 2
#define FF_PROFILE_VC1_ADVANCED 3
/**
/**
* level
* level
* - encoding: Set by user.
* - encoding: Set by user.
...
...
libavcodec/vc1dec.c
View file @
27efa296
...
@@ -3098,6 +3098,10 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
...
@@ -3098,6 +3098,10 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
return
-
1
;
return
-
1
;
}
}
}
}
avctx
->
profile
=
v
->
profile
;
if
(
v
->
profile
==
PROFILE_ADVANCED
)
avctx
->
level
=
v
->
level
;
avctx
->
has_b_frames
=
!!
(
avctx
->
max_b_frames
);
avctx
->
has_b_frames
=
!!
(
avctx
->
max_b_frames
);
s
->
low_delay
=
!
avctx
->
has_b_frames
;
s
->
low_delay
=
!
avctx
->
has_b_frames
;
...
@@ -3345,6 +3349,13 @@ static av_cold int vc1_decode_end(AVCodecContext *avctx)
...
@@ -3345,6 +3349,13 @@ static av_cold int vc1_decode_end(AVCodecContext *avctx)
return
0
;
return
0
;
}
}
static
const
AVProfile
profiles
[]
=
{
{
FF_PROFILE_VC1_SIMPLE
,
"Simple"
},
{
FF_PROFILE_VC1_MAIN
,
"Main"
},
{
FF_PROFILE_VC1_COMPLEX
,
"Complex"
},
{
FF_PROFILE_VC1_ADVANCED
,
"Advanced"
},
{
FF_PROFILE_UNKNOWN
},
};
AVCodec
ff_vc1_decoder
=
{
AVCodec
ff_vc1_decoder
=
{
"vc1"
,
"vc1"
,
...
@@ -3358,7 +3369,8 @@ AVCodec ff_vc1_decoder = {
...
@@ -3358,7 +3369,8 @@ AVCodec ff_vc1_decoder = {
CODEC_CAP_DR1
|
CODEC_CAP_DELAY
,
CODEC_CAP_DR1
|
CODEC_CAP_DELAY
,
NULL
,
NULL
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"SMPTE VC-1"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"SMPTE VC-1"
),
.
pix_fmts
=
ff_hwaccel_pixfmt_list_420
.
pix_fmts
=
ff_hwaccel_pixfmt_list_420
,
.
profiles
=
NULL_IF_CONFIG_SMALL
(
profiles
)
};
};
#if CONFIG_WMV3_DECODER
#if CONFIG_WMV3_DECODER
...
@@ -3374,7 +3386,8 @@ AVCodec ff_wmv3_decoder = {
...
@@ -3374,7 +3386,8 @@ AVCodec ff_wmv3_decoder = {
CODEC_CAP_DR1
|
CODEC_CAP_DELAY
,
CODEC_CAP_DR1
|
CODEC_CAP_DELAY
,
NULL
,
NULL
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Windows Media Video 9"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Windows Media Video 9"
),
.
pix_fmts
=
ff_hwaccel_pixfmt_list_420
.
pix_fmts
=
ff_hwaccel_pixfmt_list_420
,
.
profiles
=
NULL_IF_CONFIG_SMALL
(
profiles
)
};
};
#endif
#endif
...
@@ -3391,7 +3404,8 @@ AVCodec ff_wmv3_vdpau_decoder = {
...
@@ -3391,7 +3404,8 @@ AVCodec ff_wmv3_vdpau_decoder = {
CODEC_CAP_DR1
|
CODEC_CAP_DELAY
|
CODEC_CAP_HWACCEL_VDPAU
,
CODEC_CAP_DR1
|
CODEC_CAP_DELAY
|
CODEC_CAP_HWACCEL_VDPAU
,
NULL
,
NULL
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Windows Media Video 9 VDPAU"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Windows Media Video 9 VDPAU"
),
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_VDPAU_WMV3
,
PIX_FMT_NONE
}
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_VDPAU_WMV3
,
PIX_FMT_NONE
},
.
profiles
=
NULL_IF_CONFIG_SMALL
(
profiles
)
};
};
#endif
#endif
...
@@ -3408,6 +3422,7 @@ AVCodec ff_vc1_vdpau_decoder = {
...
@@ -3408,6 +3422,7 @@ AVCodec ff_vc1_vdpau_decoder = {
CODEC_CAP_DR1
|
CODEC_CAP_DELAY
|
CODEC_CAP_HWACCEL_VDPAU
,
CODEC_CAP_DR1
|
CODEC_CAP_DELAY
|
CODEC_CAP_HWACCEL_VDPAU
,
NULL
,
NULL
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"SMPTE VC-1 VDPAU"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"SMPTE VC-1 VDPAU"
),
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_VDPAU_VC1
,
PIX_FMT_NONE
}
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_VDPAU_VC1
,
PIX_FMT_NONE
},
.
profiles
=
NULL_IF_CONFIG_SMALL
(
profiles
)
};
};
#endif
#endif
libavcodec/vp8.c
View file @
27efa296
...
@@ -474,7 +474,7 @@ void decode_mvs(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y)
...
@@ -474,7 +474,7 @@ void decode_mvs(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y)
enum
{
EDGE_TOP
,
EDGE_LEFT
,
EDGE_TOPLEFT
};
enum
{
EDGE_TOP
,
EDGE_LEFT
,
EDGE_TOPLEFT
};
int
idx
=
CNT_ZERO
;
int
idx
=
CNT_ZERO
;
int
cur_sign_bias
=
s
->
sign_bias
[
mb
->
ref_frame
];
int
cur_sign_bias
=
s
->
sign_bias
[
mb
->
ref_frame
];
int
*
sign_bias
=
s
->
sign_bias
;
int
8_t
*
sign_bias
=
s
->
sign_bias
;
VP56mv
near_mv
[
4
];
VP56mv
near_mv
[
4
];
uint8_t
cnt
[
4
]
=
{
0
};
uint8_t
cnt
[
4
]
=
{
0
};
VP56RangeCoder
*
c
=
&
s
->
c
;
VP56RangeCoder
*
c
=
&
s
->
c
;
...
@@ -640,7 +640,7 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, uint8_
...
@@ -640,7 +640,7 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, uint8_
* otherwise, the index of the last coeff decoded plus one
* otherwise, the index of the last coeff decoded plus one
*/
*/
static
int
decode_block_coeffs_internal
(
VP56RangeCoder
*
c
,
DCTELEM
block
[
16
],
static
int
decode_block_coeffs_internal
(
VP56RangeCoder
*
c
,
DCTELEM
block
[
16
],
uint8_t
probs
[
8
][
3
][
NUM_DCT_TOKENS
-
1
],
uint8_t
probs
[
16
][
3
][
NUM_DCT_TOKENS
-
1
],
int
i
,
uint8_t
*
token_prob
,
int16_t
qmul
[
2
])
int
i
,
uint8_t
*
token_prob
,
int16_t
qmul
[
2
])
{
{
goto
skip_eob
;
goto
skip_eob
;
...
@@ -1282,7 +1282,7 @@ static av_always_inline void idct_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblo
...
@@ -1282,7 +1282,7 @@ static av_always_inline void idct_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblo
s
->
vp8dsp
.
vp8_idct_add
(
ch_dst
+
4
*
x
,
s
->
block
[
4
+
ch
][(
y
<<
1
)
+
x
],
s
->
uvlinesize
);
s
->
vp8dsp
.
vp8_idct_add
(
ch_dst
+
4
*
x
,
s
->
block
[
4
+
ch
][(
y
<<
1
)
+
x
],
s
->
uvlinesize
);
nnz4
>>=
8
;
nnz4
>>=
8
;
if
(
!
nnz4
)
if
(
!
nnz4
)
break
;
goto
chroma_idct_end
;
}
}
ch_dst
+=
4
*
s
->
uvlinesize
;
ch_dst
+=
4
*
s
->
uvlinesize
;
}
}
...
@@ -1290,6 +1290,7 @@ static av_always_inline void idct_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblo
...
@@ -1290,6 +1290,7 @@ static av_always_inline void idct_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblo
s
->
vp8dsp
.
vp8_idct_dc_add4uv
(
ch_dst
,
s
->
block
[
4
+
ch
],
s
->
uvlinesize
);
s
->
vp8dsp
.
vp8_idct_dc_add4uv
(
ch_dst
,
s
->
block
[
4
+
ch
],
s
->
uvlinesize
);
}
}
}
}
chroma_idct_end:
;
}
}
}
}
...
...
libavcodec/vp8.h
View file @
27efa296
...
@@ -85,83 +85,24 @@ typedef struct {
...
@@ -85,83 +85,24 @@ typedef struct {
typedef
struct
{
typedef
struct
{
AVCodecContext
*
avctx
;
AVCodecContext
*
avctx
;
DSPContext
dsp
;
VP8DSPContext
vp8dsp
;
H264PredContext
hpc
;
vp8_mc_func
put_pixels_tab
[
3
][
3
][
3
];
AVFrame
frames
[
4
];
AVFrame
*
framep
[
4
];
AVFrame
*
framep
[
4
];
uint8_t
*
edge_emu_buffer
;
uint8_t
*
edge_emu_buffer
;
VP56RangeCoder
c
;
///< header context, includes mb modes and motion vectors
int
profile
;
in
t
mb_width
;
/* number of horizontal MB */
uint16_
t
mb_width
;
/* number of horizontal MB */
in
t
mb_height
;
/* number of vertical MB */
uint16_
t
mb_height
;
/* number of vertical MB */
int
linesize
;
int
linesize
;
int
uvlinesize
;
int
uvlinesize
;
int
keyframe
;
uint8_t
keyframe
;
int
invisible
;
uint8_t
deblock_filter
;
int
update_last
;
///< update VP56_FRAME_PREVIOUS with the current one
uint8_t
mbskip_enabled
;
int
update_golden
;
///< VP56_FRAME_NONE if not updated, or which frame to copy if so
uint8_t
segment
;
///< segment of the current macroblock
int
update_altref
;
uint8_t
chroma_pred_mode
;
///< 8x8c pred mode of the current macroblock
int
deblock_filter
;
uint8_t
profile
;
/**
* If this flag is not set, all the probability updates
* are discarded after this frame is decoded.
*/
int
update_probabilities
;
/**
* All coefficients are contained in separate arith coding contexts.
* There can be 1, 2, 4, or 8 of these after the header context.
*/
int
num_coeff_partitions
;
VP56RangeCoder
coeff_partition
[
8
];
VP8Macroblock
*
macroblocks
;
VP8Macroblock
*
macroblocks_base
;
VP8FilterStrength
*
filter_strength
;
uint8_t
*
intra4x4_pred_mode_top
;
uint8_t
intra4x4_pred_mode_left
[
4
];
uint8_t
*
segmentation_map
;
/**
* Cache of the top row needed for intra prediction
* 16 for luma, 8 for each chroma plane
*/
uint8_t
(
*
top_border
)[
16
+
8
+
8
];
/**
* For coeff decode, we need to know whether the above block had non-zero
* coefficients. This means for each macroblock, we need data for 4 luma
* blocks, 2 u blocks, 2 v blocks, and the luma dc block, for a total of 9
* per macroblock. We keep the last row in top_nnz.
*/
uint8_t
(
*
top_nnz
)[
9
];
DECLARE_ALIGNED
(
8
,
uint8_t
,
left_nnz
)[
9
];
/**
* This is the index plus one of the last non-zero coeff
* for each of the blocks in the current macroblock.
* So, 0 -> no coeffs
* 1 -> dc-only (special transform)
* 2+-> full transform
*/
DECLARE_ALIGNED
(
16
,
uint8_t
,
non_zero_count_cache
)[
6
][
4
];
DECLARE_ALIGNED
(
16
,
DCTELEM
,
block
)[
6
][
4
][
16
];
DECLARE_ALIGNED
(
16
,
DCTELEM
,
block_dc
)[
16
];
uint8_t
intra4x4_pred_mode_mb
[
16
];
int
chroma_pred_mode
;
///< 8x8c pred mode of the current macroblock
int
segment
;
///< segment of the current macroblock
VP56mv
mv_min
;
VP56mv
mv_min
;
VP56mv
mv_max
;
VP56mv
mv_max
;
int
mbskip_enabled
;
int8_t
sign_bias
[
4
];
///< one state [0, 1] per ref frame type
int
sign_bias
[
4
];
///< one state [0, 1] per ref frame type
int
ref_count
[
3
];
int
ref_count
[
3
];
/**
/**
...
@@ -170,13 +111,26 @@ typedef struct {
...
@@ -170,13 +111,26 @@ typedef struct {
* a frame, since the values persist between interframes.
* a frame, since the values persist between interframes.
*/
*/
struct
{
struct
{
in
t
enabled
;
uint8_
t
enabled
;
in
t
absolute_vals
;
uint8_
t
absolute_vals
;
in
t
update_map
;
uint8_
t
update_map
;
int8_t
base_quant
[
4
];
int8_t
base_quant
[
4
];
int8_t
filter_level
[
4
];
///< base loop filter level
int8_t
filter_level
[
4
];
///< base loop filter level
}
segmentation
;
}
segmentation
;
struct
{
uint8_t
simple
;
uint8_t
level
;
uint8_t
sharpness
;
}
filter
;
VP8Macroblock
*
macroblocks
;
VP8FilterStrength
*
filter_strength
;
uint8_t
*
intra4x4_pred_mode_top
;
uint8_t
intra4x4_pred_mode_left
[
4
];
uint8_t
*
segmentation_map
;
/**
/**
* Macroblocks can have one of 4 different quants in a frame when
* Macroblocks can have one of 4 different quants in a frame when
* segmentation is enabled.
* segmentation is enabled.
...
@@ -190,13 +144,7 @@ typedef struct {
...
@@ -190,13 +144,7 @@ typedef struct {
}
qmat
[
4
];
}
qmat
[
4
];
struct
{
struct
{
int
simple
;
uint8_t
enabled
;
///< whether each mb can have a different strength based on mode/ref
int
level
;
int
sharpness
;
}
filter
;
struct
{
int
enabled
;
///< whether each mb can have a different strength based on mode/ref
/**
/**
* filter strength adjustment for the following macroblock modes:
* filter strength adjustment for the following macroblock modes:
...
@@ -219,6 +167,34 @@ typedef struct {
...
@@ -219,6 +167,34 @@ typedef struct {
int8_t
ref
[
4
];
int8_t
ref
[
4
];
}
lf_delta
;
}
lf_delta
;
/**
* Cache of the top row needed for intra prediction
* 16 for luma, 8 for each chroma plane
*/
uint8_t
(
*
top_border
)[
16
+
8
+
8
];
/**
* For coeff decode, we need to know whether the above block had non-zero
* coefficients. This means for each macroblock, we need data for 4 luma
* blocks, 2 u blocks, 2 v blocks, and the luma dc block, for a total of 9
* per macroblock. We keep the last row in top_nnz.
*/
uint8_t
(
*
top_nnz
)[
9
];
DECLARE_ALIGNED
(
8
,
uint8_t
,
left_nnz
)[
9
];
/**
* This is the index plus one of the last non-zero coeff
* for each of the blocks in the current macroblock.
* So, 0 -> no coeffs
* 1 -> dc-only (special transform)
* 2+-> full transform
*/
DECLARE_ALIGNED
(
16
,
uint8_t
,
non_zero_count_cache
)[
6
][
4
];
VP56RangeCoder
c
;
///< header context, includes mb modes and motion vectors
DECLARE_ALIGNED
(
16
,
DCTELEM
,
block
)[
6
][
4
][
16
];
DECLARE_ALIGNED
(
16
,
DCTELEM
,
block_dc
)[
16
];
uint8_t
intra4x4_pred_mode_mb
[
16
];
/**
/**
* These are all of the updatable probabilities for binary decisions.
* These are all of the updatable probabilities for binary decisions.
* They are only implictly reset on keyframes, making it quite likely
* They are only implictly reset on keyframes, making it quite likely
...
@@ -233,10 +209,33 @@ typedef struct {
...
@@ -233,10 +209,33 @@ typedef struct {
uint8_t
golden
;
uint8_t
golden
;
uint8_t
pred16x16
[
4
];
uint8_t
pred16x16
[
4
];
uint8_t
pred8x8c
[
3
];
uint8_t
pred8x8c
[
3
];
/* Padded to allow overreads */
uint8_t
token
[
4
][
16
][
3
][
NUM_DCT_TOKENS
-
1
];
uint8_t
token
[
4
][
17
][
3
][
NUM_DCT_TOKENS
-
1
];
uint8_t
mvc
[
2
][
19
];
uint8_t
mvc
[
2
][
19
];
}
prob
[
2
];
}
prob
[
2
];
VP8Macroblock
*
macroblocks_base
;
int
invisible
;
int
update_last
;
///< update VP56_FRAME_PREVIOUS with the current one
int
update_golden
;
///< VP56_FRAME_NONE if not updated, or which frame to copy if so
int
update_altref
;
/**
* If this flag is not set, all the probability updates
* are discarded after this frame is decoded.
*/
int
update_probabilities
;
/**
* All coefficients are contained in separate arith coding contexts.
* There can be 1, 2, 4, or 8 of these after the header context.
*/
int
num_coeff_partitions
;
VP56RangeCoder
coeff_partition
[
8
];
DSPContext
dsp
;
VP8DSPContext
vp8dsp
;
H264PredContext
hpc
;
vp8_mc_func
put_pixels_tab
[
3
][
3
][
3
];
AVFrame
frames
[
4
];
}
VP8Context
;
}
VP8Context
;
#endif
#endif
libavcodec/x86/Makefile
View file @
27efa296
...
@@ -17,10 +17,8 @@ MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
...
@@ -17,10 +17,8 @@ MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
YASM-OBJS-$(CONFIG_VC1_DECODER)
+=
x86/vc1dsp_yasm.o
YASM-OBJS-$(CONFIG_VC1_DECODER)
+=
x86/vc1dsp_yasm.o
MMX-OBJS-$(CONFIG_AC3_ENCODER)
+=
x86/ac3dsp_mmx.o
MMX-OBJS-$(CONFIG_AC3DSP)
+=
x86/ac3dsp_mmx.o
MMX-OBJS-$(CONFIG_AC3_FIXED_ENCODER)
+=
x86/ac3dsp_mmx.o
YASM-OBJS-$(CONFIG_AC3DSP)
+=
x86/ac3dsp.o
YASM-OBJS-$(CONFIG_AC3_ENCODER)
+=
x86/ac3dsp.o
YASM-OBJS-$(CONFIG_AC3_FIXED_ENCODER)
+=
x86/ac3dsp.o
MMX-OBJS-$(CONFIG_CAVS_DECODER)
+=
x86/cavsdsp_mmx.o
MMX-OBJS-$(CONFIG_CAVS_DECODER)
+=
x86/cavsdsp_mmx.o
MMX-OBJS-$(CONFIG_MP1FLOAT_DECODER)
+=
x86/mpegaudiodec_mmx.o
MMX-OBJS-$(CONFIG_MP1FLOAT_DECODER)
+=
x86/mpegaudiodec_mmx.o
MMX-OBJS-$(CONFIG_MP2FLOAT_DECODER)
+=
x86/mpegaudiodec_mmx.o
MMX-OBJS-$(CONFIG_MP2FLOAT_DECODER)
+=
x86/mpegaudiodec_mmx.o
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment