diff options
author | Vignesh Venkatasubramanian <vigneshv@google.com> | 2014-03-26 15:13:32 -0700 |
---|---|---|
committer | Vignesh Venkatasubramanian <vigneshv@google.com> | 2014-03-26 15:13:32 -0700 |
commit | 2ec72e65689c948e92b826ae1e867bf369e72f13 (patch) | |
tree | 09d08252ba727c6c2e090222ea15ccc3b143301a /libvpx/build/make/obj_int_extract.c | |
parent | 9b35249446b07f40ac5fcc3205f2c048616efacc (diff) | |
download | android_external_libvpx-2ec72e65689c948e92b826ae1e867bf369e72f13.tar.gz android_external_libvpx-2ec72e65689c948e92b826ae1e867bf369e72f13.tar.bz2 android_external_libvpx-2ec72e65689c948e92b826ae1e867bf369e72f13.zip |
libvpx: Roll latest libvpx
Pulling changes related to fixing a rare bitstream issue on video upscaling.
Also enables VP9 encoder. This is exactly the same as the roll that is
already in master.
Upstream Hash: 8e9c9f118cda45013f14cce7961dcc8df78ffebf
Change-Id: Iba9bb1c1804462014deab20fa6f4c5e4c55a778e
Diffstat (limited to 'libvpx/build/make/obj_int_extract.c')
-rw-r--r-- | libvpx/build/make/obj_int_extract.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/libvpx/build/make/obj_int_extract.c b/libvpx/build/make/obj_int_extract.c index feed9d9..819ce9d 100644 --- a/libvpx/build/make/obj_int_extract.c +++ b/libvpx/build/make/obj_int_extract.c @@ -21,6 +21,7 @@ typedef enum { OUTPUT_FMT_PLAIN, OUTPUT_FMT_RVDS, OUTPUT_FMT_GAS, + OUTPUT_FMT_C_HEADER, } output_fmt_t; int log_msg(const char *fmt, ...) { @@ -43,9 +44,12 @@ int print_macho_equ(output_fmt_t mode, uint8_t* name, int val) { case OUTPUT_FMT_RVDS: printf("%-40s EQU %5d\n", name, val); return 0; - case OUTPUT_FMT_GAS: + case OUTPUT_FMT_GAS: printf(".set %-40s, %5d\n", name, val); return 0; + case OUTPUT_FMT_C_HEADER: + printf("#define %-40s %5d\n", name, val); + return 0; default: log_msg("Unsupported mode: %d", mode); return 1; @@ -321,7 +325,7 @@ bail: return 1; } -char *parse_elf_string_table(elf_obj_t *elf, int s_idx, int idx) { +const char *parse_elf_string_table(elf_obj_t *elf, int s_idx, int idx) { if (elf->bits == 32) { Elf32_Shdr shdr; @@ -491,6 +495,13 @@ int parse_elf(uint8_t *buf, size_t sz, output_fmt_t mode) { sym.st_name), val); break; + case OUTPUT_FMT_C_HEADER: + printf("#define %-40s %5d\n", + parse_elf_string_table(&elf, + shdr.sh_link, + sym.st_name), + val); + break; default: printf("%s = %d\n", parse_elf_string_table(&elf, @@ -655,7 +666,11 @@ int parse_coff(uint8_t *buf, size_t sz) { } strcpy(sectionlist[i], sectionname); - if (!strcmp(sectionname, ".rdata")) sectionrawdata_ptr = get_le32(ptr + 20); + // check if it's .rdata and is not a COMDAT section. + if (!strcmp(sectionname, ".rdata") && + (get_le32(ptr + 36) & 0x1000) == 0) { + sectionrawdata_ptr = get_le32(ptr + 20); + } ptr += 40; } @@ -762,6 +777,7 @@ int main(int argc, char **argv) { fprintf(stderr, "Output Formats:\n"); fprintf(stderr, " gas - compatible with GNU assembler\n"); fprintf(stderr, " rvds - compatible with armasm\n"); + fprintf(stderr, " cheader - c/c++ header file\n"); goto bail; } @@ -771,6 +787,8 @@ int main(int argc, char **argv) { mode = OUTPUT_FMT_RVDS; else if (!strcmp(argv[1], "gas")) mode = OUTPUT_FMT_GAS; + else if (!strcmp(argv[1], "cheader")) + mode = OUTPUT_FMT_C_HEADER; else f = argv[1]; |