mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-04 14:40:26 +00:00
swscale: add fall-through annotations
This commit is contained in:
parent
e2a8b73688
commit
3e48505dda
2 changed files with 23 additions and 0 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/bswap.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "libavutil/avassert.h"
|
||||
|
|
@ -2302,31 +2303,37 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c,
|
|||
break;
|
||||
case AV_PIX_FMT_GBRAP10LE:
|
||||
*readAlpPlanar = planar_rgb10le_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP10LE:
|
||||
*readLumPlanar = planar_rgb10le_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAP12LE:
|
||||
*readAlpPlanar = planar_rgb12le_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP12LE:
|
||||
*readLumPlanar = planar_rgb12le_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAP14LE:
|
||||
*readAlpPlanar = planar_rgb14le_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP14LE:
|
||||
*readLumPlanar = planar_rgb14le_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAP16LE:
|
||||
*readAlpPlanar = planar_rgb16le_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP16LE:
|
||||
*readLumPlanar = planar_rgb16le_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAPF32LE:
|
||||
*readAlpPlanar = planar_rgbf32le_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRPF32LE:
|
||||
*readLumPlanar = planar_rgbf32le_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAPF16LE:
|
||||
*readAlpPlanar = planar_rgbf16le_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRPF16LE:
|
||||
*readLumPlanar = planar_rgbf16le_to_y;
|
||||
break;
|
||||
|
|
@ -2341,31 +2348,37 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c,
|
|||
break;
|
||||
case AV_PIX_FMT_GBRAP10BE:
|
||||
*readAlpPlanar = planar_rgb10be_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP10BE:
|
||||
*readLumPlanar = planar_rgb10be_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAP12BE:
|
||||
*readAlpPlanar = planar_rgb12be_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP12BE:
|
||||
*readLumPlanar = planar_rgb12be_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAP14BE:
|
||||
*readAlpPlanar = planar_rgb14be_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP14BE:
|
||||
*readLumPlanar = planar_rgb14be_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAP16BE:
|
||||
*readAlpPlanar = planar_rgb16be_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP16BE:
|
||||
*readLumPlanar = planar_rgb16be_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAPF32BE:
|
||||
*readAlpPlanar = planar_rgbf32be_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRPF32BE:
|
||||
*readLumPlanar = planar_rgbf32be_to_y;
|
||||
break;
|
||||
case AV_PIX_FMT_GBRAPF16BE:
|
||||
*readAlpPlanar = planar_rgbf16be_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRPF16BE:
|
||||
*readLumPlanar = planar_rgbf16be_to_y;
|
||||
break;
|
||||
|
|
@ -2377,6 +2390,7 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c,
|
|||
break;
|
||||
case AV_PIX_FMT_GBRAP:
|
||||
*readAlpPlanar = planar_rgb_to_a;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_GBRP:
|
||||
*readLumPlanar = planar_rgb_to_y;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "libavutil/attributes.h"
|
||||
#include "swscale.h"
|
||||
#include "swscale_internal.h"
|
||||
#include "rgb2rgb.h"
|
||||
|
|
@ -1287,6 +1288,7 @@ static int planarRgbaToRgbWrapper(SwsInternal *c, const uint8_t *const src[],
|
|||
|
||||
case AV_PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_RGBA:
|
||||
gbraptopacked32(src201, stride201,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
|
|
@ -1295,6 +1297,7 @@ static int planarRgbaToRgbWrapper(SwsInternal *c, const uint8_t *const src[],
|
|||
|
||||
case AV_PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_BGRA:
|
||||
gbraptopacked32(src102, stride102,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
|
|
@ -1343,6 +1346,7 @@ static int planarRgbToRgbWrapper(SwsInternal *c, const uint8_t *const src[],
|
|||
|
||||
case AV_PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_RGBA:
|
||||
gbr24ptopacked32(src201, stride201,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
|
|
@ -1351,6 +1355,7 @@ static int planarRgbToRgbWrapper(SwsInternal *c, const uint8_t *const src[],
|
|||
|
||||
case AV_PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_BGRA:
|
||||
gbr24ptopacked32(src102, stride102,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
|
|
@ -1445,12 +1450,14 @@ static int rgbToPlanarRgbWrapper(SwsInternal *c, const uint8_t *const src[],
|
|||
break;
|
||||
case AV_PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_RGBA:
|
||||
packedtogbr24p((const uint8_t *) src[0], srcStride[0], dst201,
|
||||
stride201, srcSliceH, alpha_first, 4, c->opts.src_w);
|
||||
break;
|
||||
case AV_PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_BGRA:
|
||||
packedtogbr24p((const uint8_t *) src[0], srcStride[0], dst102,
|
||||
stride102, srcSliceH, alpha_first, 4, c->opts.src_w);
|
||||
|
|
@ -1555,12 +1562,14 @@ static int rgbToPlanarRgbaWrapper(SwsInternal *c, const uint8_t *const src[],
|
|||
break;
|
||||
case AV_PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_RGBA:
|
||||
packed32togbrap((const uint8_t *) src[0], srcStride[0], dst201,
|
||||
stride201, srcSliceH, alpha_first, c->opts.src_w);
|
||||
break;
|
||||
case AV_PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
av_fallthrough;
|
||||
case AV_PIX_FMT_BGRA:
|
||||
packed32togbrap((const uint8_t *) src[0], srcStride[0], dst102,
|
||||
stride102, srcSliceH, alpha_first, c->opts.src_w);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue