diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-02-06 10:36:07 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-02-06 10:36:07 +0000 |
commit | 09b0499f1b28d3b2657fd2bda809b5204ac4ab55 (patch) | |
tree | b4db285c4350064f697138903026b02216211eba /libavcodec/huffyuv.c | |
parent | 360130378b4a0029a2a341398b08a7d7acfe85d5 (diff) | |
download | ffmpeg-09b0499f1b28d3b2657fd2bda809b5204ac4ab55.tar.gz |
seperate bitstream encoding skip from PASS1 flag
Originally committed as revision 3938 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r-- | libavcodec/huffyuv.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index ac1a8b2c85..723a7fad6b 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -644,7 +644,10 @@ static int encode_422_bitstream(HYuvContext *s, int count){ s->stats[0][ s->temp[0][2*i+1] ]++; s->stats[2][ s->temp[2][ i ] ]++; } - }else if(s->context){ + } + if(s->avctx->flags2&CODEC_FLAG2_NO_OUTPUT) + return 0; + if(s->context){ for(i=0; i<count; i++){ s->stats[0][ s->temp[0][2*i ] ]++; put_bits(&s->pb, s->len[0][ s->temp[0][2*i ] ], s->bits[0][ s->temp[0][2*i ] ]); @@ -680,7 +683,11 @@ static int encode_gray_bitstream(HYuvContext *s, int count){ s->stats[0][ s->temp[0][2*i ] ]++; s->stats[0][ s->temp[0][2*i+1] ]++; } - }else if(s->context){ + } + if(s->avctx->flags2&CODEC_FLAG2_NO_OUTPUT) + return 0; + + if(s->context){ for(i=0; i<count; i++){ s->stats[0][ s->temp[0][2*i ] ]++; put_bits(&s->pb, s->len[0][ s->temp[0][2*i ] ], s->bits[0][ s->temp[0][2*i ] ]); @@ -1176,7 +1183,8 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, snprintf(p, end-p, "\n"); p++; } - }else{ + } + if(!(s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)){ flush_put_bits(&s->pb); s->dsp.bswap_buf((uint32_t*)buf, (uint32_t*)buf, size); avctx->stats_out[0] = '\0'; |