Mercurial > libavcodec.hg
comparison h264.c @ 5876:731ee5ad6bde libavcodec
Correct assignment of interlaced_frame; was being set on output frames,
in display order, based on decoding information in decoding order. Now
set properly, immediately upon completion of decode.
Based on original patch from Reinhard Nissl, rnisssl % gmx , de
Original Thread: [FFmpeg-devel] H.264 + PAFF: BBC HD recording shows
extreme interlacing artefacts, Thu, 01 Nov 2007 22:43:09
author | heydowns |
---|---|
date | Mon, 05 Nov 2007 18:16:42 +0000 |
parents | 18859ffa5705 |
children | 6c962a4004a1 |
comparison
equal
deleted
inserted
replaced
5875:5a61e8e2f65c | 5876:731ee5ad6bde |
---|---|
7761 if (s->first_field) { | 7761 if (s->first_field) { |
7762 /* Wait for second field. */ | 7762 /* Wait for second field. */ |
7763 *data_size = 0; | 7763 *data_size = 0; |
7764 | 7764 |
7765 } else { | 7765 } else { |
7766 cur->interlaced_frame = FIELD_OR_MBAFF_PICTURE; | |
7767 | |
7766 //FIXME do something with unavailable reference frames | 7768 //FIXME do something with unavailable reference frames |
7767 | 7769 |
7768 #if 0 //decode order | 7770 #if 0 //decode order |
7769 *data_size = sizeof(AVFrame); | 7771 *data_size = sizeof(AVFrame); |
7770 #else | 7772 #else |
7843 | 7845 |
7844 /* Return the Picture timestamp as the frame number */ | 7846 /* Return the Picture timestamp as the frame number */ |
7845 /* we substract 1 because it is added on utils.c */ | 7847 /* we substract 1 because it is added on utils.c */ |
7846 avctx->frame_number = s->picture_number - 1; | 7848 avctx->frame_number = s->picture_number - 1; |
7847 #endif | 7849 #endif |
7848 pict->interlaced_frame = FIELD_OR_MBAFF_PICTURE; | |
7849 return get_consumed_bytes(s, buf_index, buf_size); | 7850 return get_consumed_bytes(s, buf_index, buf_size); |
7850 } | 7851 } |
7851 #if 0 | 7852 #if 0 |
7852 static inline void fill_mb_avail(H264Context *h){ | 7853 static inline void fill_mb_avail(H264Context *h){ |
7853 MpegEncContext * const s = &h->s; | 7854 MpegEncContext * const s = &h->s; |