1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

vc1: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
Kostya Shishkov 2011-10-11 12:00:18 +02:00 committed by Diego Biurrun
parent 492bd1a28f
commit b18c68ad25

View File

@ -30,7 +30,7 @@
/** Markers used in VC-1 AP frame data */
//@{
enum VC1Code{
enum VC1Code {
VC1_CODE_RES0 = 0x00000100,
VC1_CODE_ENDOFSEQ = 0x0000010A,
VC1_CODE_SLICE,
@ -133,10 +133,10 @@ enum TransformTypes {
TT_8X8,
TT_8X4_BOTTOM,
TT_8X4_TOP,
TT_8X4, //Both halves
TT_8X4, // both halves
TT_4X8_RIGHT,
TT_4X8_LEFT,
TT_4X8, //Both halves
TT_4X8, // both halves
TT_4X4
};
//@}
@ -230,10 +230,10 @@ typedef struct VC1Context{
int k_y; ///< Number of bits for MVs (depends on MV range)
int range_x, range_y; ///< MV range
uint8_t pq, altpq; ///< Current/alternate frame quantizer scale
uint8_t zz_8x8[4][64];///< Zigzag table for TT_8x8, permuted for IDCT
uint8_t zz_8x8[4][64]; ///< Zigzag table for TT_8x8, permuted for IDCT
int left_blk_sh, top_blk_sh; ///< Either 3 or 0, positions of l/t in blk[]
const uint8_t* zz_8x4;///< Zigzag scan table for TT_8x4 coding mode
const uint8_t* zz_4x8;///< Zigzag scan table for TT_4x8 coding mode
const uint8_t* zz_8x4; ///< Zigzag scan table for TT_8x4 coding mode
const uint8_t* zz_4x8; ///< Zigzag scan table for TT_4x8 coding mode
/** pquant parameters */
//@{
uint8_t dquantfrm;
@ -284,7 +284,7 @@ typedef struct VC1Context{
int dmb_is_raw; ///< direct mb plane is raw
int fmb_is_raw; ///< forward mb plane is raw
int skip_is_raw; ///< skip mb plane is not coded
uint8_t luty[256], lutuv[256];///< lookup tables used for intensity compensation
uint8_t luty[256], lutuv[256]; ///< lookup tables used for intensity compensation
int use_ic; ///< use intensity compensation in B-frames
int rnd; ///< rounding control
@ -378,7 +378,7 @@ typedef struct VC1Context{
uint32_t *cbp_base, *cbp;
uint8_t *is_intra_base, *is_intra;
int16_t (*luma_mv_base)[2], (*luma_mv)[2];
uint8_t bfraction_lut_index;///< Index for BFRACTION value (see Table 40, reproduced into ff_vc1_bfraction_lut[])
uint8_t bfraction_lut_index; ///< Index for BFRACTION value (see Table 40, reproduced into ff_vc1_bfraction_lut[])
uint8_t broken_link; ///< Broken link flag (BROKEN_LINK syntax element)
uint8_t closed_entry; ///< Closed entry point flag (CLOSED_ENTRY syntax element)
@ -394,11 +394,12 @@ static av_always_inline const uint8_t* find_next_marker(const uint8_t *src, cons
{
uint32_t mrk = 0xFFFFFFFF;
if(end-src < 4) return end;
while(src < end){
if (end-src < 4)
return end;
while (src < end) {
mrk = (mrk << 8) | *src++;
if(IS_MARKER(mrk))
return src-4;
if (IS_MARKER(mrk))
return src - 4;
}
return end;
}
@ -407,12 +408,13 @@ static av_always_inline int vc1_unescape_buffer(const uint8_t *src, int size, ui
{
int dsize = 0, i;
if(size < 4){
for(dsize = 0; dsize < size; dsize++) *dst++ = *src++;
if (size < 4) {
for (dsize = 0; dsize < size; dsize++)
*dst++ = *src++;
return size;
}
for(i = 0; i < size; i++, src++) {
if(src[0] == 3 && i >= 2 && !src[-1] && !src[-2] && i < size-1 && src[1] < 4) {
for (i = 0; i < size; i++, src++) {
if (src[0] == 3 && i >= 2 && !src[-1] && !src[-2] && i < size-1 && src[1] < 4) {
dst[dsize++] = src[1];
src++;
i++;