On Sat, Dec 24, 2011 at 03:33:19PM +0200, Yordan Makariev wrote:
> --- a/libavcodec/4xm.c
> +++ b/libavcodec/4xm.c
> @@ -38,74 +38,74 @@
>
> -static const uint8_t size2index[4][4]={
> - {-1, 3, 1, 1},
> - { 3, 0, 0, 0},
> - { 2, 0, 0, 0},
> - { 2, 0, 0, 0},
> +static const uint8_t size2index[4][4] = {
> + { -1, 3, 1, 1 },
> + { 3, 0, 0, 0 },
> + { 2, 0, 0, 0 },
> + { 2, 0, 0, 0 },
> };
This is not four spaces indentation - more in other places.
> @@ -150,31 +150,32 @@ typedef struct FourXContext{
>
> -#define MULTIPLY(var,const) (((var)*(const)) >> 16)
> +#define MULTIPLY(var,const) (((var) * (const)) >> 16)
space after comma
> @@ -218,45 +219,47 @@ static void idct(DCTELEM block[64]){
>
> - for(i=0; i<256; i++){
> - if(f->version>1)
> - f->mv[i] = mv[i][0] + mv[i][1]
> *f->current_picture.linesize[0]/2;
> + for (i = 0; i < 256; i++){
space before {
> + if (f->version > 1)
> + f->mv[i] = mv[i][0] + mv[i][1]
> *f->current_picture.linesize[0] / 2;
space around *
> @@ -277,40 +280,45 @@ static void init_mv(FourXContext *f){
>
> -static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int
> stride, int scale, unsigned dc){
> +static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int
> stride, int scale, unsigned dc)
> +{
Break this lone line while you're at it, more below.
> - switch(log2w){
> + switch(log2w) {
> case 0:
> - for(i=0; i<h; i++){
> - dst[0] = scale*src[0] + dc;
> - if(scale) src += stride;
> + for (i = 0; i < h; i++) {
> + dst[0] = scale * src[0] + dc;
> + if(scale)
if (
> @@ -318,112 +326,107 @@ static inline void mcdc(uint16_t *dst, uint16_t *src,
> int log2w, int h, int stri
> log2h--;
> - decode_p_block(f, dst , src ,
> log2w, log2h, stride);
> - decode_p_block(f, dst + (stride<<log2h), src + (stride<<log2h),
> log2w, log2h, stride);
> - }else if(code == 2){
> + decode_p_block(f, dst , src ,
> log2w, log2h, stride);
> + decode_p_block(f, dst + (stride << log2h), src + (stride << log2h),
> log2w, log2h, stride);
> + } else if (code == 2) {
Drop the spaces before comma, more elsewhere.
> + if (f->version>1) {
space around >
> - if(bitstream_size+ bytestream_size+ wordstream_size + extra != length
> - || bitstream_size > (1<<26)
> - || bytestream_size > (1<<26)
> - || wordstream_size > (1<<26)
> + if (bitstream_size+ bytestream_size + wordstream_size + extra != length
space around +
> + || bitstream_size > (1 << 26)
> + || bytestream_size > (1 << 26)
> + || wordstream_size > (1 << 26)
> ){
space between ) and { and move it to the previous line
> av_log(f->avctx, AV_LOG_ERROR, "lengths %d %d %d %d\n",
> bitstream_size, bytestream_size, wordstream_size,
> - bitstream_size+ bytestream_size+ wordstream_size - length);
> + bitstream_size + bytestream_size+ wordstream_size - length);
space around +
Enough for now, please doublecheck yourself again and look out for
similar issues in the rest of your patch.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel