~ubuntu-branches/debian/sid/ffmpeg/sid

« back to all changes in this revision

Viewing changes to libavcodec/yuv4enc.c

  • Committer: Package Import Robot
  • Author(s): Andreas Cadhalpun, Fabian Greffrath, Andreas Cadhalpun
  • Date: 2015-09-22 15:15:20 UTC
  • mfrom: (0.1.29)
  • Revision ID: package-import@ubuntu.com-20150922151520-hhmd3in9ykigjvs9
Tags: 7:2.8-1
[ Fabian Greffrath ]
* Pass the --dbg-package=ffmpeg-dbg parameter only to dh_strip.
* Add alternative Depends: libavcodec-ffmpeg-extra56 to libavcodec-dev and
  ffmpeg-dbg to allow for building and debugging with this library installed.

[ Andreas Cadhalpun ]
* Import new major upstream release 2.8.
* Remove the transitional lib*-ffmpeg-dev packages.
* Drop old Breaks on kodi-bin.
* Drop workaround for sparc, which is no Debian architecture anymore.
* Re-enable x265 on alpha, as it's available again.
* Disable unavailable frei0r, opencv and x264 on mips64el.
* Disable libopenjpeg (#787275) and libschroedinger (#787957) decoders.
  (Closes: #786670)
* Disable libdc1394 on sparc64, because it links against the broken due to
  #790560 libudev1.
* Enable libsnappy support.
* Add new symbols.
* Update debian/copyright.
* Update debian/tests/encdec_list.txt.
* Add hls-only-seek-if-there-is-an-offset.patch. (Closes: #798189)
* Add 'Breaks: libavutil-ffmpeg54 (>= 8:0)' to the libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
static av_cold int yuv4_encode_init(AVCodecContext *avctx)
27
27
{
28
 
    avctx->coded_frame = av_frame_alloc();
29
 
 
30
 
    if (!avctx->coded_frame) {
31
 
        av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");
32
 
        return AVERROR(ENOMEM);
33
 
    }
34
 
 
35
28
    return 0;
36
29
}
37
30
 
42
35
    uint8_t *y, *u, *v;
43
36
    int i, j, ret;
44
37
 
45
 
    if ((ret = ff_alloc_packet2(avctx, pkt, 6 * (avctx->width + 1 >> 1) * (avctx->height + 1 >> 1))) < 0)
 
38
    if ((ret = ff_alloc_packet2(avctx, pkt, 6 * (avctx->width + 1 >> 1) * (avctx->height + 1 >> 1), 0)) < 0)
46
39
        return ret;
47
40
    dst = pkt->data;
48
41
 
49
 
    avctx->coded_frame->key_frame = 1;
50
 
    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
51
 
 
52
42
    y = pic->data[0];
53
43
    u = pic->data[1];
54
44
    v = pic->data[2];
74
64
 
75
65
static av_cold int yuv4_encode_close(AVCodecContext *avctx)
76
66
{
77
 
    av_frame_free(&avctx->coded_frame);
78
 
 
79
67
    return 0;
80
68
}
81
69
 
88
76
    .encode2      = yuv4_encode_frame,
89
77
    .close        = yuv4_encode_close,
90
78
    .pix_fmts     = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
 
79
    .capabilities = AV_CODEC_CAP_INTRA_ONLY,
91
80
};