comparison libschroedingerenc.c @ 10055:fdb318d12314 libavcodec

Simplify 'if' condition statements. Drop useless '!= 0' from 'exp != 0', replace 'exp == 0' by '!exp'.
author diego
date Sat, 15 Aug 2009 11:02:50 +0000
parents 1045a26cb90d
children 646065f63290
comparison
equal deleted inserted replaced
10054:8ab9fbad11b2 10055:fdb318d12314
143 avccontext->width, 143 avccontext->width,
144 avccontext->height); 144 avccontext->height);
145 145
146 avccontext->coded_frame = &p_schro_params->picture; 146 avccontext->coded_frame = &p_schro_params->picture;
147 147
148 if (avccontext->gop_size == 0){ 148 if (!avccontext->gop_size) {
149 schro_encoder_setting_set_double (p_schro_params->encoder, 149 schro_encoder_setting_set_double (p_schro_params->encoder,
150 "gop_structure", 150 "gop_structure",
151 SCHRO_ENCODER_GOP_INTRA_ONLY); 151 SCHRO_ENCODER_GOP_INTRA_ONLY);
152 152
153 if (avccontext->coder_type == FF_CODER_TYPE_VLC) { 153 if (avccontext->coder_type == FF_CODER_TYPE_VLC) {
162 avccontext->has_b_frames = 1; 162 avccontext->has_b_frames = 1;
163 } 163 }
164 164
165 /* FIXME - Need to handle SCHRO_ENCODER_RATE_CONTROL_LOW_DELAY. */ 165 /* FIXME - Need to handle SCHRO_ENCODER_RATE_CONTROL_LOW_DELAY. */
166 if (avccontext->flags & CODEC_FLAG_QSCALE) { 166 if (avccontext->flags & CODEC_FLAG_QSCALE) {
167 if (avccontext->global_quality == 0) { 167 if (!avccontext->global_quality) {
168 /* lossless coding */ 168 /* lossless coding */
169 schro_encoder_setting_set_double (p_schro_params->encoder, 169 schro_encoder_setting_set_double (p_schro_params->encoder,
170 "rate_control", 170 "rate_control",
171 SCHRO_ENCODER_RATE_CONTROL_LOSSLESS); 171 SCHRO_ENCODER_RATE_CONTROL_LOSSLESS);
172 } else { 172 } else {
364 last_frame_in_sequence = 1; 364 last_frame_in_sequence = 1;
365 365
366 p_frame_output = 366 p_frame_output =
367 ff_dirac_schro_queue_pop (&p_schro_params->enc_frame_queue); 367 ff_dirac_schro_queue_pop (&p_schro_params->enc_frame_queue);
368 368
369 if (p_frame_output == NULL) 369 if (!p_frame_output)
370 return 0; 370 return 0;
371 371
372 memcpy(frame, p_frame_output->p_encbuf, p_frame_output->size); 372 memcpy(frame, p_frame_output->p_encbuf, p_frame_output->size);
373 avccontext->coded_frame->key_frame = p_frame_output->key_frame; 373 avccontext->coded_frame->key_frame = p_frame_output->key_frame;
374 /* Use the frame number of the encoded frame as the pts. It is OK to 374 /* Use the frame number of the encoded frame as the pts. It is OK to