Mercurial > libavcodec.hg
diff huffyuv.c @ 2501:236562127b89 libavcodec
seperate bitstream encoding skip from PASS1 flag
author | michael |
---|---|
date | Sun, 06 Feb 2005 10:36:07 +0000 |
parents | f67b63ed036d |
children | 366e8a09eb6e |
line wrap: on
line diff
--- a/huffyuv.c Fri Feb 04 11:53:35 2005 +0000 +++ b/huffyuv.c Sun Feb 06 10:36:07 2005 +0000 @@ -644,7 +644,10 @@ 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 @@ 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 @@ 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';