History

libx264: use the library specific default rc_initial_buffer_occupancy

By default libav sets it to 3/4 while x264 sets it to 9/10. CC: libav-stable@libav.org

Luca Barbato committed 13 years ago

Commit 47812071 parent bff36071 file · +2 −1Browse files

Unified · Split

libavcodec/libx264.c+2−1
@@ -272,7 +272,7 @@ static av_cold int X264_init(AVCodecContext *avctx) · 271 unmodified lines
272 x4->params.rc.f_rf_constant_max = x4->crf_max;272 x4->params.rc.f_rf_constant_max = x4->crf_max;
273 }273 }
274 274
275 if (avctx->rc_buffer_size && avctx->rc_initial_buffer_occupancy &&275 if (avctx->rc_buffer_size && avctx->rc_initial_buffer_occupancy > 0 &&
276 (avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) {276 (avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) {
277 x4->params.rc.f_vbv_buffer_init =277 x4->params.rc.f_vbv_buffer_init =
278 (float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size;278 (float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size;
@@ -560,6 +560,7 @@ static const AVCodecDefault x264_defaults[] = { · 281 unmodified lines
560 { "threads", AV_STRINGIFY(X264_THREADS_AUTO) },560 { "threads", AV_STRINGIFY(X264_THREADS_AUTO) },
561 { "thread_type", "0" },561 { "thread_type", "0" },
562 { "flags", "+cgop" },562 { "flags", "+cgop" },
563 { "rc_init_occupancy","-1" },
563 { NULL },564 { NULL },
564};565};
565 566

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t