1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00

dirac: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
Gabriel Dume 2014-09-08 18:32:34 -04:00 committed by Diego Biurrun
parent 1ec335513f
commit 9752d07d33
2 changed files with 81 additions and 81 deletions

View File

@ -26,8 +26,9 @@
*/
#include "libavutil/imgutils.h"
#include "dirac.h"
#include "avcodec.h"
#include "dirac.h"
#include "golomb.h"
#include "internal.h"
#include "mpeg12data.h"
@ -222,7 +223,8 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
luma_depth = av_log2(svq3_get_ue_golomb(gb)) + 1;
svq3_get_ue_golomb(gb); /* chroma offset */
svq3_get_ue_golomb(gb); /* chroma excursion */
avctx->color_range = luma_offset ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
avctx->color_range = luma_offset ? AVCOL_RANGE_MPEG
: AVCOL_RANGE_JPEG;
}
}
/* [DIRAC_STD] Table 10.5

View File

@ -31,6 +31,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "parser.h"
#define DIRAC_PARSE_INFO_PREFIX 0x42424344
@ -90,8 +91,7 @@ static int find_frame_end(DiracParseContext *pc,
return -1;
}
typedef struct DiracParseUnit
{
typedef struct DiracParseUnit {
int next_pu_offset;
int prev_pu_offset;
uint8_t pu_type;
@ -136,9 +136,9 @@ static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
if (next == -1) {
/* Found a possible frame start but not a frame end */
void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
pc->index + (*buf_size -
pc->sync_offset));
void *new_buffer =
av_fast_realloc(pc->buffer, &pc->buffer_size,
pc->index + (*buf_size - pc->sync_offset));
pc->buffer = new_buffer;
memcpy(pc->buffer + pc->index, (*buf + pc->sync_offset),
*buf_size - pc->sync_offset);
@ -227,15 +227,13 @@ static int dirac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
/* Assume that data has been packetized into an encapsulation unit. */
} else {
next = find_frame_end(pc, buf, buf_size);
if (!pc->is_synced && next == -1) {
if (!pc->is_synced && next == -1)
/* No frame start found yet. So throw away the entire buffer. */
return buf_size;
}
if (dirac_combine_frame(s, avctx, next, &buf, &buf_size) < 0) {
if (dirac_combine_frame(s, avctx, next, &buf, &buf_size) < 0)
return buf_size;
}
}
*poutbuf = buf;
*poutbuf_size = buf_size;