Home
last modified time | relevance | path

Searched refs:sampleSize (Results 1 – 25 of 32) sorted by relevance

12

/third_party/skia/src/codec/
DSkAndroidCodec.cpp15 static bool is_valid_sample_size(int sampleSize) { in is_valid_sample_size() argument
17 return sampleSize > 0; in is_valid_sample_size()
228 int sampleSize = std::min(sampleX, sampleY); in computeSampleSize() local
229 auto computedSize = this->getSampledDimensions(sampleSize); in computeSampleSize()
231 return sampleSize; in computeSampleSize()
234 if (computedSize == origDims || sampleSize == 1) { in computeSampleSize()
243 auto smaller = this->getSampledDimensions(sampleSize + 1); in computeSampleSize()
245 return sampleSize + 1; in computeSampleSize()
250 return sampleSize; in computeSampleSize()
253 sampleSize++; in computeSampleSize()
[all …]
DSkSampledCodec.cpp22 int sampleSize = *sampleSizePtr; in accountForNativeScaling() local
23 SkASSERT(sampleSize > 1); in accountForNativeScaling()
32 switch (sampleSize) { in accountForNativeScaling()
38 return this->codec()->getScaledDimensions(get_scale_from_sample_size(sampleSize)); in accountForNativeScaling()
48 SkTDivMod(sampleSize, supportedSampleSize, &actualSampleSize, &remainder); in accountForNativeScaling()
68 SkISize SkSampledCodec::onGetSampledDimensions(int sampleSize) const { in onGetSampledDimensions()
69 const SkISize size = this->accountForNativeScaling(&sampleSize); in onGetSampledDimensions()
70 return SkISize::Make(get_scaled_dimension(size.width(), sampleSize), in onGetSampledDimensions()
71 get_scaled_dimension(size.height(), sampleSize)); in onGetSampledDimensions()
87 int sampleSize = options.fSampleSize; in onGetAndroidPixels() local
[all …]
DSkCodecPriv.h29 static inline float get_scale_from_sample_size(int sampleSize) { in get_scale_from_sample_size() argument
30 return 1.0f / ((float) sampleSize); in get_scale_from_sample_size()
42 static inline int get_scaled_dimension(int srcDimension, int sampleSize) { in get_scaled_dimension() argument
43 if (sampleSize > srcDimension) { in get_scaled_dimension()
46 return srcDimension / sampleSize; in get_scaled_dimension()
DSkAndroidCodecAdapter.cpp15 SkISize SkAndroidCodecAdapter::onGetSampledDimensions(int sampleSize) const { in onGetSampledDimensions()
16 float scale = get_scale_from_sample_size(sampleSize); in onGetSampledDimensions()
DSkSampledCodec.h25 SkISize onGetSampledDimensions(int sampleSize) const override;
45 SkISize accountForNativeScaling(int* sampleSize, int* nativeSampleSize = nullptr) const;
DSkAndroidCodecAdapter.h26 SkISize onGetSampledDimensions(int sampleSize) const override;
/third_party/skia/client_utils/android/
DBitmapRegionDecoder.cpp49 const SkIRect& desiredSubset, int sampleSize, SkColorType dstColorType, in decodeRegion() argument
53 if (sampleSize < 1) { in decodeRegion()
54 sampleSize = 1; in decodeRegion()
79 SkISize scaledSize = fCodec->getSampledSubsetDimensions(sampleSize, subset); in decodeRegion()
92 scaledOutX = outX / sampleSize; in decodeRegion()
93 scaledOutY = outY / sampleSize; in decodeRegion()
97 const int scaledExtraX = extraX / sampleSize; in decodeRegion()
98 const int scaledExtraY = extraY / sampleSize; in decodeRegion()
131 options.fSampleSize = sampleSize; in decodeRegion()
DBitmapRegionDecoder.h24 const SkIRect& desiredSubset, int sampleSize,
/third_party/skia/fuzz/oss_fuzz/
DFuzzAndroidCodec.cpp16 bool FuzzAndroidCodec(sk_sp<SkData> bytes, uint8_t sampleSize) { in FuzzAndroidCodec() argument
22 auto size = codec->getSampledDimensions(sampleSize); in FuzzAndroidCodec()
31 options.fSampleSize = sampleSize; in FuzzAndroidCodec()
60 uint8_t sampleSize; in LLVMFuzzerTestOneInput() local
61 fuzz.nextRange(&sampleSize, 1, 64); in LLVMFuzzerTestOneInput()
63 FuzzAndroidCodec(bytes, sampleSize); in LLVMFuzzerTestOneInput()
/third_party/skia/bench/
DBitmapRegionDecoderBench.cpp16 SkColorType colorType, uint32_t sampleSize, const SkIRect& subset) in BitmapRegionDecoderBench() argument
20 , fSampleSize(sampleSize) in BitmapRegionDecoderBench()
27 if (1 != sampleSize) { in BitmapRegionDecoderBench()
28 fName.appendf("_%.3f", 1.0f / (float) sampleSize); in BitmapRegionDecoderBench()
DAndroidCodecBench.cpp15 AndroidCodecBench::AndroidCodecBench(SkString baseName, SkData* encoded, int sampleSize) in AndroidCodecBench() argument
17 , fSampleSize(sampleSize) in AndroidCodecBench()
20 fName.printf("AndroidCodec_%s_SampleSize%d", baseName.c_str(), sampleSize); in AndroidCodecBench()
Dnanobench.cpp581 static bool valid_brd_bench(sk_sp<SkData> encoded, SkColorType colorType, uint32_t sampleSize, in valid_brd_bench() argument
589 if (sampleSize * minOutputSize > (uint32_t) brd->width() || sampleSize * minOutputSize > in valid_brd_bench()
971 int sampleSize = sampleSizes[fCurrentSampleSize]; in rawNext() local
973 … if (10 * sampleSize > std::min(codec->getInfo().width(), codec->getInfo().height())) { in rawNext()
979 encoded.get(), sampleSize); in rawNext()
1015 uint32_t sampleSize = brdSampleSizes[fCurrentSampleSize]; in rawNext() local
1020 if (!valid_brd_bench(encoded, colorType, sampleSize, minOutputSize, in rawNext()
1027 const uint32_t subsetSize = sampleSize * minOutputSize; in rawNext()
1058 colorType, sampleSize, subset); in rawNext()
DAndroidCodecBench.h24 AndroidCodecBench(SkString basename, SkData* encoded, int sampleSize);
DBitmapRegionDecoderBench.h34 uint32_t sampleSize, const SkIRect& subset);
/third_party/skia/include/codec/
DSkAndroidCodec.h142 SkISize getSampledDimensions(int sampleSize) const;
179 SkISize getSampledSubsetDimensions(int sampleSize, const SkIRect& subset) const;
252 virtual SkISize onGetSampledDimensions(int sampleSize) const = 0;
/third_party/skia/third_party/externals/oboe/samples/RhythmGame/src/main/cpp/audio/
DNDKExtractor.cpp123 … ssize_t sampleSize = AMediaExtractor_readSampleData(extractor, inputBuffer, inputSize); in decode() local
126 if (sampleSize > 0){ in decode()
129 AMediaCodec_queueInputBuffer(codec, inputIndex, 0, sampleSize, in decode()
/third_party/skia/tests/
DAndroidCodecTest.cpp122 for (int sampleSize : { 1, 2, 3, 4, 8, 16, 32 }) { in DEF_TEST()
123 const SkISize sampledDims = codec->getSampledDimensions(sampleSize); in DEF_TEST()
130 file, sampleSize, computedSampleSize, in DEF_TEST()
DCodecAnimTest.cpp503 for (int sampleSize : { 8, 32, 100 }) { in test_animated_AndroidCodec()
504 auto dimensions = codec->codec()->getScaledDimensions(1.0f / sampleSize); in test_animated_AndroidCodec()
538 sampleSize, i, info.width(), info.height(), y); in test_animated_AndroidCodec()
DCodecTest.cpp640 for (int sampleSize = 1; sampleSize < 32; sampleSize++) { in test_dimensions() local
642 SkISize scaledDims = codec->getSampledDimensions(sampleSize); in test_dimensions()
653 options.fSampleSize = sampleSize; in test_dimensions()
657 ERRORF(r, "Failed to decode %s with sample size %i; error: %s", path, sampleSize, in test_dimensions()
/third_party/skia/dm/
DDM.cpp545 SkAlphaType dstAlphaType, int sampleSize) { in push_android_codec_src() argument
571 if (1 != sampleSize) { in push_android_codec_src()
572 folder.appendf("_%.3f", 1.0f / (float) sampleSize); in push_android_codec_src()
575 AndroidCodecSrc* src = new AndroidCodecSrc(path, dstColorType, dstAlphaType, sampleSize); in push_android_codec_src()
615 uint32_t sampleSize) { in push_brd_src() argument
639 if (1 != sampleSize) { in push_brd_src()
640 folder.appendf("_%.3f", 1.0f / (float) sampleSize); in push_brd_src()
643 BRDSrc* src = new BRDSrc(path, mode, dstColorType, sampleSize); in push_brd_src()
666 for (uint32_t sampleSize : sampleSizes) { in push_brd_srcs() local
668 push_brd_src(path, CodecSrc::kGetFromCanvas_DstColorType, mode, sampleSize); in push_brd_srcs()
[all …]
/third_party/skia/fuzz/
DFuzzMain.cpp446 bool FuzzAndroidCodec(sk_sp<SkData> bytes, uint8_t sampleSize);
450 uint8_t sampleSize; in fuzz_android_codec() local
451 fuzz.nextRange(&sampleSize, 1, 64); in fuzz_android_codec()
453 if (FuzzAndroidCodec(bytes, sampleSize)) { in fuzz_android_codec()
454 SkDebugf("[terminated] Success on Android Codec sampleSize=%u!\n", sampleSize); in fuzz_android_codec()
457 SkDebugf("[terminated] Could not use Android Codec sampleSize=%u!\n", sampleSize); in fuzz_android_codec()
/third_party/libsnd/src/
Daiff.c129 int16_t sampleSize ; member
344 if (comm_fmt.sampleSize >= 8 && comm_fmt.sampleSize < 24) in aiff_open()
345 { error = dwvw_init (psf, comm_fmt.sampleSize) ; in aiff_open()
350 psf_log_printf (psf, "AIFC/DWVW : Bad bitwidth %d\n", comm_fmt.sampleSize) ; in aiff_open()
1011 &(comm_fmt->sampleSize), &(comm_fmt->sampleRate), SIGNED_SIZEOF (comm_fmt->sampleRate)) ; in aiff_read_comm_chunk()
1051 …m_fmt->encoding == fl32_MARKER || comm_fmt->encoding == FL32_MARKER) && comm_fmt->sampleSize != 32) in aiff_read_comm_chunk()
1052 { psf_log_printf (psf, " Sample Size : %d (should be 32)\n", comm_fmt->sampleSize) ; in aiff_read_comm_chunk()
1053 comm_fmt->sampleSize = 32 ; in aiff_read_comm_chunk()
1055 …m_fmt->encoding == fl64_MARKER || comm_fmt->encoding == FL64_MARKER) && comm_fmt->sampleSize != 64) in aiff_read_comm_chunk()
1056 { psf_log_printf (psf, " Sample Size : %d (should be 64)\n", comm_fmt->sampleSize) ; in aiff_read_comm_chunk()
[all …]
/third_party/lz4/tests/
Dfuzzer.c1130 { int const sampleSize = 65 KB; in FUZ_unitTests() local
1131 int const maxCSize = LZ4_COMPRESSBOUND(sampleSize); in FUZ_unitTests()
1133 int const startInputIndex = outSize - sampleSize; in FUZ_unitTests()
1135 XXH32_hash_t const crcOrig = XXH32(testInput, sampleSize, 0); in FUZ_unitTests()
1138 memcpy(startInput, testInput, sampleSize); /* copy at end of buffer */ in FUZ_unitTests()
1140 cSize = LZ4_compress_default(startInput, testCompressed, sampleSize, maxCSize); in FUZ_unitTests()
1146 assert(dSize == sampleSize); /* correct size */ in FUZ_unitTests()
1154 { int const sampleSize = 65 KB; in FUZ_unitTests() local
1156 FUZ_fillCompressibleNoiseBuffer(testInput, sampleSize, 0.0, &randState); in FUZ_unitTests()
1159 { XXH64_hash_t const crcOrig = XXH64(testInput, sampleSize, 0); in FUZ_unitTests()
[all …]
/third_party/skia/src/ports/
DSkImageGeneratorNDK.cpp117 for (int sampleSize : { 2, 4, 8 }) { in set_target_size()
120 if (ok(AImageDecoder_computeSampledSize(decoder, sampleSize, &width, &height)) in set_target_size()
/third_party/skia/third_party/externals/brotli/research/
Ddictionary_generator.cc80 size_t sampleSize = sizes[i]; in writeSamples() local
83 static_cast<std::streamsize>(sampleSize)); in writeSamples()
85 offset += sampleSize; in writeSamples()

12