~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/libdiracdec.c

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include <libdirac_decoder/dirac_parser.h>
38
38
 
39
39
/** contains a single frame returned from Dirac */
40
 
typedef struct FfmpegDiracDecoderParams {
 
40
typedef struct DiracDecoderParams {
41
41
    /** decoder handle */
42
42
    dirac_decoder_t* p_decoder;
43
43
 
44
44
    /** buffer to hold decoded frame */
45
45
    unsigned char* p_out_frame_buf;
46
 
} FfmpegDiracDecoderParams;
 
46
} DiracDecoderParams;
47
47
 
48
48
 
49
49
/**
50
50
* returns Libav chroma format
51
51
*/
52
 
static enum PixelFormat GetFfmpegChromaFormat(dirac_chroma_t dirac_pix_fmt)
 
52
static enum PixelFormat get_chroma_format(dirac_chroma_t dirac_pix_fmt)
53
53
{
54
 
    int num_formats = sizeof(ffmpeg_dirac_pixel_format_map) /
55
 
                      sizeof(ffmpeg_dirac_pixel_format_map[0]);
 
54
    int num_formats = sizeof(dirac_pixel_format_map) /
 
55
                      sizeof(dirac_pixel_format_map[0]);
56
56
    int idx;
57
57
 
58
58
    for (idx = 0; idx < num_formats; ++idx)
59
 
        if (ffmpeg_dirac_pixel_format_map[idx].dirac_pix_fmt == dirac_pix_fmt)
60
 
            return ffmpeg_dirac_pixel_format_map[idx].ff_pix_fmt;
 
59
        if (dirac_pixel_format_map[idx].dirac_pix_fmt == dirac_pix_fmt)
 
60
            return dirac_pixel_format_map[idx].ff_pix_fmt;
61
61
    return PIX_FMT_NONE;
62
62
}
63
63
 
64
64
static av_cold int libdirac_decode_init(AVCodecContext *avccontext)
65
65
{
66
66
 
67
 
    FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data;
 
67
    DiracDecoderParams *p_dirac_params = avccontext->priv_data;
68
68
    p_dirac_params->p_decoder =  dirac_decoder_init(avccontext->debug);
69
69
 
70
70
    if (!p_dirac_params->p_decoder)
80
80
    const uint8_t *buf = avpkt->data;
81
81
    int buf_size = avpkt->size;
82
82
 
83
 
    FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data;
 
83
    DiracDecoderParams *p_dirac_params = avccontext->priv_data;
84
84
    AVPicture *picture = data;
85
85
    AVPicture pic;
86
86
    int pict_size;
117
117
            avccontext->height = src_params->height;
118
118
            avccontext->width  = src_params->width;
119
119
 
120
 
            avccontext->pix_fmt = GetFfmpegChromaFormat(src_params->chroma);
 
120
            avccontext->pix_fmt = get_chroma_format(src_params->chroma);
121
121
            if (avccontext->pix_fmt == PIX_FMT_NONE) {
122
122
                av_log(avccontext, AV_LOG_ERROR,
123
123
                       "Dirac chroma format %d not supported currently\n",
174
174
 
175
175
static av_cold int libdirac_decode_close(AVCodecContext *avccontext)
176
176
{
177
 
    FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data;
 
177
    DiracDecoderParams *p_dirac_params = avccontext->priv_data;
178
178
    dirac_decoder_close(p_dirac_params->p_decoder);
179
179
 
180
180
    av_freep(&p_dirac_params->p_out_frame_buf);
195
195
 
196
196
 
197
197
AVCodec ff_libdirac_decoder = {
198
 
    "libdirac",
199
 
    AVMEDIA_TYPE_VIDEO,
200
 
    CODEC_ID_DIRAC,
201
 
    sizeof(FfmpegDiracDecoderParams),
202
 
    libdirac_decode_init,
203
 
    NULL,
204
 
    libdirac_decode_close,
205
 
    libdirac_decode_frame,
206
 
    CODEC_CAP_DELAY,
 
198
    .name           = "libdirac",
 
199
    .type           = AVMEDIA_TYPE_VIDEO,
 
200
    .id             = CODEC_ID_DIRAC,
 
201
    .priv_data_size = sizeof(DiracDecoderParams),
 
202
    .init           = libdirac_decode_init,
 
203
    .close          = libdirac_decode_close,
 
204
    .decode         = libdirac_decode_frame,
 
205
    .capabilities   = CODEC_CAP_DELAY,
207
206
    .flush = libdirac_flush,
208
207
    .long_name = NULL_IF_CONFIG_SMALL("libdirac Dirac 2.2"),
209
208
};