~siretart/ubuntu/utopic/libav/libav10

« back to all changes in this revision

Viewing changes to libavutil/imgutils.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-05-11 12:28:45 UTC
  • mfrom: (1.1.22) (2.1.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140511122845-gxvpts83i958y0i5
Tags: 6:10.1-1
* New upstream release 10:
   - pcm-dvd: Fix 20bit decoding (bug/592)
   - avi: Improve non-interleaved detection (bug/666)
   - arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
   - arm: hpeldsp: prevent overreads in armv6 asm (bug/646)
   - avfilter: Add missing emms_c when needed
   - rtmpproto: Check the buffer sizes when copying app/playpath strings
   - swscale: Fix an undefined behaviour
   - vp9: Read the frame size as unsigned
   - dcadec: Use correct channel count in stereo downmix check
   - dcadec: Do not decode the XCh extension when downmixing to stereo
   - matroska: add the Opus mapping
   - matroskadec: read the CodecDelay element
   - rtmpproto: Make sure to pass on the error code if read_connect failed
   - lavr: allocate the resampling buffer with a positive size
   - mp3enc: Properly write bitrate value in XING header (Closes: #736088)
   - golomb: Fix the implementation of get_se_golomb_long
* Drop debian/libav-tools.maintscript. ffserver is no longer found in
  stable, and this seems to cause other problems today (Closes: #742676)

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    if (!desc)
56
56
        return AVERROR(EINVAL);
57
57
 
58
 
    if (desc->flags & PIX_FMT_BITSTREAM)
 
58
    if (desc->flags & AV_PIX_FMT_FLAG_BITSTREAM)
59
59
        return (width * (desc->comp[0].step_minus1+1) + 7) >> 3;
60
60
 
61
61
    av_image_fill_max_pixsteps(max_step, max_step_comp, desc);
72
72
 
73
73
    memset(linesizes, 0, 4*sizeof(linesizes[0]));
74
74
 
75
 
    if (!desc || desc->flags & PIX_FMT_HWACCEL)
 
75
    if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
76
76
        return AVERROR(EINVAL);
77
77
 
78
 
    if (desc->flags & PIX_FMT_BITSTREAM) {
 
78
    if (desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) {
79
79
        if (width > (INT_MAX -7) / (desc->comp[0].step_minus1+1))
80
80
            return AVERROR(EINVAL);
81
81
        linesizes[0] = (width * (desc->comp[0].step_minus1+1) + 7) >> 3;
102
102
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
103
103
    memset(data     , 0, sizeof(data[0])*4);
104
104
 
105
 
    if (!desc || desc->flags & PIX_FMT_HWACCEL)
 
105
    if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
106
106
        return AVERROR(EINVAL);
107
107
 
108
108
    data[0] = ptr;
110
110
        return AVERROR(EINVAL);
111
111
    size[0] = linesizes[0] * height;
112
112
 
113
 
    if (desc->flags & PIX_FMT_PAL ||
114
 
        desc->flags & PIX_FMT_PSEUDOPAL) {
 
113
    if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
 
114
        desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
115
115
        size[0] = (size[0] + 3) & ~3;
116
116
        data[1] = ptr + size[0]; /* palette is stored here as 256 32 bits words */
117
117
        return size[0] + 256 * 4;
203
203
        av_free(buf);
204
204
        return ret;
205
205
    }
206
 
    if (desc->flags & PIX_FMT_PAL || desc->flags & PIX_FMT_PSEUDOPAL)
 
206
    if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
207
207
        avpriv_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt);
208
208
 
209
209
    return ret;
247
247
{
248
248
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
249
249
 
250
 
    if (!desc || desc->flags & PIX_FMT_HWACCEL)
 
250
    if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
251
251
        return;
252
252
 
253
 
    if (desc->flags & PIX_FMT_PAL ||
254
 
        desc->flags & PIX_FMT_PSEUDOPAL) {
 
253
    if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
 
254
        desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
255
255
        av_image_copy_plane(dst_data[0], dst_linesizes[0],
256
256
                            src_data[0], src_linesizes[0],
257
257
                            width, height);