[FFmpeg-soc] [soc]: r3620 - mlp/mlpenc.c
ramiro
subversion at mplayerhq.hu
Mon Aug 25 22:43:29 CEST 2008
Author: ramiro
Date: Mon Aug 25 22:43:29 2008
New Revision: 3620
Log:
Test for smaller restart frame intervals based on compression_level.
Modified:
mlp/mlpenc.c
Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c (original)
+++ mlp/mlpenc.c Mon Aug 25 22:43:29 2008
@@ -150,6 +150,7 @@ typedef struct {
DecodingParams *prev_decoding_params;
unsigned int max_codebook_search;
+ unsigned int major_header_subinterval;
DSPContext dsp;
} MLPEncodeContext;
@@ -480,9 +481,13 @@ static av_cold int mlp_encode_init(AVCod
if (avctx->compression_level == -1) {
ctx->max_codebook_search = 3;
+ ctx->major_header_subinterval = MAJOR_HEADER_INTERVAL;
} else {
/* TODO Decide how much to test with the compression_level the user wants. */
ctx->max_codebook_search = 3 * avctx->compression_level;
+ ctx->major_header_subinterval = MAJOR_HEADER_INTERVAL >> avctx->compression_level;
+ if (!ctx->major_header_subinterval)
+ ctx->major_header_subinterval = 1;
}
/* TODO Let user pass parameters for LPC filter. */
@@ -1882,10 +1887,14 @@ input_and_return:
ctx->last_frame = ctx->inout_buffer;
}
- {
- unsigned int seq_index;
+ restart_frame = (ctx->frame_index + 1) % ctx->major_header_subinterval;
- for (seq_index = 0; seq_index <= ctx->frame_index; seq_index++) {
+ if (!restart_frame) {
+ int seq_index;
+
+ for (seq_index = ctx->frame_index;
+ seq_index > 0;
+ seq_index -= ctx->major_header_subinterval) {
unsigned int number_of_samples = 0;
unsigned int index, subblock;
More information about the FFmpeg-soc
mailing list