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

« back to all changes in this revision

Viewing changes to libavcodec/tiffenc.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:
329
329
    bytes_per_row = (((s->width - 1) / s->subsampling[0] + 1) * s->bpp *
330
330
                     s->subsampling[0] * s->subsampling[1] + 7) >> 3;
331
331
    packet_size = avctx->height * bytes_per_row * 2 +
332
 
                  avctx->height * 4 + FF_MIN_BUFFER_SIZE;
 
332
                  avctx->height * 4 + AV_INPUT_BUFFER_MIN_SIZE;
333
333
 
334
 
    if ((ret = ff_alloc_packet2(avctx, pkt, packet_size)) < 0)
 
334
    if ((ret = ff_alloc_packet2(avctx, pkt, packet_size, 0)) < 0)
335
335
        return ret;
336
336
    ptr          = pkt->data;
337
337
    s->buf_start = pkt->data;
475
475
    ADD_ENTRY(s,  TIFF_YRES,         TIFF_RATIONAL, 1,      res);
476
476
    ADD_ENTRY1(s, TIFF_RES_UNIT,     TIFF_SHORT,    2);
477
477
 
478
 
    if (!(avctx->flags & CODEC_FLAG_BITEXACT))
 
478
    if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT))
479
479
        ADD_ENTRY(s, TIFF_SOFTWARE_NAME, TIFF_STRING,
480
480
                  strlen(LIBAVCODEC_IDENT) + 1, LIBAVCODEC_IDENT);
481
481
 
521
521
static av_cold int encode_init(AVCodecContext *avctx)
522
522
{
523
523
    TiffEncoderContext *s = avctx->priv_data;
524
 
 
525
 
    avctx->coded_frame = av_frame_alloc();
526
 
    if (!avctx->coded_frame)
527
 
        return AVERROR(ENOMEM);
528
 
 
 
524
#if FF_API_CODED_FRAME
 
525
FF_DISABLE_DEPRECATION_WARNINGS
529
526
    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
530
527
    avctx->coded_frame->key_frame = 1;
 
528
FF_ENABLE_DEPRECATION_WARNINGS
 
529
#endif
531
530
    s->avctx = avctx;
532
531
 
533
532
    return 0;
537
536
{
538
537
    TiffEncoderContext *s = avctx->priv_data;
539
538
 
540
 
    av_frame_free(&avctx->coded_frame);
541
539
    av_freep(&s->strip_sizes);
542
540
    av_freep(&s->strip_offsets);
543
541
    av_freep(&s->yuv_line);
574
572
    .priv_data_size = sizeof(TiffEncoderContext),
575
573
    .init           = encode_init,
576
574
    .close          = encode_close,
577
 
    .capabilities   = CODEC_CAP_FRAME_THREADS | CODEC_CAP_INTRA_ONLY,
 
575
    .capabilities   = AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_INTRA_ONLY,
578
576
    .encode2        = encode_frame,
579
577
    .pix_fmts       = (const enum AVPixelFormat[]) {
580
578
        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48LE, AV_PIX_FMT_PAL8,