]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/jpeglsenc.c
Add missing release_buffer on close
[ffmpeg] / libavcodec / jpeglsenc.c
index 501e2f9e5034f598c1b676c2e3a490bc3db95a6e..ea12ddaae483b07e141b8cca22b0894662baeeee 100644 (file)
  */
 
 /**
- * @file jpeglsenc.c
+ * @file libavcodec/jpeglsenc.c
  * 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"
@@ -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,7 +382,7 @@ static int encode_init_ls(AVCodecContext *ctx) {
     return 0;
 }
 
-AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless jpeg shouldnt need them
+AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
     "jpegls",
     CODEC_TYPE_VIDEO,
     CODEC_ID_JPEGLS,
@@ -389,5 +390,6 @@ AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless jpeg shouldnt need them
     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"),
 };