/*
+ * Creative YUV (CYUV) Video Decoder
+ * by Mike Melanson (melanson@pcisys.net)
+ * based on "Creative YUV (CYUV) stream format for AVI":
+ * http://www.csse.monash.edu.au/~timf/videocodec/cyuv.txt
*
* Copyright (C) 2003 the ffmpeg project
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Creative YUV (CYUV) Video Decoder
- * by Mike Melanson (melanson@pcisys.net)
- * based on "Creative YUV (CYUV) stream format for AVI":
- * http://www.csse.monash.edu.au/~timf/videocodec/cyuv.txt
- *
*/
/**
#include "avcodec.h"
#include "dsputil.h"
-#include "mpegvideo.h"
typedef struct CyuvDecodeContext {
AVFrame frame;
} CyuvDecodeContext;
-static int cyuv_decode_init(AVCodecContext *avctx)
+static av_cold int cyuv_decode_init(AVCodecContext *avctx)
{
CyuvDecodeContext *s = avctx->priv_data;
static int cyuv_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
CyuvDecodeContext *s=avctx->priv_data;
int v_ptr;
/* prediction error tables (make it clear that they are signed values) */
- signed char *y_table = (signed char*)buf + 0;
- signed char *u_table = (signed char*)buf + 16;
- signed char *v_table = (signed char*)buf + 32;
+ const signed char *y_table = (const signed char*)buf + 0;
+ const signed char *u_table = (const signed char*)buf + 16;
+ const signed char *v_table = (const signed char*)buf + 32;
unsigned char y_pred, u_pred, v_pred;
int stream_ptr;
return buf_size;
}
-static int cyuv_decode_end(AVCodecContext *avctx)
+static av_cold int cyuv_decode_end(AVCodecContext *avctx)
{
/* CyuvDecodeContext *s = avctx->priv_data;*/
cyuv_decode_end,
cyuv_decode_frame,
CODEC_CAP_DR1,
- NULL
+ NULL,
+ .long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"),
};