Mercurial > mplayer.hg
comparison libswscale/swscale.c @ 30425:00bb44a07dbf
Reindent.
author | stefano |
---|---|
date | Sat, 30 Jan 2010 21:58:09 +0000 |
parents | ef221b7526c5 |
children | 9bb2ebbb52be |
comparison
equal
deleted
inserted
replaced
30424:ef221b7526c5 | 30425:00bb44a07dbf |
---|---|
1386 | 1386 |
1387 return srcSliceH; | 1387 return srcSliceH; |
1388 } | 1388 } |
1389 | 1389 |
1390 static int palToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, | 1390 static int palToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, |
1391 int srcSliceH, uint8_t* dst[], int dstStride[]) | 1391 int srcSliceH, uint8_t* dst[], int dstStride[]) |
1392 { | 1392 { |
1393 const enum PixelFormat srcFormat= c->srcFormat; | 1393 const enum PixelFormat srcFormat= c->srcFormat; |
1394 const enum PixelFormat dstFormat= c->dstFormat; | 1394 const enum PixelFormat dstFormat= c->dstFormat; |
1395 void (*conv)(const uint8_t *src, uint8_t *dst, long num_pixels, | 1395 void (*conv)(const uint8_t *src, uint8_t *dst, long num_pixels, |
1396 const uint8_t *palette)=NULL; | 1396 const uint8_t *palette)=NULL; |
1423 return srcSliceH; | 1423 return srcSliceH; |
1424 } | 1424 } |
1425 | 1425 |
1426 /* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */ | 1426 /* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */ |
1427 static int rgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, | 1427 static int rgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, |
1428 int srcSliceH, uint8_t* dst[], int dstStride[]) | 1428 int srcSliceH, uint8_t* dst[], int dstStride[]) |
1429 { | 1429 { |
1430 const enum PixelFormat srcFormat= c->srcFormat; | 1430 const enum PixelFormat srcFormat= c->srcFormat; |
1431 const enum PixelFormat dstFormat= c->dstFormat; | 1431 const enum PixelFormat dstFormat= c->dstFormat; |
1432 const int srcBpp= (c->srcFormatBpp + 7) >> 3; | 1432 const int srcBpp= (c->srcFormatBpp + 7) >> 3; |
1433 const int dstBpp= (c->dstFormatBpp + 7) >> 3; | 1433 const int dstBpp= (c->dstFormatBpp + 7) >> 3; |
1548 return srcSliceH; | 1548 return srcSliceH; |
1549 } | 1549 } |
1550 | 1550 |
1551 /* unscaled copy like stuff (assumes nearly identical formats) */ | 1551 /* unscaled copy like stuff (assumes nearly identical formats) */ |
1552 static int packedCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, | 1552 static int packedCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, |
1553 int srcSliceH, uint8_t* dst[], int dstStride[]) | 1553 int srcSliceH, uint8_t* dst[], int dstStride[]) |
1554 { | 1554 { |
1555 if (dstStride[0]==srcStride[0] && srcStride[0] > 0) | 1555 if (dstStride[0]==srcStride[0] && srcStride[0] > 0) |
1556 memcpy(dst[0] + dstStride[0]*srcSliceY, src[0], srcSliceH*dstStride[0]); | 1556 memcpy(dst[0] + dstStride[0]*srcSliceY, src[0], srcSliceH*dstStride[0]); |
1557 else { | 1557 else { |
1558 int i; | 1558 int i; |
1573 } | 1573 } |
1574 return srcSliceH; | 1574 return srcSliceH; |
1575 } | 1575 } |
1576 | 1576 |
1577 static int planarCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, | 1577 static int planarCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, |
1578 int srcSliceH, uint8_t* dst[], int dstStride[]) | 1578 int srcSliceH, uint8_t* dst[], int dstStride[]) |
1579 { | 1579 { |
1580 int plane, i, j; | 1580 int plane, i, j; |
1581 for (plane=0; plane<4; plane++) { | 1581 for (plane=0; plane<4; plane++) { |
1582 int length= (plane==0 || plane==3) ? c->srcW : -((-c->srcW )>>c->chrDstHSubSample); | 1582 int length= (plane==0 || plane==3) ? c->srcW : -((-c->srcW )>>c->chrDstHSubSample); |
1583 int y= (plane==0 || plane==3) ? srcSliceY: -((-srcSliceY)>>c->chrDstVSubSample); | 1583 int y= (plane==0 || plane==3) ? srcSliceY: -((-srcSliceY)>>c->chrDstVSubSample); |