X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fjpeglsenc.c;h=a825cf9d6be5bb9b2f4bd541851d9f68191b7fa2;hb=80469eafb747018cb9d9a2547f65def715d073b2;hp=501e2f9e5034f598c1b676c2e3a490bc3db95a6e;hpb=bf406d90e426934f12d24a943499e7bf3b5025b6;p=ffmpeg diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index 501e2f9e503..a825cf9d6be 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/jpeglsenc.c @@ -3,31 +3,32 @@ * Copyright (c) 2003 Michael Niedermayer * Copyright (c) 2006 Konstantin Shishkov * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** - * @file jpeglsenc.c + * @file * JPEG-LS encoder. */ #include "avcodec.h" -#include "bitstream.h" +#include "get_bits.h" #include "golomb.h" +#include "mathops.h" #include "dsputil.h" #include "mjpeg.h" #include "jpegls.h" @@ -244,7 +245,7 @@ static int encode_picture_ls(AVCodecContext *avctx, unsigned char *buf, int buf_ init_put_bits(&pb2, buf2, buf_size); *p = *pict; - p->pict_type= FF_I_TYPE; + p->pict_type= AV_PICTURE_TYPE_I; p->key_frame= 1; if(avctx->pix_fmt == PIX_FMT_GRAY8 || avctx->pix_fmt == PIX_FMT_GRAY16) @@ -368,7 +369,7 @@ static int encode_picture_ls(AVCodecContext *avctx, unsigned char *buf, int buf_ return put_bits_count(&pb) >> 3; } -static int encode_init_ls(AVCodecContext *ctx) { +static av_cold int encode_init_ls(AVCodecContext *ctx) { JpeglsContext *c = (JpeglsContext*)ctx->priv_data; c->avctx = ctx; @@ -381,13 +382,14 @@ static int encode_init_ls(AVCodecContext *ctx) { return 0; } -AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless jpeg shouldnt need them +AVCodec ff_jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them "jpegls", - CODEC_TYPE_VIDEO, + AVMEDIA_TYPE_VIDEO, CODEC_ID_JPEGLS, sizeof(JpeglsContext), encode_init_ls, encode_picture_ls, NULL, - .pix_fmts= (enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_RGB24, PIX_FMT_GRAY8, PIX_FMT_GRAY16, -1}, + .pix_fmts= (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_RGB24, PIX_FMT_GRAY8, PIX_FMT_GRAY16, PIX_FMT_NONE}, + .long_name= NULL_IF_CONFIG_SMALL("JPEG-LS"), };