Lines Matching defs:jpg
34 MJpegDecodeContext jpg;
49 MJpegDecodeContext *jpg = &s->jpg;
52 jpg->picture_ptr = NULL;
74 s->jpg.picture_ptr = s->picture[0];
85 skip_bits(&s->jpg.gb, 8*FFMIN(len,buf_size));
102 av_log(s->jpg.avctx, AV_LOG_ERROR,
112 av_log(s->jpg.avctx, AV_LOG_ERROR,
120 av_log(s->jpg.avctx, AV_LOG_ERROR,
153 skip_bits(&s->jpg.gb, 8*FFMIN(len,buf_size));
158 static int mxpeg_check_dimensions(MXpegDecodeContext *s, MJpegDecodeContext *jpg,
161 if ((jpg->width + 0x0F)>>4 != s->mb_width ||
162 (jpg->height + 0x0F)>>4 != s->mb_height) {
163 av_log(jpg->avctx, AV_LOG_ERROR,
171 if ( (!reference_ptr->data[i] ^ !jpg->picture_ptr->data[i]) ||
172 reference_ptr->linesize[i] != jpg->picture_ptr->linesize[i]) {
173 av_log(jpg->avctx, AV_LOG_ERROR,
189 MJpegDecodeContext *jpg = &s->jpg;
201 jpg->got_picture = 0;
205 start_code = ff_mjpeg_find_marker(jpg, &buf_ptr, buf_end,
210 init_get_bits(&jpg->gb, unescaped_buf_ptr, unescaped_buf_size*8);
218 if (jpg->got_picture) //emulating EOI
224 ret = ff_mjpeg_decode_dqt(jpg);
232 ret = ff_mjpeg_decode_dht(jpg);
251 ret = ff_mjpeg_decode_sof(jpg);
258 if (jpg->interlaced) {
272 if (!jpg->got_picture) {
273 if (jpg->first_picture) {
284 av_frame_unref(jpg->picture_ptr);
285 if ((ret = ff_get_buffer(avctx, jpg->picture_ptr,
288 jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_P;
289 jpg->picture_ptr->key_frame = 0;
290 jpg->got_picture = 1;
292 jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_I;
293 jpg->picture_ptr->key_frame = 1;
298 if (mxpeg_check_dimensions(s, jpg, reference_ptr) < 0)
307 ret = ff_mjpeg_decode_sos(jpg, s->mxm_bitmask, s->bitmask_size, reference_ptr);
311 ret = ff_mjpeg_decode_sos(jpg, NULL, 0, NULL);
319 buf_ptr += (get_bits_count(&jpg->gb)+7) >> 3;
325 if (jpg->got_picture) {
326 int ret = av_frame_ref(rframe, jpg->picture_ptr);
332 jpg->picture_ptr = s->picture[s->picture_index];