Mercurial > libavcodec.hg
comparison x264.c @ 3063:f02d0b59279c libavcodec
Remove all stray tabs and trailing whitespace, this time for good.
author | diego |
---|---|
date | Tue, 24 Jan 2006 10:33:14 +0000 |
parents | d640e46c69ea |
children | 7dcdc73c1631 |
comparison
equal
deleted
inserted
replaced
3062:8d05d4036b6a | 3063:f02d0b59279c |
---|---|
223 | 223 |
224 x4->params.analyse.i_trellis = avctx->trellis; | 224 x4->params.analyse.i_trellis = avctx->trellis; |
225 | 225 |
226 if(avctx->level > 0) x4->params.i_level_idc = avctx->level; | 226 if(avctx->level > 0) x4->params.i_level_idc = avctx->level; |
227 | 227 |
228 x4->params.rc.f_rate_tolerance = | 228 x4->params.rc.f_rate_tolerance = |
229 (float)avctx->bit_rate_tolerance/avctx->bit_rate; | 229 (float)avctx->bit_rate_tolerance/avctx->bit_rate; |
230 | 230 |
231 if((avctx->rc_buffer_size != 0) && | 231 if((avctx->rc_buffer_size != 0) && |
232 (avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)){ | 232 (avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)){ |
233 x4->params.rc.f_vbv_buffer_init = | 233 x4->params.rc.f_vbv_buffer_init = |
256 return -1; | 256 return -1; |
257 | 257 |
258 avctx->coded_frame = &x4->out_pic; | 258 avctx->coded_frame = &x4->out_pic; |
259 | 259 |
260 if(avctx->flags & CODEC_FLAG_GLOBAL_HEADER){ | 260 if(avctx->flags & CODEC_FLAG_GLOBAL_HEADER){ |
261 x264_nal_t *nal; | 261 x264_nal_t *nal; |
262 int nnal, i, s = 0; | 262 int nnal, i, s = 0; |
263 | 263 |
264 x264_encoder_headers(x4->enc, &nal, &nnal); | 264 x264_encoder_headers(x4->enc, &nal, &nnal); |
265 | 265 |
266 /* 5 bytes NAL header + worst case escaping */ | 266 /* 5 bytes NAL header + worst case escaping */ |
267 for(i = 0; i < nnal; i++) | 267 for(i = 0; i < nnal; i++) |
268 s += 5 + nal[i].i_payload * 4 / 3; | 268 s += 5 + nal[i].i_payload * 4 / 3; |
269 | 269 |
270 avctx->extradata = av_malloc(s); | 270 avctx->extradata = av_malloc(s); |
271 avctx->extradata_size = encode_nals(avctx->extradata, s, nal, nnal); | 271 avctx->extradata_size = encode_nals(avctx->extradata, s, nal, nnal); |
272 } | 272 } |
273 | 273 |