mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
mpeg2 field pictures + sliced mode (doesnt work with mplayer though, dunno why)
Originally committed as revision 1626 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
1d98dca328
commit
640950c700
@ -213,7 +213,7 @@ static int decode_slice(MpegEncContext *s){
|
||||
|
||||
if(++s->mb_x >= s->mb_width){
|
||||
s->mb_x=0;
|
||||
ff_draw_horiz_band(s);
|
||||
ff_draw_horiz_band(s, s->mb_y*16, 16);
|
||||
s->mb_y++;
|
||||
}
|
||||
return 0;
|
||||
@ -230,7 +230,7 @@ static int decode_slice(MpegEncContext *s){
|
||||
}
|
||||
}
|
||||
|
||||
ff_draw_horiz_band(s);
|
||||
ff_draw_horiz_band(s, s->mb_y*16, 16);
|
||||
|
||||
s->mb_x= 0;
|
||||
}
|
||||
|
@ -1875,7 +1875,13 @@ static int mpeg_decode_slice(AVCodecContext *avctx,
|
||||
}
|
||||
|
||||
if (++s->mb_x >= s->mb_width) {
|
||||
ff_draw_horiz_band(s);
|
||||
if(s->picture_structure==PICT_FRAME){
|
||||
ff_draw_horiz_band(s, 16*s->mb_y, 16);
|
||||
}else{
|
||||
if(!s->first_field){
|
||||
ff_draw_horiz_band(s, 32*s->mb_y, 32);
|
||||
}
|
||||
}
|
||||
|
||||
s->mb_x = 0;
|
||||
s->mb_y++;
|
||||
|
@ -2051,7 +2051,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
|
||||
}else
|
||||
s->mb_skiped= 0;
|
||||
|
||||
if(s->pict_type==B_TYPE && s->avctx->draw_horiz_band){
|
||||
if(s->pict_type==B_TYPE && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME){ //FIXME precalc
|
||||
dest_y = s->current_picture.data[0] + mb_x * 16;
|
||||
dest_cb = s->current_picture.data[1] + mb_x * 8;
|
||||
dest_cr = s->current_picture.data[2] + mb_x * 8;
|
||||
@ -2356,17 +2356,18 @@ static int pix_diff_vcmp16x8(uint8_t *s1, uint8_t*s2, int stride){ //FIXME move
|
||||
|
||||
#endif //CONFIG_ENCODERS
|
||||
|
||||
void ff_draw_horiz_band(MpegEncContext *s){
|
||||
/**
|
||||
*
|
||||
* @param h is the normal height, this will be reduced automatically if needed for the last row
|
||||
*/
|
||||
void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
|
||||
if ( s->avctx->draw_horiz_band
|
||||
&& (s->last_picture.data[0] || s->low_delay) ) {
|
||||
uint8_t *src_ptr[3];
|
||||
int y, h, offset;
|
||||
y = s->mb_y * 16;
|
||||
h = s->height - y;
|
||||
if (h > 16)
|
||||
h = 16;
|
||||
int offset;
|
||||
h= FFMIN(h, s->height - y);
|
||||
|
||||
if(s->pict_type==B_TYPE)
|
||||
if(s->pict_type==B_TYPE && s->picture_structure == PICT_FRAME)
|
||||
offset = 0;
|
||||
else
|
||||
offset = y * s->linesize;
|
||||
|
@ -593,7 +593,7 @@ void ff_copy_bits(PutBitContext *pb, uint8_t *src, int length);
|
||||
void ff_clean_intra_table_entries(MpegEncContext *s);
|
||||
void ff_init_scantable(MpegEncContext *s, ScanTable *st, const uint8_t *src_scantable);
|
||||
void ff_error_resilience(MpegEncContext *s);
|
||||
void ff_draw_horiz_band(MpegEncContext *s);
|
||||
void ff_draw_horiz_band(MpegEncContext *s, int y, int h);
|
||||
void ff_emulated_edge_mc(MpegEncContext *s, uint8_t *src, int linesize, int block_w, int block_h,
|
||||
int src_x, int src_y, int w, int h);
|
||||
char ff_get_pict_type_char(int pict_type);
|
||||
|
Loading…
Reference in New Issue
Block a user