Home
last modified time | relevance | path

Searched refs:luma (Results 1 - 25 of 62) sorted by relevance

123

/third_party/ffmpeg/libavfilter/
H A Dvf_lumakey.c50 const uint8_t *luma = frame->data[0] + slice_start * frame->linesize[0]; in do_lumakey_slice8() local
58 if (luma[x] >= b && luma[x] <= w) { in do_lumakey_slice8()
60 } else if (luma[x] > b - so && luma[x] < w + so) { in do_lumakey_slice8()
61 if (luma[x] < b) { in do_lumakey_slice8()
62 alpha[x] = 255 - (luma[x] - b + so) * 255 / so; in do_lumakey_slice8()
64 alpha[x] = (luma[x] - w) * 255 / so; in do_lumakey_slice8()
68 luma += frame->linesize[0]; in do_lumakey_slice8()
82 const uint16_t *luma in do_lumakey_slice16() local
[all...]
H A Dvf_histeq.c132 int x, y, i, luthi, lutlo, lut, luma, oluma, m; in filter_frame() local
155 luma = (55 * r + 182 * g + 19 * b) >> 8; in filter_frame()
156 dst[x + histeq->rgba_map[A]] = luma; in filter_frame()
157 histeq->in_histogram[luma]++; in filter_frame()
191 luma = dst[x + histeq->rgba_map[A]]; in filter_frame()
192 if (luma == 0) { in filter_frame()
197 lut = histeq->LUT[luma]; in filter_frame()
199 if (luma > 0) { in filter_frame()
201 (histeq->LUT[luma] + histeq->LUT[luma in filter_frame()
[all...]
H A Dvf_smartblur.c55 FilterParam luma; member
66 { "luma_radius", "set luma radius", OFFSET(luma.radius), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, RADIUS_MIN, RADIUS_MAX, .flags=FLAGS },
67 { "lr" , "set luma radius", OFFSET(luma.radius), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, RADIUS_MIN, RADIUS_MAX, .flags=FLAGS },
68 { "luma_strength", "set luma strength", OFFSET(luma.strength), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, STRENGTH_MIN, STRENGTH_MAX, .flags=FLAGS },
69 { "ls", "set luma strength", OFFSET(luma.strength), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, STRENGTH_MIN, STRENGTH_MAX, .flags=FLAGS },
70 { "luma_threshold", "set luma threshol
[all...]
H A Dvf_sab.c51 FilterParam luma; member
80 { "luma_radius", "set luma radius", OFFSET(luma.radius), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, RADIUS_MIN, RADIUS_MAX, .flags=FLAGS },
81 { "lr" , "set luma radius", OFFSET(luma.radius), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, RADIUS_MIN, RADIUS_MAX, .flags=FLAGS },
82 { "luma_pre_filter_radius", "set luma pre-filter radius", OFFSET(luma.pre_filter_radius), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, PRE_FILTER_RADIUS_MIN, PRE_FILTER_RADIUS_MAX, .flags=FLAGS },
83 { "lpfr", "set luma pre-filter radius", OFFSET(luma.pre_filter_radius), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, PRE_FILTER_RADIUS_MIN, PRE_FILTER_RADIUS_MAX, .flags=FLAGS },
84 { "luma_strength", "set luma strengt
[all...]
H A Dvf_vibrance.c89 float luma = g * gc + r * rc + b * bc; in vibrance_slice8() local
94 g = lerpf(luma, g, cg); in vibrance_slice8()
95 b = lerpf(luma, b, cb); in vibrance_slice8()
96 r = lerpf(luma, r, cr); in vibrance_slice8()
148 float luma = g * gc + r * rc + b * bc; in vibrance_slice16() local
153 g = lerpf(luma, g, cg); in vibrance_slice16()
154 b = lerpf(luma, b, cb); in vibrance_slice16()
155 r = lerpf(luma, r, cr); in vibrance_slice16()
205 float luma = g * gc + r * rc + b * bc; in vibrance_slice8p() local
210 g = lerpf(luma, in vibrance_slice8p()
262 float luma = g * gc + r * rc + b * bc; vibrance_slice16p() local
[all...]
H A Dvf_tonemap.c129 float luma = av_q2d(s->coeffs->cr) * *r_in + av_q2d(s->coeffs->cg) * *g_in + av_q2d(s->coeffs->cb) * *b_in; in tonemap() local
130 float overbright = FFMAX(luma - s->desat, 1e-6) / FFMAX(luma, 1e-6); in tonemap()
131 *r_out = MIX(*r_in, luma, overbright); in tonemap()
132 *g_out = MIX(*g_in, luma, overbright); in tonemap()
133 *b_out = MIX(*b_in, luma, overbright); in tonemap()
H A Dvf_unsharp.c157 fp[0] = &s->luma; in apply_unsharp_c()
190 set_filter_param(&s->luma, s->lmsize_x, s->lmsize_y, s->lamount); in init()
194 if (s->luma.scalebits >= 26 || s->chroma.scalebits >= 26 || s->alpha.scalebits >= 26) { in init()
195 av_log(ctx, AV_LOG_ERROR, "luma or chroma or alpha matrix size too big\n"); in init()
261 inlink->h / (4 * s->luma.steps_y)); in config_input()
263 ret = init_filter_param(inlink->dst, &s->luma, "luma", inlink->w); in config_input()
289 free_filter_param(&s->luma, s->nb_threads); in uninit()
323 { "luma_msize_x", "set luma matrix horizontal size", OFFSET(lmsize_x), AV_OPT_TYPE_INT, { .i64 = 5 }, MIN_SIZE, MAX_SIZE, FLAGS },
324 { "lx", "set luma matri
[all...]
/third_party/ffmpeg/libavcodec/
H A Dvcr1.c75 uint8_t *luma = &p->data[0][y * p->linesize[0]]; in vcr1_decode_frame() local
88 luma[0] = offset += a->delta[bytestream[2] & 0xF]; in vcr1_decode_frame()
89 luma[1] = offset += a->delta[bytestream[2] >> 4]; in vcr1_decode_frame()
90 luma[2] = offset += a->delta[bytestream[0] & 0xF]; in vcr1_decode_frame()
91 luma[3] = offset += a->delta[bytestream[0] >> 4]; in vcr1_decode_frame()
92 luma += 4; in vcr1_decode_frame()
105 luma[0] = offset += a->delta[bytestream[2] & 0xF]; in vcr1_decode_frame()
106 luma[1] = offset += a->delta[bytestream[2] >> 4]; in vcr1_decode_frame()
107 luma[2] = offset += a->delta[bytestream[3] & 0xF]; in vcr1_decode_frame()
108 luma[ in vcr1_decode_frame()
[all...]
H A Dcljrenc.c66 uint8_t *luma = &p->data[0][y * p->linesize[0]]; in encode_frame() local
78 memcpy(luma_tmp, luma, avctx->width - x); in encode_frame()
79 luma = luma_tmp; in encode_frame()
81 put_bits(&pb, 5, (249*(luma[3] + (dither>>29) )) >> 11); in encode_frame()
82 put_bits(&pb, 5, (249*(luma[2] + ((dither>>26)&7))) >> 11); in encode_frame()
83 put_bits(&pb, 5, (249*(luma[1] + ((dither>>23)&7))) >> 11); in encode_frame()
84 put_bits(&pb, 5, (249*(luma[0] + ((dither>>20)&7))) >> 11); in encode_frame()
85 luma += 4; in encode_frame()
H A Dcljrdec.c59 uint8_t *luma = &p->data[0][y * p->linesize[0]]; in decode_frame() local
63 luma[3] = (get_bits(&gb, 5)*33) >> 2; in decode_frame()
64 luma[2] = (get_bits(&gb, 5)*33) >> 2; in decode_frame()
65 luma[1] = (get_bits(&gb, 5)*33) >> 2; in decode_frame()
66 luma[0] = (get_bits(&gb, 5)*33) >> 2; in decode_frame()
67 luma += 4; in decode_frame()
H A Dm101.c85 uint16_t *luma = (uint16_t*)&frame->data[0][y*frame->linesize[0]]; in m101_decode_frame() local
93 luma [xd] = (4*buf_src[2*x + 0]) + ((buf_src[32 + (x>>1)]>>4)&3); in m101_decode_frame()
95 luma [xd] = (4*buf_src[2*x + 0]) + (buf_src[32 + (x>>1)] &3); in m101_decode_frame()
/third_party/skia/src/core/
H A DSkMaskGamma.cpp20 SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const override {
22 return luma;
30 SkScalar fromLuma(SkScalar gamma, SkScalar luma) const override {
31 return SkScalarPow(luma, SkScalarInvert(gamma));
46 SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const override {
50 if (luma <= 0.0031308f) {
51 return luma * 12.92f;
53 return 1.055f * SkScalarPow(luma, SkScalarInvert(2.4f))
H A DSkMaskGamma.h28 /** Converts a color component luminance in the color space to a linear luma. */
30 /** Converts a linear luma to a color component luminance in the color space. */
31 virtual SkScalar fromLuma(SkScalar gamma, SkScalar luma) const = 0;
39 SkScalar luma = r * SK_LUM_COEFF_R + in computeLuminance() local
42 SkASSERT(luma <= SK_Scalar1); in computeLuminance()
43 return SkScalarRoundToInt(luminance.fromLuma(gamma, luma) * 255); in computeLuminance()
/third_party/mesa3d/src/gallium/drivers/nouveau/
H A Dnouveau_video.c149 bool luma) in nouveau_vpe_mb_dct_header()
154 unsigned y = luma ? mb->y * 16 : mb->y * 8; in nouveau_vpe_mb_dct_header()
169 if (luma && mb->macroblock_modes.bits.dct_type == PIPE_MPEG12_DCT_TYPE_FIELD) in nouveau_vpe_mb_dct_header()
178 if (luma) { in nouveau_vpe_mb_dct_header()
191 nouveau_vpe_mb_mv_flags(bool luma, int mv_h, int mv_v, bool forward, bool first, bool vert) in nouveau_vpe_mb_mv_flags() argument
194 if (luma) in nouveau_vpe_mb_mv_flags()
233 bool luma, bool frame, bool forward, bool vert, in nouveau_vpe_mb_mv()
250 if (!luma) { in nouveau_vpe_mb_mv()
255 mc_header |= nouveau_vpe_mb_mv_flags(luma, mv_horizontal, mv_vertical, forward, first, vert); in nouveau_vpe_mb_mv()
259 if (luma) in nouveau_vpe_mb_mv()
147 nouveau_vpe_mb_dct_header(struct nouveau_decoder *dec, const struct pipe_mpeg12_macroblock *mb, bool luma) nouveau_vpe_mb_dct_header() argument
232 nouveau_vpe_mb_mv(struct nouveau_decoder *dec, unsigned mc_header, bool luma, bool frame, bool forward, bool vert, int x, int y, const short motions[2], unsigned surface, bool first) nouveau_vpe_mb_mv() argument
271 nouveau_vpe_mb_mv_header(struct nouveau_decoder *dec, const struct pipe_mpeg12_macroblock *mb, bool luma) nouveau_vpe_mb_mv_header() argument
[all...]
/third_party/mesa3d/src/gallium/drivers/radeonsi/
H A Dsi_uvd.c93 struct si_texture *luma = (struct si_texture *)buf->resources[0]; in si_uvd_set_dtb() local
100 si_uvd_set_dt_surfaces(msg, &luma->surface, (chroma) ? &chroma->surface : NULL, type); in si_uvd_set_dtb()
102 return luma->buffer.buf; in si_uvd_set_dtb()
H A Dradeon_vce.c223 pitch = align(enc->luma->u.legacy.level[0].nblk_x * enc->luma->bpe, 128); in si_vce_frame_offset()
224 vpitch = align(enc->luma->u.legacy.level[0].nblk_y, 16); in si_vce_frame_offset()
226 pitch = align(enc->luma->u.gfx9.surf_pitch * enc->luma->bpe, 256); in si_vce_frame_offset()
227 vpitch = align(enc->luma->u.gfx9.surf_height, 16); in si_vce_frame_offset()
275 enc->get_buffer(vid_buf->resources[0], &enc->handle, &enc->luma); in rvce_begin_frame()
H A Dradeon_vce_40_2_2.c85 RVCE_CS(enc->luma->u.legacy.level[0].nblk_x * enc->luma->bpe); // encRefPicLumaPitch in create()
87 RVCE_CS(align(enc->luma->u.legacy.level[0].nblk_y, 16) / 8); // encRefYHeightInQw in create()
311 (uint64_t)enc->luma->u.legacy.level[0].offset_256B * 256); // inputPictureLumaAddressHi/Lo in encode()
314 RVCE_CS(align(enc->luma->u.legacy.level[0].nblk_y, 16)); // encInputFrameYPitch in encode()
315 RVCE_CS(enc->luma->u.legacy.level[0].nblk_x * enc->luma->bpe); // encInputPicLumaPitch in encode()
H A Dradeon_vce_52.c194 RVCE_CS(enc->luma->u.legacy.level[0].nblk_x * enc->luma->bpe); // encRefPicLumaPitch in create()
196 RVCE_CS(align(enc->luma->u.legacy.level[0].nblk_y, 16) / 8); // encRefYHeightInQw in create()
198 RVCE_CS(enc->luma->u.gfx9.surf_pitch * enc->luma->bpe); // encRefPicLumaPitch in create()
200 RVCE_CS(align(enc->luma->u.gfx9.surf_height, 16) / 8); // encRefYHeightInQw in create()
266 (uint64_t)enc->luma->u.legacy.level[0].offset_256B * 256); // inputPictureLumaAddressHi/Lo in encode()
269 RVCE_CS(align(enc->luma->u.legacy.level[0].nblk_y, 16)); // encInputFrameYPitch in encode()
270 RVCE_CS(enc->luma->u.legacy.level[0].nblk_x * enc->luma in encode()
[all...]
H A Dradeon_vce_50.c121 (uint64_t)enc->luma->u.legacy.level[0].offset_256B * 256); // inputPictureLumaAddressHi/Lo in encode()
124 RVCE_CS(align(enc->luma->u.legacy.level[0].nblk_y, 16)); // encInputFrameYPitch in encode()
125 RVCE_CS(enc->luma->u.legacy.level[0].nblk_x * enc->luma->bpe); // encInputPicLumaPitch in encode()
H A Dradeon_vcn_dec_jpeg.c42 struct si_texture *luma = (struct si_texture *)((struct vl_video_buffer *)target)->resources[0]; in radeon_jpeg_get_decode_param() local
47 dec->jpg.dt_luma_top_offset = luma->surface.u.gfx9.surf_offset; in radeon_jpeg_get_decode_param()
50 dec->jpg.dt_pitch = luma->surface.u.gfx9.surf_pitch * luma->surface.blk_w; in radeon_jpeg_get_decode_param()
53 return luma->buffer.buf; in radeon_jpeg_get_decode_param()
H A Dradeon_uvd.c1434 * fill decoding target field from the luma and chroma surfaces
1436 void si_uvd_set_dt_surfaces(struct ruvd_msg *msg, struct radeon_surf *luma, in si_uvd_set_dt_surfaces() argument
1442 msg->body.decode.dt_pitch = luma->u.legacy.level[0].nblk_x * luma->blk_w; in si_uvd_set_dt_surfaces()
1443 switch (luma->u.legacy.level[0].mode) { in si_uvd_set_dt_surfaces()
1461 msg->body.decode.dt_luma_top_offset = texture_offset(luma, 0, type); in si_uvd_set_dt_surfaces()
1465 msg->body.decode.dt_luma_bottom_offset = texture_offset(luma, 1, type); in si_uvd_set_dt_surfaces()
1474 assert(luma->u.legacy.bankw == chroma->u.legacy.bankw); in si_uvd_set_dt_surfaces()
1475 assert(luma->u.legacy.bankh == chroma->u.legacy.bankh); in si_uvd_set_dt_surfaces()
1476 assert(luma in si_uvd_set_dt_surfaces()
[all...]
/third_party/mesa3d/src/gallium/drivers/r600/
H A Dr600_uvd.c162 struct r600_texture *luma = (struct r600_texture *)buf->resources[0]; in r600_uvd_set_dtb() local
168 ruvd_set_dt_surfaces(msg, &luma->surface, &chroma->surface); in r600_uvd_set_dtb()
170 return luma->resource.buf; in r600_uvd_set_dtb()
H A Dradeon_uvd.c1204 * fill decoding target field from the luma and chroma surfaces
1206 void ruvd_set_dt_surfaces(struct ruvd_msg *msg, struct radeon_surf *luma, in ruvd_set_dt_surfaces() argument
1209 msg->body.decode.dt_pitch = luma->u.legacy.level[0].nblk_x * luma->blk_w; in ruvd_set_dt_surfaces()
1210 switch (luma->u.legacy.level[0].mode) { in ruvd_set_dt_surfaces()
1228 msg->body.decode.dt_luma_top_offset = texture_offset(luma, 0); in ruvd_set_dt_surfaces()
1232 msg->body.decode.dt_luma_bottom_offset = texture_offset(luma, 1); in ruvd_set_dt_surfaces()
1241 assert(luma->u.legacy.bankw == chroma->u.legacy.bankw); in ruvd_set_dt_surfaces()
1242 assert(luma->u.legacy.bankh == chroma->u.legacy.bankh); in ruvd_set_dt_surfaces()
1243 assert(luma in ruvd_set_dt_surfaces()
[all...]
/third_party/ffmpeg/libavcodec/x86/
H A Dh264dsp_init.c103 LF_FUNC(h, luma, depth, sse2) \
105 LF_FUNC(v, luma, depth, sse2) \
113 LF_FUNC(h, luma, depth, avx) \
115 LF_FUNC(v, luma, depth, avx) \
130 LF_FUNC(v, luma, 10, mmxext)
131 LF_FUNC(h, luma, 10, mmxext)
/third_party/ffmpeg/tests/checkasm/
H A Dsw_gbrp.c86 const int16_t *luma[LARGEST_FILTER]; in check_output_yuv2gbrp() local
127 luma[i] = (int16_t *)(src_y + i*LARGEST_INPUT_SIZE); in check_output_yuv2gbrp()
170 call_ref(ctx, luma_filter, luma, luma_filter_size, in check_output_yuv2gbrp()
173 call_new(ctx, luma_filter, luma, luma_filter_size, in check_output_yuv2gbrp()
183 bench_new(ctx, luma_filter, luma, luma_filter_size, in check_output_yuv2gbrp()

Completed in 18 milliseconds

123