Mercurial > libavcodec.hg
comparison huffyuv.c @ 1368:0fd38b711f06 libavcodec
AVCodec.flush()
ff_draw_horiz_band() in coded order / cleanup
author | michaelni |
---|---|
date | Thu, 17 Jul 2003 12:29:07 +0000 |
parents | 1cbc2380d172 |
children | 45d761c387cd |
comparison
equal
deleted
inserted
replaced
1367:b33c63b53cef | 1368:0fd38b711f06 |
---|---|
671 } | 671 } |
672 } | 672 } |
673 | 673 |
674 static void draw_slice(HYuvContext *s, int y){ | 674 static void draw_slice(HYuvContext *s, int y){ |
675 int h, cy; | 675 int h, cy; |
676 uint8_t *src_ptr[3]; | 676 int offset[4]; |
677 | 677 |
678 if(s->avctx->draw_horiz_band==NULL) | 678 if(s->avctx->draw_horiz_band==NULL) |
679 return; | 679 return; |
680 | 680 |
681 h= y - s->last_slice_end; | 681 h= y - s->last_slice_end; |
684 if(s->bitstream_bpp==12){ | 684 if(s->bitstream_bpp==12){ |
685 cy= y>>1; | 685 cy= y>>1; |
686 }else{ | 686 }else{ |
687 cy= y; | 687 cy= y; |
688 } | 688 } |
689 | 689 |
690 src_ptr[0] = s->picture.data[0] + s->picture.linesize[0]*y; | 690 offset[0] = s->picture.linesize[0]*y; |
691 src_ptr[1] = s->picture.data[1] + s->picture.linesize[1]*cy; | 691 offset[1] = s->picture.linesize[1]*cy; |
692 src_ptr[2] = s->picture.data[2] + s->picture.linesize[2]*cy; | 692 offset[2] = s->picture.linesize[2]*cy; |
693 offset[3] = 0; | |
693 emms_c(); | 694 emms_c(); |
694 | 695 |
695 s->avctx->draw_horiz_band(s->avctx, src_ptr, s->picture.linesize[0], y, s->width, h); | 696 s->avctx->draw_horiz_band(s->avctx, &s->picture, offset, y, s->width, h); |
696 | 697 |
697 s->last_slice_end= y + h; | 698 s->last_slice_end= y + h; |
698 } | 699 } |
699 | 700 |
700 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ | 701 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ |