#include <stdio.h>
#include <stdlib.h>
+#include "libavutil/bswap.h"
+#include "libavutil/lzo.h"
#include "avcodec.h"
-
-#include "bswap.h"
#include "dsputil.h"
-#include "lzo.h"
#include "rtjpeg.h"
typedef struct {
* \param width width of the video frame
* \param height height of the video frame
*/
-static void copy_frame(AVFrame *f, uint8_t *src,
+static void copy_frame(AVFrame *f, const uint8_t *src,
int width, int height) {
AVPicture pic;
avpicture_fill(&pic, src, PIX_FMT_YUV420P, width, height);
* \brief extract quantization tables from codec data into our context
*/
static int get_quant(AVCodecContext *avctx, NuvContext *c,
- uint8_t *buf, int size) {
+ const uint8_t *buf, int size) {
int i;
if (size < 2 * 64 * 4) {
av_log(avctx, AV_LOG_ERROR, "insufficient rtjpeg quant data\n");
return orig_size;
}
-static int decode_init(AVCodecContext *avctx) {
+static av_cold int decode_init(AVCodecContext *avctx) {
NuvContext *c = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_YUV420P;
c->pic.data[0] = NULL;
return 0;
}
-static int decode_end(AVCodecContext *avctx) {
+static av_cold int decode_end(AVCodecContext *avctx) {
NuvContext *c = avctx->priv_data;
av_freep(&c->decomp_buf);
if (c->pic.data[0])
decode_end,
decode_frame,
CODEC_CAP_DR1,
+ .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo"),
};