Commit c598b569 authored by Vittorio Giovara's avatar Vittorio Giovara

png: K&R formatting cosmetics

parent f7518f1a
......@@ -22,8 +22,8 @@
#include "bytestream.h"
#include "png.h"
const uint8_t ff_pngsig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
const uint8_t ff_mngsig[8] = {138, 77, 78, 71, 13, 10, 26, 10};
const uint8_t ff_pngsig[8] = { 137, 80, 78, 71, 13, 10, 26, 10 };
const uint8_t ff_mngsig[8] = { 138, 77, 78, 71, 13, 10, 26, 10 };
/* Mask to determine which y pixels are valid in a pass */
const uint8_t ff_png_pass_ymask[NB_PASSES] = {
......@@ -75,7 +75,7 @@ int ff_png_pass_row_size(int pass, int bits_per_pixel, int width)
xmin = ff_png_pass_xmin[pass];
if (width <= xmin)
return 0;
shift = ff_png_pass_xshift[pass];
shift = ff_png_pass_xshift[pass];
pass_width = (width - xmin + (1 << shift) - 1) >> shift;
return (pass_width * bits_per_pixel + 7) >> 3;
}
This diff is collapsed.
......@@ -25,13 +25,13 @@
#include "pngdsp.h"
// 0x7f7f7f7f or 0x7f7f7f7f7f7f7f7f or whatever, depending on the cpu's native arithmetic size
#define pb_7f (~0UL/255 * 0x7f)
#define pb_80 (~0UL/255 * 0x80)
#define pb_7f (~0UL / 255 * 0x7f)
#define pb_80 (~0UL / 255 * 0x80)
static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w)
{
long i;
for (i = 0; i <= w - (int)sizeof(long); i += sizeof(long)) {
for (i = 0; i <= w - (int) sizeof(long); i += sizeof(long)) {
long a = *(long *)(src1 + i);
long b = *(long *)(src2 + i);
*(long *)(dst + i) = ((a & pb_7f) + (b & pb_7f)) ^ ((a ^ b) & pb_80);
......@@ -45,5 +45,6 @@ av_cold void ff_pngdsp_init(PNGDSPContext *dsp)
dsp->add_bytes_l2 = add_bytes_l2_c;
dsp->add_paeth_prediction = ff_add_png_paeth_prediction;
if (ARCH_X86) ff_pngdsp_init_x86(dsp);
if (ARCH_X86)
ff_pngdsp_init_x86(dsp);
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment