123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #include "swscale_loongarch.h"
- void ff_hscale_16_to_15_lsx(SwsInternal *c, int16_t *_dst, int dstW,
- const uint8_t *_src, const int16_t *filter,
- const int32_t *filterPos, int filterSize)
- {
- const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format);
- int sh = desc->comp[0].depth - 1;
- if (sh < 15) {
- sh = isAnyRGB(c->opts.src_format) || c->opts.src_format==AV_PIX_FMT_PAL8 ? 13 :
- (desc->comp[0].depth - 1);
- } else if (desc->flags && AV_PIX_FMT_FLAG_FLOAT) {
- sh = 15;
- }
- ff_hscale_16_to_15_sub_lsx(c, _dst, dstW, _src, filter, filterPos, filterSize, sh);
- }
- void ff_hscale_16_to_19_lsx(SwsInternal *c, int16_t *_dst, int dstW,
- const uint8_t *_src, const int16_t *filter,
- const int32_t *filterPos, int filterSize)
- {
- const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format);
- int bits = desc->comp[0].depth - 1;
- int sh = bits - 4;
- if ((isAnyRGB(c->opts.src_format) || c->opts.src_format==AV_PIX_FMT_PAL8) && desc->comp[0].depth<16) {
- sh = 9;
- } else if (desc->flags & AV_PIX_FMT_FLAG_FLOAT) {
- sh = 16 - 1 - 4;
- }
- ff_hscale_16_to_19_sub_lsx(c, _dst, dstW, _src, filter, filterPos, filterSize, sh);
- }
|