[FFmpeg-soc] [soc]: r1596 - in dirac/libavcodec: dirac.c dirac.h dirac_arith.c dirac_wavelet.c dirac_wavelet.h diracdec.c diracenc.c
lu_zero
subversion at mplayerhq.hu
Sun Dec 16 15:45:39 CET 2007
Author: lu_zero
Date: Sun Dec 16 15:45:39 2007
New Revision: 1596
Log:
Cosmetics part I
Modified:
dirac/libavcodec/dirac.c
dirac/libavcodec/dirac.h
dirac/libavcodec/dirac_arith.c
dirac/libavcodec/dirac_wavelet.c
dirac/libavcodec/dirac_wavelet.h
dirac/libavcodec/diracdec.c
dirac/libavcodec/diracenc.c
Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c (original)
+++ dirac/libavcodec/dirac.c Sun Dec 16 15:45:39 2007
@@ -109,7 +109,8 @@ const uint8_t dirac_preset_primaries[4]
const uint8_t dirac_preset_matrix[4] = {0, 1, 1, 2 };
const transfer_func_t dirac_preset_transfer_func[4] =
{
- TRANSFER_FUNC_TV, TRANSFER_FUNC_TV, TRANSFER_FUNC_TV, TRANSFER_FUNC_DCI_GAMMA
+ TRANSFER_FUNC_TV, TRANSFER_FUNC_TV,
+ TRANSFER_FUNC_TV, TRANSFER_FUNC_DCI_GAMMA
};
const float dirac_preset_kr[3] = { 0.2126, 0.299, 0 /* XXX */ };
const float dirac_preset_kb[3] = {0.0722, 0.114, 0 /* XXX */ };
@@ -340,7 +341,8 @@ const struct dirac_block_params dirac_bl
* @param frameno frame number in display order
* @return index of the reference frame in the reference frame buffer
*/
-int dirac_reference_frame_idx(DiracContext *s, int frameno) {
+int dirac_reference_frame_idx(DiracContext *s, int frameno)
+{
int i;
for (i = 0; i < s->refcnt; i++) {
@@ -361,10 +363,9 @@ int dirac_reference_frame_idx(DiracConte
* @param pixels buffer to write the interpolated pixels to
* @param comp component
*/
-static void interpolate_frame_halfpel(AVFrame *refframe,
- int width, int height,
- int8_t *pixels, int comp,
- int xpad, int ypad) {
+static void interpolate_frame_halfpel(AVFrame *refframe, int width, int height,
+ int8_t *pixels, int comp,
+ int xpad, int ypad) {
int8_t *lineout;
uint8_t *refdata;
uint8_t *lineinref;
@@ -520,8 +521,9 @@ STOP_TIMER("halfpel");
* @param offset xoffset/yoffset
* @param blocks number of blocks
*/
-static inline int spatial_wt(int i, int x, int bsep, int blen,
- int offset, int blocks) {
+static inline
+int spatial_wt(int i, int x, int bsep, int blen, int offset, int blocks)
+{
int pos = x - (i * bsep - offset);
int max;
@@ -888,10 +890,10 @@ STOP_TIMER("single_refframe");
* @param dcval DC value to apply to all coefficients in the MC block
* @param border 0 if this is not a border MC block, otherwise 1
*/
-static inline void motion_comp_dc_block(DiracContext *s,
- int16_t *coeffs, int i, int j,
- int xstart, int xstop, int ystart,
- int ystop, int dcval, int border) {
+static inline
+void motion_comp_dc_block(DiracContext *s, int16_t *coeffs, int i, int j,
+ int xstart, int xstop, int ystart, int ystop,
+ int dcval, int border) {
int x, y;
int xs, ys;
int16_t *line;
@@ -934,8 +936,8 @@ static inline void motion_comp_dc_block(
* @param comp component
* @return returns 0 on succes, otherwise -1
*/
-int dirac_motion_compensation(DiracContext *s, int16_t *coeffs,
- int comp) {
+int dirac_motion_compensation(DiracContext *s, int16_t *coeffs, int comp)
+{
int i, j;
int x, y;
int refidx[2] = { 0 };
@@ -1071,19 +1073,20 @@ int dirac_motion_compensation(DiracConte
else if ((block->use_ref & 3) == DIRAC_REF_MASK_REF1)
motion_comp_block1ref(s, s->mcpic, i, j,
xstart, xstop, ystart,
- ystop,s->refdata[0] + padding, 0, block, comp,
- border);
+ ystop,s->refdata[0] + padding,
+ 0, block, comp, border);
/* Reference frame 2 only. */
else if ((block->use_ref & 3) == DIRAC_REF_MASK_REF2)
motion_comp_block1ref(s, s->mcpic, i, j,
xstart, xstop, ystart, ystop,
- s->refdata[1] + padding, 1, block, comp,
- border);
+ s->refdata[1] + padding,
+ 1, block, comp, border);
/* Both reference frames. */
else
motion_comp_block2refs(s, s->mcpic, i, j,
xstart, xstop, ystart, ystop,
- s->refdata[0] + padding, s->refdata[1] + padding,
+ s->refdata[0] + padding,
+ s->refdata[1] + padding,
block, comp, border);
}
currblock += s->blwidth;
Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h (original)
+++ dirac/libavcodec/dirac.h Sun Dec 16 15:45:39 2007
@@ -47,7 +47,7 @@ typedef enum {
struct source_parameters
{
/* Interlacing. */
- char interlaced; ///< flag for interlacing
+ char interlaced; ///< flag for interlacing
char top_field_first;
char sequential_fields;
@@ -79,22 +79,22 @@ struct source_parameters
struct sequence_parameters
{
/* Information about the frames. */
- unsigned int luma_width; ///< the luma component width
- unsigned int luma_height; ///< the luma component height
+ unsigned int luma_width; ///< the luma component width
+ unsigned int luma_height; ///< the luma component height
/** Choma format: 0: 4:4:4, 1: 4:2:2, 2: 4:2:0 */
unsigned int chroma_format;
- unsigned char video_depth; ///< depth in bits
+ unsigned char video_depth; ///< depth in bits
/* Calculated: */
- unsigned int chroma_width; ///< the chroma component width
- unsigned int chroma_height; ///< the chroma component height
+ unsigned int chroma_width; ///< the chroma component width
+ unsigned int chroma_height; ///< the chroma component height
};
struct decoding_parameters
{
- uint8_t wavelet_depth; ///< depth of the IDWT
- uint8_t wavelet_idx_intra; ///< wavelet transform for intra frames
- uint8_t wavelet_idx_inter; ///< wavelet transform for inter frames
+ uint8_t wavelet_depth; ///< depth of the IDWT
+ uint8_t wavelet_idx_intra; ///< wavelet transform for intra frames
+ uint8_t wavelet_idx_inter; ///< wavelet transform for inter frames
uint8_t luma_xbsep;
uint8_t luma_xblen;
@@ -350,15 +350,18 @@ static int inline coeff_posx(DiracContex
* @param y position within the subband
* @return vertical position within the coefficient array
*/
-static int inline coeff_posy(DiracContext *s, int level,
- subband_t orientation, int y) {
+static inline
+int coeff_posy(DiracContext *s, int level, subband_t orientation, int y)
+{
if (orientation == subband_lh || orientation == subband_hh)
return subband_height(s, level) + y;
return y;
}
-static inline int zero_neighbourhood(DiracContext *s, int16_t *data, int v, int h) {
+static inline
+int zero_neighbourhood(DiracContext *s, int16_t *data, int v, int h)
+{
/* Check if there is a zero to the left and top left of this
coefficient. */
if (v > 0 && (data[-s->padded_width]
@@ -379,8 +382,9 @@ static inline int zero_neighbourhood(Dir
* @param h horizontal position of the coefficient
* @return prediction for the sign: -1 when negative, 1 when positive, 0 when 0
*/
-static inline int sign_predict(DiracContext *s, int16_t *data,
- subband_t orientation, int v, int h) {
+static inline
+int sign_predict(DiracContext *s, int16_t *data, subband_t orientation,
+ int v, int h) {
if (orientation == subband_hl && v > 0)
return DIRAC_SIGN(data[-s->padded_width]);
else if (orientation == subband_lh && h > 0)
@@ -389,8 +393,9 @@ static inline int sign_predict(DiracCont
return 0;
}
-static inline int intra_dc_coeff_prediction(DiracContext *s, int16_t *coeff,
- int x, int y) {
+static inline
+int intra_dc_coeff_prediction(DiracContext *s, int16_t *coeff, int x, int y)
+{
int pred;
if (x > 0 && y > 0) {
pred = (coeff[-1]
@@ -423,7 +428,8 @@ extern const struct dirac_block_params d
static const int avgsplit[7] = { 0, 0, 1, 1, 1, 2, 2 };
-static inline int split_prediction(DiracContext *s, int x, int y) {
+static inline int split_prediction(DiracContext *s, int x, int y)
+{
if (x == 0 && y == 0)
return 0;
else if (y == 0)
@@ -443,8 +449,9 @@ static inline int split_prediction(Dirac
* @param y vertical position of the MC block
* @param ref reference frame
*/
-static inline int mode_prediction(DiracContext *s,
- int x, int y, int refmask, int refshift) {
+static inline
+int mode_prediction(DiracContext *s, int x, int y, int refmask, int refshift)
+{
int cnt;
if (x == 0 && y == 0)
@@ -473,8 +480,9 @@ static inline int mode_prediction(DiracC
* @param ref reference frame
* @param dir direction horizontal=0, vertical=1
*/
-static inline int motion_vector_prediction(DiracContext *s, int x, int y,
- int ref, int dir) {
+static inline
+int motion_vector_prediction(DiracContext *s, int x, int y, int ref, int dir)
+{
int cnt = 0;
int left = 0, top = 0, lefttop = 0;
const int refmask = ref + 1;
@@ -530,8 +538,9 @@ static inline int motion_vector_predicti
return mid_pred(left, top, lefttop);
}
-static inline int block_dc_prediction(DiracContext *s,
- int x, int y, int comp) {
+static inline
+int block_dc_prediction(DiracContext *s, int x, int y, int comp)
+{
int total = 0;
int cnt = 0;
int sign;
@@ -569,8 +578,7 @@ static inline int block_dc_prediction(Di
int dirac_reference_frame_idx(DiracContext *s, int frameno);
-int dirac_motion_compensation(DiracContext *s, int16_t *coeffs,
- int comp);
+int dirac_motion_compensation(DiracContext *s, int16_t *coeffs, int comp);
int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
uint8_t *buf, int buf_size);
Modified: dirac/libavcodec/dirac_arith.c
==============================================================================
--- dirac/libavcodec/dirac_arith.c (original)
+++ dirac/libavcodec/dirac_arith.c Sun Dec 16 15:45:39 2007
@@ -195,8 +195,9 @@ void dirac_arith_put_bit(dirac_arith_sta
}
}
-static unsigned inline int follow_context(int index,
- struct dirac_arith_context_set *context_set) {
+static inline
+unsigned int follow_context(int index,
+ struct dirac_arith_context_set *context_set) {
int pos;
pos = FFMIN(index, 5);
return context_set->follow[pos];
Modified: dirac/libavcodec/dirac_wavelet.c
==============================================================================
--- dirac/libavcodec/dirac_wavelet.c (original)
+++ dirac/libavcodec/dirac_wavelet.c Sun Dec 16 15:45:39 2007
@@ -73,7 +73,7 @@ static void dirac_subband_dwt_deinterlea
int16_t *synth_line = synth;
int16_t *line_ll = data;
int16_t *line_lh = data + height * padded_width;
- int16_t *line_hl = data + width;
+ int16_t *line_hl = data + width;
int16_t *line_hh = data + height * padded_width + width;
/* Deinterleave the coefficients. */
@@ -101,7 +101,8 @@ static void dirac_subband_dwt_deinterlea
* @return 0 when successful, otherwise -1 is returned
*/
int dirac_subband_idwt_53(AVCodecContext *avctx, int width, int height,
- int padded_width, int16_t *data, int16_t *synth, int level) {
+ int padded_width, int16_t *data, int16_t *synth,
+ int level) {
int16_t *synthline;
int x, y;
int synth_width = width << 1;
@@ -328,7 +329,8 @@ STOP_TIMER("dwt53")
* @return 0 when successful, otherwise -1 is returned
*/
int dirac_subband_idwt_95(AVCodecContext *avctx, int width, int height,
- int padded_width, int16_t *data, int16_t *synth, int level) {
+ int padded_width, int16_t *data, int16_t *synth,
+ int level) {
int16_t *synthline;
int x, y;
int synth_width = width << 1;
Modified: dirac/libavcodec/dirac_wavelet.h
==============================================================================
--- dirac/libavcodec/dirac_wavelet.h (original)
+++ dirac/libavcodec/dirac_wavelet.h Sun Dec 16 15:45:39 2007
@@ -31,10 +31,12 @@
#include "avcodec.h"
int dirac_subband_idwt_53(AVCodecContext *avctx, int width, int height,
- int padded_width, int16_t *data, int16_t *synth, int level);
+ int padded_width, int16_t *data, int16_t *synth,
+ int level);
int dirac_subband_idwt_95(AVCodecContext *avctx, int width, int height,
- int padded_width, int16_t *data, int16_t *synth, int level);
+ int padded_width, int16_t *data, int16_t *synth,
+ int level);
int dirac_subband_dwt_53(AVCodecContext *avctx, int width, int height,
int padded_width, int16_t *data, int level);
Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c (original)
+++ dirac/libavcodec/diracdec.c Sun Dec 16 15:45:39 2007
@@ -266,8 +266,8 @@ static int parse_access_unit_header(Dira
* @param qfactor quantizer factor
* @return dequantized coefficient
*/
-static int inline coeff_dequant(int coeff,
- int qoffset, int qfactor) {
+static inline int coeff_dequant(int coeff, int qoffset, int qfactor)
+{
if (! coeff)
return 0;
@@ -568,7 +568,8 @@ static int dirac_unpack_prediction_param
* @param x horizontal position of the MC block
* @param y vertical position of the MC block
*/
-static void blockmode_prediction(DiracContext *s, int x, int y) {
+static void blockmode_prediction(DiracContext *s, int x, int y)
+{
int res = dirac_arith_get_bit(&s->arith, ARITH_CONTEXT_PMODE_REF1);
res ^= mode_prediction(s, x, y, DIRAC_REF_MASK_REF1, 0);
@@ -586,7 +587,8 @@ static void blockmode_prediction(DiracCo
* @param x horizontal position of the MC block
* @param y vertical position of the MC block
*/
-static void blockglob_prediction(DiracContext *s, int x, int y) {
+static void blockglob_prediction(DiracContext *s, int x, int y)
+{
/* Global motion compensation is not used at all. */
if (!s->globalmc_flag)
return;
@@ -606,8 +608,8 @@ static void blockglob_prediction(DiracCo
* @param x horizontal position of the MC block
* @param y vertical position of the MC block
*/
-static void propagate_block_data(DiracContext *s, int step,
- int x, int y) {
+static void propagate_block_data(DiracContext *s, int step, int x, int y)
+{
int i, j;
/* XXX: For now this is rather inefficient, because everything is
@@ -617,7 +619,8 @@ static void propagate_block_data(DiracCo
s->blmotion[j * s->blwidth + i] = s->blmotion[y * s->blwidth + x];
}
-static void unpack_block_dc(DiracContext *s, int x, int y, int comp) {
+static void unpack_block_dc(DiracContext *s, int x, int y, int comp)
+{
int res;
if (s->blmotion[y * s->blwidth + x].use_ref & 3) {
@@ -637,8 +640,7 @@ static void unpack_block_dc(DiracContext
* @param ref reference frame
* @param dir direction horizontal=0, vertical=1
*/
-static void dirac_unpack_motion_vector(DiracContext *s,
- int ref, int dir,
+static void dirac_unpack_motion_vector(DiracContext *s, int ref, int dir,
int x, int y) {
int res;
const int refmask = (ref + 1) | DIRAC_REF_MASK_GLOBAL;
@@ -659,8 +661,8 @@ static void dirac_unpack_motion_vector(D
* @param ref reference frame
* @param dir direction horizontal=0, vertical=1
*/
-static void dirac_unpack_motion_vectors(DiracContext *s,
- int ref, int dir) {
+static void dirac_unpack_motion_vectors(DiracContext *s, int ref, int dir)
+{
GetBitContext *gb = &s->gb;
unsigned int length;
int x, y;
@@ -689,7 +691,8 @@ static void dirac_unpack_motion_vectors(
/**
* Unpack the motion compensation parameters
*/
-static int dirac_unpack_prediction_data(DiracContext *s) {
+static int dirac_unpack_prediction_data(DiracContext *s)
+{
GetBitContext *gb = &s->gb;
int i;
unsigned int length;
@@ -793,7 +796,8 @@ static int dirac_unpack_prediction_data(
*
* @param coeffs coefficients for this component
*/
-static void decode_component(DiracContext *s, int16_t *coeffs) {
+static void decode_component(DiracContext *s, int16_t *coeffs)
+{
GetBitContext *gb = &s->gb;
int level;
subband_t orientation;
@@ -817,7 +821,8 @@ static void decode_component(DiracContex
* @param coeffs coefficients to transform
* @return returns 0 on succes, otherwise -1
*/
-int dirac_idwt(DiracContext *s, int16_t *coeffs, int16_t *synth) {
+int dirac_idwt(DiracContext *s, int16_t *coeffs, int16_t *synth)
+{
int level;
int width, height;
@@ -828,11 +833,13 @@ int dirac_idwt(DiracContext *s, int16_t
switch(s->wavelet_idx) {
case 0:
dprintf(s->avctx, "Deslauriers-Debuc (9,5) IDWT\n");
- dirac_subband_idwt_95(s->avctx, width, height, s->padded_width, coeffs, synth, level);
+ dirac_subband_idwt_95(s->avctx, width, height, s->padded_width,
+ coeffs, synth, level);
break;
case 1:
dprintf(s->avctx, "LeGall (5,3) IDWT\n");
- dirac_subband_idwt_53(s->avctx, width, height, s->padded_width, coeffs, synth, level);
+ dirac_subband_idwt_53(s->avctx, width, height, s->padded_width,
+ coeffs, synth, level);
break;
default:
av_log(s->avctx, AV_LOG_INFO, "unknown IDWT index: %d\n",
@@ -848,7 +855,8 @@ int dirac_idwt(DiracContext *s, int16_t
*
* @return 0 when successful, otherwise -1 is returned
*/
-static int dirac_decode_frame_internal(DiracContext *s) {
+static int dirac_decode_frame_internal(DiracContext *s)
+{
AVCodecContext *avctx = s->avctx;
int16_t *coeffs;
int16_t *line;
@@ -967,7 +975,8 @@ STOP_TIMER("dirac_frame_decode");
*
* @return 0 when successful, otherwise -1 is returned
*/
-static int parse_frame(DiracContext *s) {
+static int parse_frame(DiracContext *s)
+{
unsigned int retire;
int i;
GetBitContext *gb = &s->gb;
@@ -1093,7 +1102,7 @@ static int parse_frame(DiracContext *s)
int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
- uint8_t *buf, int buf_size){
+ uint8_t *buf, int buf_size) {
DiracContext *s = avctx->priv_data;
AVFrame *picture = data;
int i;
Modified: dirac/libavcodec/diracenc.c
==============================================================================
--- dirac/libavcodec/diracenc.c (original)
+++ dirac/libavcodec/diracenc.c Sun Dec 16 15:45:39 2007
@@ -37,7 +37,8 @@
#include "dirac_wavelet.h"
#include "mpeg12data.h"
-static int encode_init(AVCodecContext *avctx){
+static int encode_init(AVCodecContext *avctx)
+{
DiracContext *s = avctx->priv_data;
av_log_set_level(AV_LOG_DEBUG);
@@ -67,7 +68,8 @@ static int encode_end(AVCodecContext *av
* @param coeffs coefficients to transform
* @return returns 0 on succes, otherwise -1
*/
-int dirac_dwt(DiracContext *s, int16_t *coeffs) {
+int dirac_dwt(DiracContext *s, int16_t *coeffs)
+{
int level;
int width, height;
@@ -87,7 +89,8 @@ int dirac_dwt(DiracContext *s, int16_t *
return 0;
}
-static void dirac_encode_parse_info(DiracContext *s, int parsecode) {
+static void dirac_encode_parse_info(DiracContext *s, int parsecode)
+{
put_bits(&s->pb, 32, DIRAC_PARSE_INFO_PREFIX);
put_bits(&s->pb, 8, parsecode);
/* XXX: These will be filled in after encoding. */
@@ -95,7 +98,8 @@ static void dirac_encode_parse_info(Dira
put_bits(&s->pb, 32, 0);
}
-static void dirac_encode_sequence_parameters(DiracContext *s) {
+static void dirac_encode_sequence_parameters(DiracContext *s)
+{
AVCodecContext *avctx = s->avctx;
struct sequence_parameters *seq = &s->sequence;
const struct sequence_parameters *seqdef;
@@ -151,7 +155,8 @@ static void dirac_encode_sequence_parame
}
}
-static void dirac_encode_source_parameters(DiracContext *s) {
+static void dirac_encode_source_parameters(DiracContext *s)
+{
AVCodecContext *avctx = s->avctx;
struct source_parameters *source = &s->source;
const struct source_parameters *sourcedef;
@@ -269,7 +274,8 @@ static void dirac_encode_source_paramete
put_bits(&s->pb, 1, 0);
}
-static void dirac_encode_access_unit_header(DiracContext *s) {
+static void dirac_encode_access_unit_header(DiracContext *s)
+{
/* First write the Access Unit Parse Parameters. */
dirac_set_ue_golomb(&s->pb, 0); /* version major */
@@ -360,7 +366,8 @@ static void encode_codeblock(DiracContex
encode_coeff(s, coeffs, level, orientation, x, y);
}
-static void intra_dc_coding(DiracContext *s, int16_t *coeffs) {
+static void intra_dc_coding(DiracContext *s, int16_t *coeffs)
+{
int x, y;
int16_t *line = coeffs + (subband_height(s, 0) - 1) * s->padded_width;
@@ -376,8 +383,9 @@ static void intra_dc_coding(DiracContext
}
}
-static inline void dirac_arithblk_writelen(DiracContext *s,
- PutBitContext *pb) {
+static inline
+void dirac_arithblk_writelen(DiracContext *s, PutBitContext *pb)
+{
int length ;
dirac_arith_coder_flush(&s->arith);
flush_put_bits(pb);
@@ -385,8 +393,9 @@ static inline void dirac_arithblk_writel
dirac_set_ue_golomb(&s->pb, length);
}
-static inline void dirac_arithblk_writedata(DiracContext *s,
- PutBitContext *pb) {
+static inline
+void dirac_arithblk_writedata(DiracContext *s, PutBitContext *pb)
+{
int length;
char *buf;
@@ -427,7 +436,8 @@ static int encode_subband(DiracContext *
return 0;
}
-static int dirac_encode_component(DiracContext *s, int comp) {
+static int dirac_encode_component(DiracContext *s, int comp)
+{
int level;
subband_t subband;
int16_t *coeffs;
@@ -516,7 +526,8 @@ static int dirac_encode_component(DiracC
}
-static void blockmode_encode(DiracContext *s, int x, int y) {
+static void blockmode_encode(DiracContext *s, int x, int y)
+{
int res = s->blmotion[y * s->blwidth + x].use_ref & DIRAC_REF_MASK_REF1;
res ^= mode_prediction(s, x, y, DIRAC_REF_MASK_REF1, 0);
dirac_arith_put_bit(&s->arith, ARITH_CONTEXT_PMODE_REF2, res);
@@ -529,7 +540,8 @@ static void blockmode_encode(DiracContex
}
}
-static void blockglob_encode(DiracContext *s, int x, int y) {
+static void blockglob_encode(DiracContext *s, int x, int y)
+{
/* Global motion compensation is not used at all. */
if (!s->globalmc_flag)
return;
@@ -543,8 +555,7 @@ static void blockglob_encode(DiracContex
}
}
-static void dirac_pack_motion_vector(DiracContext *s,
- int ref, int dir,
+static void dirac_pack_motion_vector(DiracContext *s, int ref, int dir,
int x, int y) {
int res;
const int refmask = (ref + 1) | DIRAC_REF_MASK_GLOBAL;
@@ -559,8 +570,8 @@ static void dirac_pack_motion_vector(Dir
dirac_arith_write_int(&s->arith, &dirac_context_set_mv, res);
}
-static void dirac_pack_motion_vectors(DiracContext *s,
- int ref, int dir) {
+static void dirac_pack_motion_vectors(DiracContext *s, int ref, int dir)
+{
PutBitContext pb;
int x, y;
@@ -584,7 +595,8 @@ static void dirac_pack_motion_vectors(Di
dirac_arithblk_writedata(s, &pb);
}
-static void pack_block_dc(DiracContext *s, int x, int y, int comp) {
+static void pack_block_dc(DiracContext *s, int x, int y, int comp)
+{
int res;
if (s->blmotion[y * s->blwidth + x].use_ref & 3)
@@ -595,7 +607,8 @@ static void pack_block_dc(DiracContext *
dirac_arith_write_int(&s->arith, &dirac_context_set_dc, res);
}
-static int dirac_encode_blockdata(DiracContext *s) {
+static int dirac_encode_blockdata(DiracContext *s)
+{
int i;
int comp;
int x, y;
@@ -722,7 +735,8 @@ static int dirac_encode_blockdata(DiracC
return 0;
}
-static int dirac_pack_prediction_parameters(DiracContext *s) {
+static int dirac_pack_prediction_parameters(DiracContext *s)
+{
PutBitContext *pb = &s->pb;
/* Use default block parameters. */
@@ -761,7 +775,8 @@ static int dirac_pack_prediction_paramet
}
-static int dirac_encode_frame(DiracContext *s) {
+static int dirac_encode_frame(DiracContext *s)
+{
PutBitContext *pb = &s->pb;
int comp;
int i;
More information about the FFmpeg-soc
mailing list