diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-10-16 12:01:48 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-10-16 12:01:48 +0200 |
commit | 94a45d8458ac8e02c994a16023ecf026210a2bad (patch) | |
tree | 30edb2d9ba528414c943cc6f6e561af5f9ae9b96 /src/main/jni/libyuv/source/mjpeg_validate.cc | |
parent | 0af5c054c386dcafeedded2c467b22b53afc1d0f (diff) |
delete unused libs
Diffstat (limited to 'src/main/jni/libyuv/source/mjpeg_validate.cc')
-rw-r--r-- | src/main/jni/libyuv/source/mjpeg_validate.cc | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/main/jni/libyuv/source/mjpeg_validate.cc b/src/main/jni/libyuv/source/mjpeg_validate.cc deleted file mode 100644 index 23d22d099..000000000 --- a/src/main/jni/libyuv/source/mjpeg_validate.cc +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include "libyuv/mjpeg_decoder.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Helper function to validate the jpeg appears intact. -// TODO(fbarchard): Optimize case where SOI is found but EOI is not. -LIBYUV_BOOL ValidateJpeg(const uint8* sample, size_t sample_size) { - size_t i; - if (sample_size < 64) { - // ERROR: Invalid jpeg size: sample_size - return LIBYUV_FALSE; - } - if (sample[0] != 0xff || sample[1] != 0xd8) { // Start Of Image - // ERROR: Invalid jpeg initial start code - return LIBYUV_FALSE; - } - for (i = sample_size - 2; i > 1;) { - if (sample[i] != 0xd9) { - if (sample[i] == 0xff && sample[i + 1] == 0xd9) { // End Of Image - return LIBYUV_TRUE; // Success: Valid jpeg. - } - --i; - } - --i; - } - // ERROR: Invalid jpeg end code not found. Size sample_size - return LIBYUV_FALSE; -} - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - |