~phatforge/libav/fixup

« back to all changes in this revision

Viewing changes to libavcodec/libdiracdec.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2011-04-30 14:27:42 UTC
  • mfrom: (1.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110430142742-quvblxk1tj6adlh5
Tags: 4:0.7~b1-1ubuntu1
* Merge from debian. Remaining changes:
  - don't build against libfaad, libdirac, librtmp and libopenjpeg
    (all in universe)
  - explicitly --enable-pic on powerpc, cf. LP #654666
  - different arm configure bits that should probably better be
    merged into debian
* Cherry-picked from git: 
  - install doc/APIChanges and refer to them in NEWS.Debian (Closes: #623682)
  - don't try to install non-existing documentation, fixes FTBFS on powerpc

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * Copyright (c) 2005 BBC, Andrew Kennedy <dirac at rd dot bbc dot co dot uk>
4
4
 * Copyright (c) 2006-2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com >
5
5
 *
6
 
 * This file is part of FFmpeg.
 
6
 * This file is part of Libav.
7
7
 *
8
 
 * FFmpeg is free software; you can redistribute it and/or
 
8
 * Libav is free software; you can redistribute it and/or
9
9
 * modify it under the terms of the GNU Lesser General Public
10
10
 * License as published by the Free Software Foundation; either
11
11
 * version 2.1 of the License, or (at your option) any later version.
12
12
 *
13
 
 * FFmpeg is distributed in the hope that it will be useful,
 
13
 * Libav is distributed in the hope that it will be useful,
14
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
16
 * Lesser General Public License for more details.
17
17
 *
18
18
 * You should have received a copy of the GNU Lesser General Public
19
 
 * License along with FFmpeg; if not, write to the Free Software
 
19
 * License along with Libav; if not, write to the Free Software
20
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
21
 */
22
22
 
28
28
* (http://dirac.sourceforge.net/specification.html).
29
29
*/
30
30
 
 
31
#include "libavutil/imgutils.h"
31
32
#include "libdirac.h"
32
33
 
33
34
#undef NDEBUG
46
47
 
47
48
 
48
49
/**
49
 
* returns FFmpeg chroma format
 
50
* returns Libav chroma format
50
51
*/
51
52
static enum PixelFormat GetFfmpegChromaFormat(dirac_chroma_t dirac_pix_fmt)
52
53
{
102
103
 
103
104
        case STATE_SEQUENCE:
104
105
        {
105
 
            /* tell FFmpeg about sequence details */
 
106
            /* tell Libav about sequence details */
106
107
            dirac_sourceparams_t *src_params = &p_dirac_params->p_decoder->src_params;
107
108
 
108
 
            if (avcodec_check_dimensions(avccontext, src_params->width,
109
 
                                         src_params->height) < 0) {
 
109
            if (av_image_check_size(src_params->width, src_params->height,
 
110
                                    0, avccontext) < 0) {
110
111
                av_log(avccontext, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n",
111
112
                       src_params->width, src_params->height);
112
113
                avccontext->height = avccontext->width = 0;
193
194
 
194
195
 
195
196
 
196
 
AVCodec libdirac_decoder = {
 
197
AVCodec ff_libdirac_decoder = {
197
198
    "libdirac",
198
199
    AVMEDIA_TYPE_VIDEO,
199
200
    CODEC_ID_DIRAC,