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
a229d6c2
Commit
a229d6c2
authored
Apr 14, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove libdirac decoder.
libschroedinger is the preferred way to decode Dirac video.
parent
8336eb6f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
266 deletions
+3
-266
configure
configure
+0
-7
general.texi
doc/general.texi
+1
-1
platform.texi
doc/platform.texi
+2
-3
Makefile
libavcodec/Makefile
+0
-2
allcodecs.c
libavcodec/allcodecs.c
+0
-1
libdirac.h
libavcodec/libdirac.h
+0
-44
libdiracdec.c
libavcodec/libdiracdec.c
+0
-208
No files found.
configure
View file @
a229d6c2
...
...
@@ -171,7 +171,6 @@ External library support:
--enable-libcdio enable audio CD grabbing with libcdio
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
--enable-libdirac enable Dirac support via libdirac [no]
--enable-libfaac enable FAAC support via libfaac [no]
--enable-libfreetype enable libfreetype [no]
--enable-libgsm enable GSM support via libgsm [no]
...
...
@@ -943,7 +942,6 @@ CONFIG_LIST="
hardcoded_tables
libcdio
libdc1394
libdirac
libfaac
libfreetype
libgsm
...
...
@@ -1422,7 +1420,6 @@ vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
h264_parser_select
=
"golomb h264dsp h264pred"
# external libraries
libdirac_decoder_deps
=
"libdirac !libschroedinger"
libfaac_encoder_deps
=
"libfaac"
libgsm_decoder_deps
=
"libgsm"
libgsm_encoder_deps
=
"libgsm"
...
...
@@ -2963,9 +2960,6 @@ check_mathfunc truncf
enabled avisynth
&&
require2 vfw32
"windows.h vfw.h"
AVIFileInit
-lavifil32
enabled frei0r
&&
{
check_header frei0r.h
||
die
"ERROR: frei0r.h header not found"
;
}
enabled gnutls
&&
require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
enabled libdirac
&&
require_pkg_config dirac
\
"libdirac_decoder/dirac_parser.h"
\
"dirac_decoder_init"
enabled libfaac
&&
require2 libfaac
"stdint.h faac.h"
faacEncGetVersion
-lfaac
enabled libfreetype
&&
require_pkg_config freetype2
"ft2build.h freetype/freetype.h"
FT_Init_FreeType
enabled libgsm
&&
require libgsm gsm/gsm.h gsm_create
-lgsm
...
...
@@ -3255,7 +3249,6 @@ echo "frei0r enabled ${frei0r-no}"
echo
"gnutls enabled
${
gnutls
-no
}
"
echo
"libcdio support
${
libcdio
-no
}
"
echo
"libdc1394 support
${
libdc1394
-no
}
"
echo
"libdirac enabled
${
libdirac
-no
}
"
echo
"libfaac enabled
${
libfaac
-no
}
"
echo
"libgsm enabled
${
libgsm
-no
}
"
echo
"libmp3lame enabled
${
libmp3lame
-no
}
"
...
...
doc/general.texi
View file @
a229d6c2
...
...
@@ -454,7 +454,7 @@ following image formats are supported:
@item DFA @tab @tab X
@tab Codec used in Chronomaster game.
@item Dirac @tab E @tab E
@tab supported through external lib
dirac/libschroedinger libraries
@tab supported through external lib
rary libschroedinger
@item Deluxe Paint Animation @tab @tab X
@item DNxHD @tab X @tab X
@tab aka SMPTE VC3
...
...
doc/platform.texi
View file @
a229d6c2
...
...
@@ -323,9 +323,8 @@ These library packages are only available from
@uref
{
http:
//
sourceware.org
/
cygwinports
/
, Cygwin Ports
}
:
@example
yasm, libSDL
-
devel, libdirac
-
devel, libfaac
-
devel, libgsm
-
devel,
libmp
3
lame
-
devel, libschroedinger
1
.
0
-
devel, speex
-
devel, libtheora
-
devel,
libxvidcore
-
devel
yasm, libSDL
-
devel, libfaac
-
devel, libgsm
-
devel, libmp
3
lame
-
devel,
libschroedinger
1
.
0
-
devel, speex
-
devel, libtheora
-
devel, libxvidcore
-
devel
@end example
The recommendation for libnut and x
264
is to build them from source by
...
...
libavcodec/Makefile
View file @
a229d6c2
...
...
@@ -582,7 +582,6 @@ OBJS-$(CONFIG_WEBM_MUXER) += xiph.o mpeg4audio.o \
OBJS-$(CONFIG_WTV_DEMUXER)
+=
mpeg4audio.o
mpegaudiodata.o
# external codec libraries
OBJS-$(CONFIG_LIBDIRAC_DECODER)
+=
libdiracdec.o
OBJS-$(CONFIG_LIBFAAC_ENCODER)
+=
libfaac.o
audio_frame_queue.o
OBJS-$(CONFIG_LIBGSM_DECODER)
+=
libgsm.o
OBJS-$(CONFIG_LIBGSM_ENCODER)
+=
libgsm.o
...
...
@@ -692,7 +691,6 @@ SKIPHEADERS += %_tablegen.h \
tableprint.h
\
$(ARCH)
/vp56_arith.h
SKIPHEADERS-$(CONFIG_DXVA2)
+=
dxva2.h
dxva2_internal.h
SKIPHEADERS-$(CONFIG_LIBDIRAC)
+=
libdirac.h
SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER)
+=
libschroedinger.h
SKIPHEADERS-$(CONFIG_MPEG_XVMC_DECODER)
+=
xvmc.h
SKIPHEADERS-$(CONFIG_VAAPI)
+=
vaapi_internal.h
...
...
libavcodec/allcodecs.c
View file @
a229d6c2
...
...
@@ -375,7 +375,6 @@ void avcodec_register_all(void)
REGISTER_ENCDEC
(
XSUB
,
xsub
);
/* external libraries */
REGISTER_DECODER
(
LIBDIRAC
,
libdirac
);
REGISTER_ENCODER
(
LIBFAAC
,
libfaac
);
REGISTER_ENCDEC
(
LIBGSM
,
libgsm
);
REGISTER_ENCDEC
(
LIBGSM_MS
,
libgsm_ms
);
...
...
libavcodec/libdirac.h
deleted
100644 → 0
View file @
8336eb6f
/*
* Copyright (c) 2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com >
*
* This file is part of Libav.
*
* Libav 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.
*
* Libav 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 Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* data structures common to libdirac encoder and decoder
*/
#ifndef AVCODEC_LIBDIRAC_H
#define AVCODEC_LIBDIRAC_H
#include "avcodec.h"
#include <libdirac_common/dirac_types.h>
/**
* Table providing a Dirac chroma format to Libav pixel format mapping.
*/
static
const
struct
{
enum
PixelFormat
ff_pix_fmt
;
dirac_chroma_t
dirac_pix_fmt
;
}
dirac_pixel_format_map
[]
=
{
{
PIX_FMT_YUV420P
,
format420
},
{
PIX_FMT_YUV422P
,
format422
},
{
PIX_FMT_YUV444P
,
format444
},
};
#endif
/* AVCODEC_LIBDIRAC_H */
libavcodec/libdiracdec.c
deleted
100644 → 0
View file @
8336eb6f
/*
* Dirac decoder support via libdirac library
* Copyright (c) 2005 BBC, Andrew Kennedy <dirac at rd dot bbc dot co dot uk>
* Copyright (c) 2006-2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com >
*
* This file is part of Libav.
*
* Libav 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.
*
* Libav 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 Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* Dirac decoder support via libdirac library; more details about the Dirac
* project can be found at http://dirac.sourceforge.net/.
* The libdirac_decoder library implements Dirac specification version 2.2
* (http://dirac.sourceforge.net/specification.html).
*/
#include "libavutil/imgutils.h"
#include "libdirac.h"
#undef NDEBUG
#include <assert.h>
#include <libdirac_decoder/dirac_parser.h>
/** contains a single frame returned from Dirac */
typedef
struct
DiracDecoderParams
{
/** decoder handle */
dirac_decoder_t
*
p_decoder
;
/** buffer to hold decoded frame */
unsigned
char
*
p_out_frame_buf
;
}
DiracDecoderParams
;
/**
* returns Libav chroma format
*/
static
enum
PixelFormat
get_chroma_format
(
dirac_chroma_t
dirac_pix_fmt
)
{
int
num_formats
=
sizeof
(
dirac_pixel_format_map
)
/
sizeof
(
dirac_pixel_format_map
[
0
]);
int
idx
;
for
(
idx
=
0
;
idx
<
num_formats
;
++
idx
)
if
(
dirac_pixel_format_map
[
idx
].
dirac_pix_fmt
==
dirac_pix_fmt
)
return
dirac_pixel_format_map
[
idx
].
ff_pix_fmt
;
return
PIX_FMT_NONE
;
}
static
av_cold
int
libdirac_decode_init
(
AVCodecContext
*
avccontext
)
{
DiracDecoderParams
*
p_dirac_params
=
avccontext
->
priv_data
;
p_dirac_params
->
p_decoder
=
dirac_decoder_init
(
avccontext
->
debug
);
if
(
!
p_dirac_params
->
p_decoder
)
return
-
1
;
return
0
;
}
static
int
libdirac_decode_frame
(
AVCodecContext
*
avccontext
,
void
*
data
,
int
*
data_size
,
AVPacket
*
avpkt
)
{
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
DiracDecoderParams
*
p_dirac_params
=
avccontext
->
priv_data
;
AVPicture
*
picture
=
data
;
AVPicture
pic
;
int
pict_size
;
unsigned
char
*
buffer
[
3
];
*
data_size
=
0
;
if
(
buf_size
>
0
)
{
/* set data to decode into buffer */
dirac_buffer
(
p_dirac_params
->
p_decoder
,
buf
,
buf
+
buf_size
);
if
((
buf
[
4
]
&
0x08
)
==
0x08
&&
(
buf
[
4
]
&
0x03
))
avccontext
->
has_b_frames
=
1
;
}
while
(
1
)
{
/* parse data and process result */
DecoderState
state
=
dirac_parse
(
p_dirac_params
->
p_decoder
);
switch
(
state
)
{
case
STATE_BUFFER
:
return
buf_size
;
case
STATE_SEQUENCE
:
{
/* tell Libav about sequence details */
dirac_sourceparams_t
*
src_params
=
&
p_dirac_params
->
p_decoder
->
src_params
;
if
(
av_image_check_size
(
src_params
->
width
,
src_params
->
height
,
0
,
avccontext
)
<
0
)
{
av_log
(
avccontext
,
AV_LOG_ERROR
,
"Invalid dimensions (%dx%d)
\n
"
,
src_params
->
width
,
src_params
->
height
);
avccontext
->
height
=
avccontext
->
width
=
0
;
return
-
1
;
}
avccontext
->
height
=
src_params
->
height
;
avccontext
->
width
=
src_params
->
width
;
avccontext
->
pix_fmt
=
get_chroma_format
(
src_params
->
chroma
);
if
(
avccontext
->
pix_fmt
==
PIX_FMT_NONE
)
{
av_log
(
avccontext
,
AV_LOG_ERROR
,
"Dirac chroma format %d not supported currently
\n
"
,
src_params
->
chroma
);
return
-
1
;
}
avccontext
->
time_base
.
den
=
src_params
->
frame_rate
.
numerator
;
avccontext
->
time_base
.
num
=
src_params
->
frame_rate
.
denominator
;
/* calculate output dimensions */
avpicture_fill
(
&
pic
,
NULL
,
avccontext
->
pix_fmt
,
avccontext
->
width
,
avccontext
->
height
);
pict_size
=
avpicture_get_size
(
avccontext
->
pix_fmt
,
avccontext
->
width
,
avccontext
->
height
);
/* allocate output buffer */
if
(
!
p_dirac_params
->
p_out_frame_buf
)
p_dirac_params
->
p_out_frame_buf
=
av_malloc
(
pict_size
);
buffer
[
0
]
=
p_dirac_params
->
p_out_frame_buf
;
buffer
[
1
]
=
p_dirac_params
->
p_out_frame_buf
+
pic
.
linesize
[
0
]
*
avccontext
->
height
;
buffer
[
2
]
=
buffer
[
1
]
+
pic
.
linesize
[
1
]
*
src_params
->
chroma_height
;
/* tell Dirac about output destination */
dirac_set_buf
(
p_dirac_params
->
p_decoder
,
buffer
,
NULL
);
break
;
}
case
STATE_SEQUENCE_END
:
break
;
case
STATE_PICTURE_AVAIL
:
/* fill picture with current buffer data from Dirac */
avpicture_fill
(
picture
,
p_dirac_params
->
p_out_frame_buf
,
avccontext
->
pix_fmt
,
avccontext
->
width
,
avccontext
->
height
);
*
data_size
=
sizeof
(
AVPicture
);
return
buf_size
;
case
STATE_INVALID
:
return
-
1
;
default:
break
;
}
}
return
buf_size
;
}
static
av_cold
int
libdirac_decode_close
(
AVCodecContext
*
avccontext
)
{
DiracDecoderParams
*
p_dirac_params
=
avccontext
->
priv_data
;
dirac_decoder_close
(
p_dirac_params
->
p_decoder
);
av_freep
(
&
p_dirac_params
->
p_out_frame_buf
);
return
0
;
}
static
void
libdirac_flush
(
AVCodecContext
*
avccontext
)
{
/* Got a seek request. We will need free memory held in the private
* context and free the current Dirac decoder handle and then open
* a new decoder handle. */
libdirac_decode_close
(
avccontext
);
libdirac_decode_init
(
avccontext
);
return
;
}
AVCodec
ff_libdirac_decoder
=
{
.
name
=
"libdirac"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
CODEC_ID_DIRAC
,
.
priv_data_size
=
sizeof
(
DiracDecoderParams
),
.
init
=
libdirac_decode_init
,
.
close
=
libdirac_decode_close
,
.
decode
=
libdirac_decode_frame
,
.
capabilities
=
CODEC_CAP_DELAY
,
.
flush
=
libdirac_flush
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"libdirac Dirac 2.2"
),
};
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