Revision 09b0499f

View differences:

ffmpeg.c
170 170
static int qns = 0;
171 171
static int closed_gop = 0;
172 172
static int strict_gop = 0;
173
static int no_output = 0;
173 174
static int do_deinterlace = 0;
174 175
static int do_interlace_dct = 0;
175 176
static int do_interlace_me = 0;
......
3220 3221
                if (do_interlace_me) {
3221 3222
                    video_enc->flags |= CODEC_FLAG_INTERLACED_ME;
3222 3223
                }
3224
                if (no_output) {
3225
                    video_enc->flags2 |= CODEC_FLAG2_NO_OUTPUT;
3226
                }
3223 3227
                video_enc->qmin = video_qmin;
3224 3228
                video_enc->qmax = video_qmax;
3225 3229
                video_enc->lmin = video_lmin;
......
4025 4029
    { "naq", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_normalize_aqp}, "normalize adaptive quantization" },
4026 4030
    { "cgop", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&closed_gop}, "closed gop" },
4027 4031
    { "sgop", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&strict_gop}, "strict gop" },
4032
    { "noout", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&no_output}, "skip bitstream encoding" },
4028 4033
    { "scan_offset", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&use_scan_offset}, "enable SVCD Scan Offset placeholder" },
4029 4034
    { "qpel", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&use_qpel}, "enable 1/4-pel" },
4030 4035
    { "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
libavcodec/avcodec.h
321 321
#define CODEC_FLAG_CLOSED_GOP     0x80000000
322 322
#define CODEC_FLAG2_FAST          0x00000001 ///< allow non spec compliant speedup tricks
323 323
#define CODEC_FLAG2_STRICT_GOP    0x00000002 ///< strictly enforce GOP size
324
#define CODEC_FLAG2_NO_OUTPUT     0x00000004 ///< skip bitstream encoding
324 325

  
325 326
/* Unsupported options :
326 327
 * 		Syntax Arithmetic coding (SAC)
libavcodec/huffyuv.c
644 644
            s->stats[0][ s->temp[0][2*i+1] ]++;
645 645
            s->stats[2][ s->temp[2][  i  ] ]++;
646 646
        }
647
    }else if(s->context){
647
    }
648
    if(s->avctx->flags2&CODEC_FLAG2_NO_OUTPUT)
649
        return 0;
650
    if(s->context){
648 651
        for(i=0; i<count; i++){
649 652
            s->stats[0][ s->temp[0][2*i  ] ]++;
650 653
            put_bits(&s->pb, s->len[0][ s->temp[0][2*i  ] ], s->bits[0][ s->temp[0][2*i  ] ]);
......
680 683
            s->stats[0][ s->temp[0][2*i  ] ]++;
681 684
            s->stats[0][ s->temp[0][2*i+1] ]++;
682 685
        }
683
    }else if(s->context){
686
    }
687
    if(s->avctx->flags2&CODEC_FLAG2_NO_OUTPUT)
688
        return 0;
689
    
690
    if(s->context){
684 691
        for(i=0; i<count; i++){
685 692
            s->stats[0][ s->temp[0][2*i  ] ]++;
686 693
            put_bits(&s->pb, s->len[0][ s->temp[0][2*i  ] ], s->bits[0][ s->temp[0][2*i  ] ]);
......
1176 1183
            snprintf(p, end-p, "\n");
1177 1184
            p++;
1178 1185
        }
1179
    }else{
1186
    }
1187
    if(!(s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)){
1180 1188
        flush_put_bits(&s->pb);
1181 1189
        s->dsp.bswap_buf((uint32_t*)buf, (uint32_t*)buf, size);
1182 1190
        avctx->stats_out[0] = '\0';

Also available in: Unified diff