s->start_code = -1;
s->first_picture = 1;
s->org_height = avctx->coded_height;
+ avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
build_basic_mjpeg_vlc(s);
int ff_mjpeg_decode_sos(MJpegDecodeContext *s)
{
int len, nb_components, i, h, v, predictor, point_transform;
- int vmax, hmax, index, id;
+ int index, id;
const int block_size= s->lossless ? 1 : 8;
int ilv, prev_shift;
av_log(s->avctx, AV_LOG_ERROR, "decode_sos: invalid len (%d)\n", len);
return -1;
}
- vmax = 0;
- hmax = 0;
for(i=0;i<nb_components;i++) {
id = get_bits(&s->gb, 8) - 1;
av_log(s->avctx, AV_LOG_DEBUG, "component: %d\n", id);
int ff_mjpeg_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- const uint8_t *buf, int buf_size)
+ AVPacket *avpkt)
{
+ const uint8_t *buf = avpkt->data;
+ int buf_size = avpkt->size;
MJpegDecodeContext *s = avctx->priv_data;
const uint8_t *buf_end, *buf_ptr;
int start_code;