On 29/01/15 16:48, Anton Khirnov wrote:
This code makes no sense for h.264.
---
libavcodec/h264.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index aabaf5d..cc0819b 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -82,8 +82,7 @@ void ff_h264_draw_horiz_band(const H264Context *h,
H264SliceContext *sl,
int y, int height)
{
AVCodecContext *avctx = h->avctx;
- const AVFrame *cur = &h->cur_pic.f;
- AVFrame *last = sl->ref_list[0][0].f.data[0] ? &sl->ref_list[0][0].f :
NULL;
+ const AVFrame *src = &h->cur_pic.f;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
int vshift = desc->log2_chroma_h;
const int field_pic = h->picture_structure != PICT_FRAME;
@@ -98,18 +97,9 @@ void ff_h264_draw_horiz_band(const H264Context *h,
H264SliceContext *sl,
return;
if (avctx->draw_horiz_band) {
- const AVFrame *src;
int offset[AV_NUM_DATA_POINTERS];
int i;
- if (cur->pict_type == AV_PICTURE_TYPE_B || h->low_delay ||
- (avctx->slice_flags & SLICE_FLAG_CODED_ORDER))
- src = cur;
- else if (last)
- src = last;
- else
- return;
-
offset[0] = y * src->linesize[0];
offset[1] =
offset[2] = (y >> vshift) * src->linesize[1];
Possibly Ok.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel