Mercurial > libavcodec.hg
comparison mpegvideo.c @ 1989:be2386b2f201 libavcodec
10l
author | michael |
---|---|
date | Thu, 29 Apr 2004 22:12:29 +0000 |
parents | b5753525f9a8 |
children | fa09319b80af |
comparison
equal
deleted
inserted
replaced
1988:b5753525f9a8 | 1989:be2386b2f201 |
---|---|
595 */ | 595 */ |
596 int MPV_common_init(MpegEncContext *s) | 596 int MPV_common_init(MpegEncContext *s) |
597 { | 597 { |
598 int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y; | 598 int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y; |
599 | 599 |
600 if(s->avctx->thread_count > MAX_THREADS || 16*s->avctx->thread_count > s->height){ | |
601 av_log(s->avctx, AV_LOG_ERROR, "too many threads\n"); | |
602 return -1; | |
603 } | |
604 | |
600 dsputil_init(&s->dsp, s->avctx); | 605 dsputil_init(&s->dsp, s->avctx); |
601 DCT_common_init(s); | 606 DCT_common_init(s); |
602 | 607 |
603 s->flags= s->avctx->flags; | 608 s->flags= s->avctx->flags; |
604 s->flags2= s->avctx->flags2; | 609 s->flags2= s->avctx->flags2; |
985 | 990 |
986 if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4 | 991 if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4 |
987 && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO | 992 && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO |
988 && (s->codec_id != CODEC_ID_H263P || !(s->flags & CODEC_FLAG_H263P_SLICE_STRUCT))){ | 993 && (s->codec_id != CODEC_ID_H263P || !(s->flags & CODEC_FLAG_H263P_SLICE_STRUCT))){ |
989 av_log(avctx, AV_LOG_ERROR, "multi threaded encoding not supported by codec\n"); | 994 av_log(avctx, AV_LOG_ERROR, "multi threaded encoding not supported by codec\n"); |
990 return -1; | |
991 } | |
992 | |
993 if(s->avctx->thread_count > MAX_THREADS || 16*s->avctx->thread_count > s->height){ | |
994 av_log(avctx, AV_LOG_ERROR, "too many threads\n"); | |
995 return -1; | 995 return -1; |
996 } | 996 } |
997 | 997 |
998 if(s->avctx->thread_count > 1) | 998 if(s->avctx->thread_count > 1) |
999 s->rtp_mode= 1; | 999 s->rtp_mode= 1; |