Tweak some data type settings.

This commit is contained in:
Moinak Ghosh 2014-11-19 20:19:16 +05:30
parent b257c83f33
commit 753360e479
4 changed files with 12 additions and 10 deletions

View file

@ -247,7 +247,8 @@ is_bsc_type(int btype)
{ {
int stype = PC_SUBTYPE(btype); int stype = PC_SUBTYPE(btype);
return ((stype == TYPE_MARKUP) | (stype == TYPE_BMP) | (stype == TYPE_DNA_SEQ) | return ((stype == TYPE_MARKUP) | (stype == TYPE_BMP) | (stype == TYPE_DNA_SEQ) |
(stype == TYPE_MP4) | (stype == TYPE_FLAC) | (stype == TYPE_AVI) | (stype == TYPE_DICOM)); (stype == TYPE_MP4) | (stype == TYPE_FLAC) | (stype == TYPE_AVI) |
(stype == TYPE_DICOM) | (stype == TYPE_MEDIA_BSC));
} }
int int
@ -286,7 +287,7 @@ adapt_compress(void *src, uint64_t srclen, void *dst,
#ifdef ENABLE_PC_LIBBSC #ifdef ENABLE_PC_LIBBSC
bsc_type = is_bsc_type(btype); bsc_type = is_bsc_type(btype);
#endif #endif
if (is_incompressible(btype)) { if (is_incompressible(btype) && !bsc_type) {
rv = lz4_compress(src, srclen, dst, dstlen, level, chdr, btype, adat->lz4_data); rv = lz4_compress(src, srclen, dst, dstlen, level, chdr, btype, adat->lz4_data);
if (rv < 0) if (rv < 0)
return (rv); return (rv);

View file

@ -115,11 +115,11 @@ struct ext_entry {
{"jpeg" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_JPEG, 4}, {"jpeg" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_JPEG, 4},
{"mjpeg" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_MJPEG, 5}, {"mjpeg" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_MJPEG, 5},
{"png" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_COMPRESSED_GZ, 3}, {"png" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_COMPRESSED_GZ, 3},
{"mp3" , TYPE_BINARY|TYPE_COMPRESSED, 3}, {"mp3" , TYPE_BINARY, 3},
{"wma" , TYPE_BINARY|TYPE_COMPRESSED, 3}, {"wma" , TYPE_BINARY, 3},
{"divx" , TYPE_BINARY|TYPE_COMPRESSED, 4}, {"divx" , TYPE_BINARY|TYPE_COMPRESSED, 4},
{"mp4" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_MP4, 3}, {"mp4" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_MP4, 3},
{"aac" , TYPE_BINARY|TYPE_COMPRESSED, 3}, {"aac" , TYPE_BINARY, 3},
{"m4a" , TYPE_BINARY|TYPE_COMPRESSED, 3}, {"m4a" , TYPE_BINARY|TYPE_COMPRESSED, 3},
{"m4p" , TYPE_BINARY|TYPE_COMPRESSED, 3}, {"m4p" , TYPE_BINARY|TYPE_COMPRESSED, 3},
{"ofs" , TYPE_BINARY|TYPE_COMPRESSED, 3}, {"ofs" , TYPE_BINARY|TYPE_COMPRESSED, 3},

View file

@ -105,11 +105,11 @@ jpg,TYPE_BINARY|TYPE_COMPRESSED|TYPE_JPEG
jpeg,TYPE_BINARY|TYPE_COMPRESSED|TYPE_JPEG jpeg,TYPE_BINARY|TYPE_COMPRESSED|TYPE_JPEG
mjpeg,TYPE_BINARY|TYPE_COMPRESSED|TYPE_MJPEG mjpeg,TYPE_BINARY|TYPE_COMPRESSED|TYPE_MJPEG
png,TYPE_BINARY|TYPE_COMPRESSED|TYPE_COMPRESSED_GZ png,TYPE_BINARY|TYPE_COMPRESSED|TYPE_COMPRESSED_GZ
mp3,TYPE_BINARY|TYPE_COMPRESSED mp3,TYPE_BINARY
wma,TYPE_BINARY|TYPE_COMPRESSED wma,TYPE_BINARY
divx,TYPE_BINARY|TYPE_COMPRESSED divx,TYPE_BINARY|TYPE_COMPRESSED
mp4,TYPE_BINARY|TYPE_COMPRESSED|TYPE_MP4 mp4,TYPE_BINARY|TYPE_COMPRESSED|TYPE_MP4
aac,TYPE_BINARY|TYPE_COMPRESSED aac,TYPE_BINARY
m4a,TYPE_BINARY|TYPE_COMPRESSED m4a,TYPE_BINARY|TYPE_COMPRESSED
m4p,TYPE_BINARY|TYPE_COMPRESSED m4p,TYPE_BINARY|TYPE_COMPRESSED
ofs,TYPE_BINARY|TYPE_COMPRESSED ofs,TYPE_BINARY|TYPE_COMPRESSED

View file

@ -277,7 +277,7 @@ typedef enum {
/* /*
* Sub-types. * Sub-types.
*/ */
#define NUM_SUB_TYPES 33 #define NUM_SUB_TYPES 34
TYPE_EXE32 = 8, TYPE_EXE32 = 8,
TYPE_JPEG = 16, TYPE_JPEG = 16,
TYPE_MARKUP = 24, TYPE_MARKUP = 24,
@ -310,7 +310,8 @@ typedef enum {
TYPE_PNM = 240, TYPE_PNM = 240,
TYPE_PACKPNM = 248, TYPE_PACKPNM = 248,
TYPE_WAV = 256, TYPE_WAV = 256,
TYPE_ENGLISH = 264 TYPE_ENGLISH = 264,
TYPE_MEDIA_BSC = 272
} data_type_t; } data_type_t;
/* /*