[FFmpeg-soc] [soc]: r3144 - mlp/mlpenc.c
ramiro
subversion at mplayerhq.hu
Sun Aug 10 16:31:49 CEST 2008
Author: ramiro
Date: Sun Aug 10 16:31:49 2008
New Revision: 3144
Log:
Cosmetics: indent.
Modified:
mlp/mlpenc.c
Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c (original)
+++ mlp/mlpenc.c Sun Aug 10 16:31:49 2008
@@ -791,44 +791,41 @@ static void codebook_bits(MLPEncodeConte
int average, int16_t min, int16_t max,
BestOffset *bo, int direction)
{
+ int previous_count = INT_MAX;
int offset_min, offset_max;
+ int is_greater = 0;
+ int offset;
+ int next;
average = av_clip(average, HUFF_OFFSET_MIN, HUFF_OFFSET_MAX);
offset_min = FFMAX(min, HUFF_OFFSET_MIN);
offset_max = FFMIN(max, HUFF_OFFSET_MAX);
- {
- int previous_count = INT_MAX;
- int is_greater = 0;
- int offset;
- int next;
-
- for (offset = average; ;) {
- BestOffset temp_bo;
+ for (offset = average; ;) {
+ BestOffset temp_bo;
- codebook_bits_offset(ctx, substr, channel, codebook,
- min, max, offset,
- &temp_bo, &next, direction);
+ codebook_bits_offset(ctx, substr, channel, codebook,
+ min, max, offset,
+ &temp_bo, &next, direction);
- if (temp_bo.bitcount < previous_count) {
- if (temp_bo.bitcount < bo->bitcount)
- *bo = temp_bo;
+ if (temp_bo.bitcount < previous_count) {
+ if (temp_bo.bitcount < bo->bitcount)
+ *bo = temp_bo;
- is_greater = 0;
- } else if (++is_greater >= 5)
- break;
+ is_greater = 0;
+ } else if (++is_greater >= 5)
+ break;
- previous_count = temp_bo.bitcount;
+ previous_count = temp_bo.bitcount;
- if (direction) {
- offset += next;
- if (offset > offset_max)
- break;
- } else {
- offset -= next;
- if (offset < offset_min)
- break;
- }
+ if (direction) {
+ offset += next;
+ if (offset > offset_max)
+ break;
+ } else {
+ offset -= next;
+ if (offset < offset_min)
+ break;
}
}
}
More information about the FFmpeg-soc
mailing list