Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Chromium | third_party/libwebp/src/dec/webp_dec.c |
uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size,
uint8_t *output, size_t size, int stride) {
return DecodeIntoRGBABuffer(MODE_BGR, data, data_size, output, stride, size);
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dec/webp_dec.c |
static void DefaultFeatures(WebPBitstreamFeatures *const features) {
assert(features != NULL);
memset(features, 0, sizeof(*features));
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dec/webp_dec.c | VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size,
WebPDecoderConfig *config) {
WebPDecParams params;
VP8StatusCode status;
if (config == NULL) {
return VP8_STATUS_INVALID_PARAM;
}
status = GetFeatures(data, data_size, &config->input);
if (status != VP8_STATUS_OK)... | [
0,
0
] |
Chromium | third_party/libwebp/src/demux/anim_decode.c | static int IsFullFrame(int width, int height, int canvas_width,
int canvas_height) {
return (width == canvas_width && height == canvas_height);
} | [
0,
0
] |
Chromium | third_party/libwebp/src/demux/anim_decode.c | static void ZeroFillFrameRect(uint8_t *buf, int buf_stride, int x_offset,
int y_offset, int width, int height) {
int j;
assert(width * NUM_CHANNELS <= buf_stride);
buf += y_offset * buf_stride + x_offset * NUM_CHANNELS;
for (j = 0; j < height; ++j) {
memset(buf, 0, width * NUM_... | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/anim_decode.c | static int CopyCanvas(const uint8_t *src, uint8_t *dst, uint32_t width,
uint32_t height) {
const uint64_t size = (uint64_t)width * height * NUM_CHANNELS;
if (size != (size_t)size)
return 0;
assert(src != NULL && dst != NULL);
memcpy(dst, src, (size_t)size);
return 1;
} | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/anim_decode.c | static uint8_t BlendChannelNonPremult(uint32_t src, uint8_t src_a, uint32_t dst,
uint8_t dst_a, uint32_t scale,
int shift) {
const uint8_t src_channel = (src >> shift) & 0xff;
const uint8_t dst_channel = (dst >> shift) & 0xff;
const uint3... | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/anim_decode.c | static uint32_t BlendPixelPremult(uint32_t src, uint32_t dst) {
const uint8_t src_a = (src >> 24) & 0xff;
return src + ChannelwiseMultiply(dst, 256 - src_a);
} | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/anim_decode.c |
void WebPAnimDecoderReset(WebPAnimDecoder *dec) {
if (dec != NULL) {
dec->prev_frame_timestamp_ = 0;
WebPDemuxReleaseIterator(&dec->prev_iter_);
memset(&dec->prev_iter_, 0, sizeof(dec->prev_iter_));
dec->prev_frame_was_keyframe_ = 0;
dec->next_frame_ = 1;
}
} | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/anim_decode.c |
const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) {
if (dec == NULL)
return NULL;
return dec->demux_;
} | [
0,
0
] |
Chromium | third_party/libwebp/src/demux/anim_decode.c |
void WebPAnimDecoderDelete(WebPAnimDecoder *dec) {
if (dec != NULL) {
WebPDemuxReleaseIterator(&dec->prev_iter_);
WebPDemuxDelete(dec->demux_);
WebPSafeFree(dec->curr_frame_);
WebPSafeFree(dec->prev_frame_disposed_);
WebPSafeFree(dec);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/demux/demux.c | static WEBP_INLINE size_t MemDataSize(const MemBuffer *const mem) {
return (mem->end_ - mem->start_);
} | [
0,
0
] |
Chromium | third_party/libwebp/src/demux/demux.c | static int AddFrame(WebPDemuxer *const dmux, Frame *const frame) {
const Frame *const last_frame = *dmux->frames_tail_;
if (last_frame != NULL && !last_frame->complete_)
return 0;
*dmux->frames_tail_ = frame;
frame->next_ = NULL;
dmux->frames_tail_ = &frame->next_;
return 1;
} | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/demux.c | static int IsValidSimpleFormat(const WebPDemuxer *const dmux) {
const Frame *const frame = dmux->frames_;
if (dmux->state_ == WEBP_DEMUX_PARSING_HEADER)
return 1;
if (dmux->canvas_width_ <= 0 || dmux->canvas_height_ <= 0)
return 0;
if (dmux->state_ == WEBP_DEMUX_DONE && frame == NULL)
return 0;
... | [
0,
0
] |
Chromium | third_party/libwebp/src/demux/demux.c | static void InitDemux(WebPDemuxer *const dmux, const MemBuffer *const mem) {
dmux->state_ = WEBP_DEMUX_PARSING_HEADER;
dmux->loop_count_ = 1;
dmux->bgcolor_ = 0xFFFFFFFF;
dmux->canvas_width_ = -1;
dmux->canvas_height_ = -1;
dmux->frames_tail_ = &dmux->frames_;
dmux->chunks_tail_ = &dmux->chunks_;
dmux->... | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/demux.c |
void WebPDemuxDelete(WebPDemuxer *dmux) {
Chunk *c;
Frame *f;
if (dmux == NULL)
return;
for (f = dmux->frames_; f != NULL;) {
Frame *const cur_frame = f;
f = f->next_;
WebPSafeFree(cur_frame);
}
for (c = dmux->chunks_; c != NULL;) {
Chunk *const cur_chunk = c;
c = c->next_;
Web... | [
0,
0
] |
Chromium | third_party/libwebp/src/demux/demux.c | static const uint8_t *GetFramePayload(const uint8_t *const mem_buf,
const Frame *const frame,
size_t *const data_size) {
*data_size = 0;
if (frame != NULL) {
const ChunkData *const image = frame->img_components_;
const ChunkData *co... | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/demux.c |
int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame, WebPIterator *iter) {
if (iter == NULL)
return 0;
memset(iter, 0, sizeof(*iter));
iter->private_ = (void *)dmux;
return SetFrame(frame, iter);
} | [
1,
0
] |
Chromium | third_party/libwebp/src/demux/demux.c |
int WebPDemuxNextFrame(WebPIterator *iter) {
if (iter == NULL)
return 0;
return SetFrame(iter->frame_num + 1, iter);
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/alpha_processing.c |
static WEBP_INLINE uint8_t dither_hi(uint8_t x) {
return (x & 0xf0) | (x >> 4);
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/alpha_processing.c |
static WEBP_INLINE uint8_t dither_lo(uint8_t x) {
return (x & 0x0f) | (x << 4);
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/alpha_processing.c |
static void ApplyAlphaMultiply_16b_C(uint8_t *rgba4444, int w, int h,
int stride) {
#if (WEBP_SWAP_16BIT_CSP == 1)
ApplyAlphaMultiply4444_C(rgba4444, w, h, stride, 1);
#else
ApplyAlphaMultiply4444_C(rgba4444, w, h, stride, 0);
#endif
}
#if !WEBP_NEON_OMIT_C_CODE | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/alpha_processing.c | static int DispatchAlpha_C(const uint8_t *alpha, int alpha_stride, int width,
int height, uint8_t *dst, int dst_stride) {
uint32_t alpha_mask = 0xff;
int i, j;
for (j = 0; j < height; ++j) {
for (i = 0; i < width; ++i) {
const uint32_t alpha_value = alpha[i];
dst[4 * i]... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/alpha_processing.c | static void PackARGB_C(const uint8_t *a, const uint8_t *r, const uint8_t *g,
const uint8_t *b, int len, uint32_t *out) {
int i;
for (i = 0; i < len; ++i) {
out[i] = MakeARGB32(a[4 * i], r[4 * i], g[4 * i], b[4 * i]);
}
}
#endif | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/alpha_processing_sse2.c | static int HasAlpha8b_SSE2(const uint8_t *src, int length) {
const __m128i all_0xff = _mm_set1_epi8((char)0xff);
int i = 0;
for (; i + 16 <= length; i += 16) {
const __m128i v = _mm_loadu_si128((const __m128i *)(src + i));
const __m128i bits = _mm_cmpeq_epi8(v, all_0xff);
const int mask = _mm_movemask... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/alpha_processing_sse2.c |
static void AlphaReplace_SSE2(uint32_t *src, int length, uint32_t color) {
const __m128i m_color = _mm_set1_epi32(color);
const __m128i zero = _mm_setzero_si128();
int i = 0;
for (; i + 8 <= length; i += 8) {
const __m128i a0 = _mm_loadu_si128((const __m128i *)(src + i + 0));
const __m128i a1 = _mm_loa... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/cost.c | static int GetResidualCost_C(int ctx0, const VP8Residual *const res) {
int n = res->first;
const int p0 = res->prob[n][ctx0][0];
CostArrayPtr const costs = res->costs;
const uint16_t *t = costs[n][ctx0];
// bit_cost(1, p0) is already incorporated in t[] tables, but only if ctx != 0
// (as required by the s... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/cost_mips_dsp_r2.c | WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPSdspR2(void) {
VP8GetResidualCost = GetResidualCost_MIPSdspR2;
}
#else | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/cost_neon.c | WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitNEON(void) {
VP8SetResidualCoeffs = SetResidualCoeffs_NEON;
VP8GetResidualCost = GetResidualCost_NEON;
}
#else | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void TransformTwo_C(const int16_t *in, uint8_t *dst, int do_two) {
TransformOne_C(in, dst);
if (do_two) {
TransformOne_C(in + 16, dst + 4);
}
}
#endif | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c |
static void TransformUV_C(const int16_t *in, uint8_t *dst) {
VP8Transform(in + 0 * 16, dst, 1);
VP8Transform(in + 2 * 16, dst + 4 * BPS, 1);
}
#if !WEBP_NEON_OMIT_C_CODE | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void TransformWHT_C(const int16_t *in, int16_t *out) {
int tmp[16];
int i;
for (i = 0; i < 4; ++i) {
const int a0 = in[0 + i] + in[12 + i];
const int a1 = in[4 + i] + in[8 + i];
const int a2 = in[4 + i] - in[8 + i];
const int a3 = in[0 + i] - in[12 + i];
tmp[0 + i] = a0 + a1;
tmp[8 ... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void TM8uv_C(uint8_t *dst) { TrueMotion(dst, 8); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void TM16_C(uint8_t *dst) { TrueMotion(dst, 16); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c |
static WEBP_INLINE void Put16(int v, uint8_t *dst) {
int j;
for (j = 0; j < 16; ++j) {
memset(dst + j * BPS, v, 16);
}
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void HE4_C(uint8_t *dst) {
const int A = dst[-1 - BPS];
const int B = dst[-1];
const int C = dst[-1 + BPS];
const int D = dst[-1 + 2 * BPS];
const int E = dst[-1 + 3 * BPS];
WebPUint32ToMem(dst + 0 * BPS, 0x01010101U * AVG3(A, B, C));
WebPUint32ToMem(dst + 1 * BPS, 0x01010101U * AVG3(B, C, D));
W... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void RD4_C(uint8_t *dst) {
const int I = dst[-1 + 0 * BPS];
const int J = dst[-1 + 1 * BPS];
const int K = dst[-1 + 2 * BPS];
const int L = dst[-1 + 3 * BPS];
const int X = dst[-1 - BPS];
const int A = dst[0 - BPS];
const int B = dst[1 - BPS];
const int C = dst[2 - BPS];
const int D = dst[3 - B... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void LD4_C(uint8_t *dst) {
const int A = dst[0 - BPS];
const int B = dst[1 - BPS];
const int C = dst[2 - BPS];
const int D = dst[3 - BPS];
const int E = dst[4 - BPS];
const int F = dst[5 - BPS];
const int G = dst[6 - BPS];
const int H = dst[7 - BPS];
DST(0, 0) = AVG3(A, B, C);
DST(1, 0) = DST... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void VL4_C(uint8_t *dst) {
const int A = dst[0 - BPS];
const int B = dst[1 - BPS];
const int C = dst[2 - BPS];
const int D = dst[3 - BPS];
const int E = dst[4 - BPS];
const int F = dst[5 - BPS];
const int G = dst[6 - BPS];
const int H = dst[7 - BPS];
DST(0, 0) = AVG2(A, B);
DST(1, 0) = DST(0,... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void HU4_C(uint8_t *dst) {
const int I = dst[-1 + 0 * BPS];
const int J = dst[-1 + 1 * BPS];
const int K = dst[-1 + 2 * BPS];
const int L = dst[-1 + 3 * BPS];
DST(0, 0) = AVG2(I, J);
DST(2, 0) = DST(0, 1) = AVG2(J, K);
DST(2, 1) = DST(0, 2) = AVG2(K, L);
DST(1, 0) = AVG3(I, J, K);
DST(3, 0) = D... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void VE8uv_C(uint8_t *dst) {
int j;
for (j = 0; j < 8; ++j) {
memcpy(dst + j * BPS, dst - BPS, 8);
}
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void HE8uv_C(uint8_t *dst) {
int j;
for (j = 0; j < 8; ++j) {
memset(dst, dst[-1], 8);
dst += BPS;
}
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void DC8uv_C(uint8_t *dst) {
int dc0 = 8;
int i;
for (i = 0; i < 8; ++i) {
dc0 += dst[i - BPS] + dst[-1 + i * BPS];
}
Put8x8uv(dc0 >> 4, dst);
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static WEBP_INLINE void DoFilter2_C(uint8_t *p, int step) {
const int p1 = p[-2 * step], p0 = p[-step], q0 = p[0], q1 = p[step];
const int a = 3 * (q0 - p0) + VP8ksclip1[p1 - q1];
const int a1 = VP8ksclip2[(a + 4) >> 3]; // in [-16,15]
const int a2 = VP8ksclip2[(a + 3) >> 3];
p[-step] = VP8kclip1[p0 + a2];
... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static WEBP_INLINE void DoFilter6_C(uint8_t *p, int step) {
const int p2 = p[-3 * step], p1 = p[-2 * step], p0 = p[-step];
const int q0 = p[0], q1 = p[step], q2 = p[2 * step];
const int a = VP8ksclip1[3 * (q0 - p0) + VP8ksclip1[p1 - q1]];
const int a1 = (27 * a + 63) >> 7; // eq. to ((3 * a + 7) * 9) >> 7
co... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static WEBP_INLINE int Hev(const uint8_t *p, int step, int thresh) {
const int p1 = p[-2 * step], p0 = p[-step], q0 = p[0], q1 = p[step];
return (VP8kabs0[p1 - p0] > thresh) || (VP8kabs0[q1 - q0] > thresh);
}
#endif
#if !WEBP_NEON_OMIT_C_CODE | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static WEBP_INLINE int NeedsFilter2_C(const uint8_t *p, int step, int t,
int it) {
const int p3 = p[-4 * step], p2 = p[-3 * step], p1 = p[-2 * step];
const int p0 = p[-step], q0 = p[0];
const int q1 = p[step], q2 = p[2 * step], q3 = p[3 * step];
if ((4 * VP8kabs0[p0 - q0] +... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void SimpleVFilter16_C(uint8_t *p, int stride, int thresh) {
int i;
const int thresh2 = 2 * thresh + 1;
for (i = 0; i < 16; ++i) {
if (NeedsFilter_C(p + i, stride, thresh2)) {
DoFilter2_C(p + i, stride);
}
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static WEBP_INLINE void FilterLoop24_C(uint8_t *p, int hstride, int vstride,
int size, int thresh, int ithresh,
int hev_thresh) {
const int thresh2 = 2 * thresh + 1;
while (size-- > 0) {
if (NeedsFilter2_C(p, hstride, thresh2, ithresh... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec.c | static void HFilter16i_C(uint8_t *p, int stride, int thresh, int ithresh,
int hev_thresh) {
int k;
for (k = 3; k > 0; --k) {
p += 4;
FilterLoop24_C(p, 1, stride, 16, thresh, ithresh, hev_thresh);
}
}
#endif
#if !WEBP_NEON_OMIT_C_CODE | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips32.c |
static WEBP_INLINE int abs_mips32(int x) {
const int sign = x >> 31;
return (x ^ sign) - sign;
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips32.c |
static WEBP_INLINE int hev(const uint8_t *p, int step, int thresh) {
const int p1 = p[-2 * step], p0 = p[-step], q0 = p[0], q1 = p[step];
return (abs_mips32(p1 - p0) > thresh) || (abs_mips32(q1 - q0) > thresh);
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips32.c | static void VFilter8(uint8_t *u, uint8_t *v, int stride, int thresh,
int ithresh, int hev_thresh) {
FilterLoop26(u, stride, 1, 8, thresh, ithresh, hev_thresh);
FilterLoop26(v, stride, 1, 8, thresh, ithresh, hev_thresh);
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips32.c |
static void SimpleVFilter16i(uint8_t *p, int stride, int thresh) {
int k;
for (k = 3; k > 0; --k) {
p += 4 * stride;
SimpleVFilter16(p, stride, thresh);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips32.c |
static void TransformTwo(const int16_t *in, uint8_t *dst, int do_two) {
TransformOne(in, dst);
if (do_two) {
TransformOne(in + 16, dst + 4);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips_dsp_r2.c |
static void TransformDC(const int16_t *in, uint8_t *dst) {
int temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10;
__asm__ volatile(
LOAD_WITH_OFFSET_X4(
temp1, temp2, temp3, temp4, dst, 0, 0, 0, 0, 0, 1, 2, 3,
BPS) "lh %[temp5], 0(%[in]) \... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips_dsp_r2.c |
static void TransformTwo(const int16_t *in, uint8_t *dst, int do_two) {
TransformOne(in, dst);
if (do_two) {
TransformOne(in + 16, dst + 4);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips_dsp_r2.c |
static void HFilter8(uint8_t *u, uint8_t *v, int stride, int thresh,
int ithresh, int hev_thresh) {
FilterLoop26(u, 1, stride, 8, thresh, ithresh, hev_thresh);
FilterLoop26(v, 1, stride, 8, thresh, ithresh, hev_thresh);
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_mips_dsp_r2.c | static void VFilter16i(uint8_t *p, int stride, int thresh, int ithresh,
int hev_thresh) {
int k;
for (k = 3; k > 0; --k) {
p += 4 * stride;
FilterLoop24(p, stride, 1, 16, thresh, ithresh, hev_thresh);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_msa.c |
static void TransformTwo(const int16_t *in, uint8_t *dst, int do_two) {
TransformOne(in, dst);
if (do_two) {
TransformOne(in + 16, dst + 4);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_msa.c |
static void SimpleHFilter16(uint8_t *src, int stride, int b_limit_in) {
v16u8 p1, p0, q1, q0, mask, row0, row1, row2, row3, row4, row5, row6, row7;
v16u8 row8, row9, row10, row11, row12, row13, row14, row15;
v8i16 tmp0, tmp1;
const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in);
uint8_t *ptemp_src = src - 2... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_msa.c | static void VE4(uint8_t *dst) {
const uint8_t *const ptop = dst - BPS - 1;
const uint32_t val0 = LW(ptop + 0);
const uint32_t val1 = LW(ptop + 4);
uint32_t out;
v16u8 A = {0}, B, C, AC, B2, R;
INSERT_W2_UB(val0, val1, A);
B = SLDI_UB(A, A, 1);
C = SLDI_UB(A, A, 2);
AC = __msa_ave_u_b(A, C);
B2 = __... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_msa.c | static void DC16(uint8_t *dst) {
uint32_t dc = 16;
int i;
const v16u8 rtop = LD_UB(dst - BPS);
const v8u16 dctop = __msa_hadd_u_h(rtop, rtop);
v16u8 out;
for (i = 0; i < 16; ++i) {
dc += dst[-1 + i * BPS];
}
dc += HADD_UH_U32(dctop);
out = (v16u8)__msa_fill_b(dc >> 5);
ST_UB8(out, out, out, out... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_msa.c | static void HE16(uint8_t *dst) {
int j;
for (j = 16; j > 0; j -= 4) {
const v16u8 L0 = (v16u8)__msa_fill_b(dst[-1 + 0 * BPS]);
const v16u8 L1 = (v16u8)__msa_fill_b(dst[-1 + 1 * BPS]);
const v16u8 L2 = (v16u8)__msa_fill_b(dst[-1 + 2 * BPS]);
const v16u8 L3 = (v16u8)__msa_fill_b(dst[-1 + 3 * BPS]);
... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_msa.c | static void DC16NoTopLeft(uint8_t *dst) {
const v16u8 out = (v16u8)__msa_fill_b(0x80);
ST_UB8(out, out, out, out, out, out, out, out, dst, BPS);
ST_UB8(out, out, out, out, out, out, out, out, dst + 8 * BPS, BPS);
}
#define STORE8x8(out, dst) \
do { ... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static WEBP_INLINE void Store8x4x2_NEON(const uint8x16_t p1,
const uint8x16_t p0,
const uint8x16_t q0,
const uint8x16_t q1, uint8_t *const u,
uint8_t *const v, ... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c |
static void SimpleVFilter16_NEON(uint8_t *p, int stride, int thresh) {
uint8x16_t p1, p0, q0, q1, op0, oq0;
Load16x4_NEON(p, stride, &p1, &p0, &q0, &q1);
{
const uint8x16_t mask = NeedsFilter_NEON(p1, p0, q0, q1, thresh);
DoFilter2_NEON(p1, p0, q0, q1, mask, &op0, &oq0);
}
Store16x2_NEON(op0, oq0, p,... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void SimpleHFilter16_NEON(uint8_t *p, int stride, int thresh) {
__asm__ volatile(
"sub r4, %[p], #2 \n"
"lsl r6, %[stride], #1 \n" // r6 = 2 * stride
"add r5, r4, %[stride] \n" // base2 = base1 + stride
LOAD8x4(d2, d3, d4... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c |
static void SimpleHFilter16i_NEON(uint8_t *p, int stride, int thresh) {
uint32_t k;
for (k = 3; k != 0; --k) {
p += 4;
SimpleHFilter16_NEON(p, stride, thresh);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c |
static void HFilter16_NEON(uint8_t *p, int stride, int thresh, int ithresh,
int hev_thresh) {
uint8x16_t p3, p2, p1, p0, q0, q1, q2, q3;
Load8x16_NEON(p, stride, &p3, &p2, &p1, &p0, &q0, &q1, &q2, &q3);
{
const uint8x16_t mask =
NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2,... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void VFilter16i_NEON(uint8_t *p, int stride, int thresh, int ithresh,
int hev_thresh) {
uint32_t k;
uint8x16_t p3, p2, p1, p0;
Load16x4_NEON(p + 2 * stride, stride, &p3, &p2, &p1, &p0);
for (k = 3; k != 0; --k) {
uint8x16_t q0, q1, q2, q3;
p += 4 * stride;
Load16x4... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void DC4_NEON(uint8_t *dst) {
const uint8x8_t A = vld1_u8(dst - BPS);
const uint16x4_t p0 = vpaddl_u8(A); // cascading summation of the top
const uint16x4_t p1 = vpadd_u16(p0, p0);
const uint8x8_t L0 = vld1_u8(dst + 0 * BPS - 1);
const uint8x8_t L1 = vld1_u8(dst + 1 * BPS - 1);
const uint8x8_t L2 = v... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void LD4_NEON(uint8_t *dst) {
const uint8x8_t ABCDEFGH = vld1_u8(dst - BPS + 0);
const uint8x8_t BCDEFGH0 = vld1_u8(dst - BPS + 1);
const uint8x8_t CDEFGH00 = vld1_u8(dst - BPS + 2);
const uint8x8_t CDEFGHH0 = vset_lane_u8(dst[-BPS + 7], CDEFGH00, 6);
const uint8x8_t avg1 = vhadd_u8(ABCDEFGH, CDEFGHH0... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void VE8uv_NEON(uint8_t *dst) {
const uint8x8_t top = vld1_u8(dst - BPS);
int j;
for (j = 0; j < 8; ++j) {
vst1_u8(dst + j * BPS, top);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c |
static void DC8uv_NEON(uint8_t *dst) { DC8_NEON(dst, 1, 1); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void DC8uvNoLeft_NEON(uint8_t *dst) { DC8_NEON(dst, 1, 0); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c |
static void TM8uv_NEON(uint8_t *dst) { TrueMotion_NEON(dst, 8); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c |
static void DC16TopLeft_NEON(uint8_t *dst) { DC16_NEON(dst, 1, 1); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void DC16NoTop_NEON(uint8_t *dst) { DC16_NEON(dst, 0, 1); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void DC16NoLeft_NEON(uint8_t *dst) { DC16_NEON(dst, 1, 0); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_neon.c | static void DC16NoTopLeft_NEON(uint8_t *dst) { DC16_NEON(dst, 0, 0); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_sse2.c | static void HFilter8i_SSE2(uint8_t *u, uint8_t *v, int stride, int thresh,
int ithresh, int hev_thresh) {
__m128i mask;
__m128i t1, t2, p1, p0, q0, q1;
Load16x4_SSE2(u, v, stride, &t2, &t1, &p1, &p0);
MAX_DIFF1(t2, t1, p1, p0, mask);
u += 4; // beginning of q0
v += 4;
Load16x4_... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_sse2.c | static void TM8uv_SSE2(uint8_t *dst) { TrueMotion_SSE2(dst, 8); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_sse2.c |
static void VE16_SSE2(uint8_t *dst) {
const __m128i top = _mm_loadu_si128((const __m128i *)(dst - BPS));
int j;
for (j = 0; j < 16; ++j) {
_mm_storeu_si128((__m128i *)(dst + j * BPS), top);
}
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_sse2.c | static void DC16NoTop_SSE2(uint8_t *dst) {
int DC = 8;
int j;
for (j = 0; j < 16; ++j) {
DC += dst[-1 + j * BPS];
}
Put16_SSE2(DC >> 4, dst);
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_sse2.c | static void DC16NoTopLeft_SSE2(uint8_t *dst) { Put16_SSE2(0x80, dst); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_sse2.c | static void DC8uvNoTop_SSE2(uint8_t *dst) {
int dc0 = 4;
int i;
for (i = 0; i < 8; ++i) {
dc0 += dst[-1 + i * BPS];
}
Put8x8uv_SSE2(dc0 >> 3, dst);
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/dec_sse2.c | static void DC8uvNoTopLeft_SSE2(uint8_t *dst) { Put8x8uv_SSE2(0x80, dst); } | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c |
static WEBP_INLINE uint8_t clip_8b(int v) {
return (!(v & ~0xff)) ? v : (v < 0) ? 0 : 255;
}
#if !WEBP_NEON_OMIT_C_CODE | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c | static WEBP_INLINE int clip_max(int v, int max) { return (v > max) ? max : v; }
#endif | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c | void VP8SetHistogramData(const int distribution[MAX_COEFF_THRESH + 1],
VP8Histogram *const histo) {
int max_value = 0, last_non_zero = 1;
int k;
for (k = 0; k <= MAX_COEFF_THRESH; ++k) {
const int value = distribution[k];
if (value > 0) {
if (value > max_value)
max_v... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c |
static WEBP_INLINE void VerticalPred(uint8_t *dst, const uint8_t *top,
int size) {
int j;
if (top != NULL) {
for (j = 0; j < size; ++j)
memcpy(dst + j * BPS, top, size);
} else {
Fill(dst, 127, size);
}
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c | static WEBP_INLINE void DCMode(uint8_t *dst, const uint8_t *left,
const uint8_t *top, int size, int round,
int shift) {
int DC = 0;
int j;
if (top != NULL) {
for (j = 0; j < size; ++j)
DC += top[j];
if (left != NULL) {
for (j = 0; j... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c | static void IntraChromaPreds_C(uint8_t *dst, const uint8_t *left,
const uint8_t *top) {
DCMode(C8DC8 + dst, left, top, 8, 8, 4);
VerticalPred(C8VE8 + dst, top, 8);
HorizontalPred(C8HE8 + dst, left, 8);
TrueMotion(C8TM8 + dst, left, top, 8);
// V block
dst += 8;
if (top != N... | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c |
static void HU4(uint8_t *dst, const uint8_t *top) {
const int I = top[-2];
const int J = top[-3];
const int K = top[-4];
const int L = top[-5];
DST(0, 0) = AVG2(I, J);
DST(2, 0) = DST(0, 1) = AVG2(J, K);
DST(2, 1) = DST(0, 2) = AVG2(K, L);
DST(1, 0) = AVG3(I, J, K);
DST(3, 0) = DST(1, 1) = AVG3(J, K,... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c | static WEBP_INLINE int GetSSE(const uint8_t *a, const uint8_t *b, int w,
int h) {
int count = 0;
int y, x;
for (y = 0; y < h; ++y) {
for (x = 0; x < w; ++x) {
const int diff = (int)a[x] - b[x];
count += diff * diff;
}
a += BPS;
b += BPS;
}
return count... | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c |
static int Disto4x4_C(const uint8_t *const a, const uint8_t *const b,
const uint16_t *const w) {
const int sum1 = TTransform(a, w);
const int sum2 = TTransform(b, w);
return abs(sum2 - sum1) >> 5;
} | [
0,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c |
static int Disto16x16_C(const uint8_t *const a, const uint8_t *const b,
const uint16_t *const w) {
int D = 0;
int x, y;
for (y = 0; y < 16 * BPS; y += 4 * BPS) {
for (x = 0; x < 16; x += 4) {
D += Disto4x4_C(a + x + y, b + x + y, w);
}
}
return D;
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/enc.c | static WEBP_INLINE void Copy(const uint8_t *src, uint8_t *dst, int w, int h) {
int y;
for (y = 0; y < h; ++y) {
memcpy(dst, src, w);
src += BPS;
dst += BPS;
}
} | [
1,
0
] |
Chromium | third_party/libwebp/src/dsp/enc_mips_dsp_r2.c |
static void DC4(uint8_t *dst, const uint8_t *top) {
int temp0, temp1;
__asm__ volatile(
"ulw %[temp0], 0(%[top]) \n\t"
"ulw %[temp1], -5(%[top]) \n\t"
"raddu.w.qb %[temp0], %[temp0] \n\t"
"raddu.w.qb %[temp1], %[temp1] ... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.