/* * H.265 video codec. * Copyright (c) 2013-2014 struktur AG, Dirk Farin * * This file is part of libde265. * * libde265 is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * libde265 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with libde265. If not, see . */ #include "util.h" #include "de265.h" #include #include #include void copy_subimage(uint8_t* dst,int dststride, const uint8_t* src,int srcstride, int w, int h) { for (int y=0;y=2; } #endif #ifdef DE265_LOG_TRACE void logtrace(enum LogModule module, const char* string, ...) { if (verbosity<3) return; if (current_poc < log_poc_start) { return; } if (disable_log[module]) return; //if (module != LogSymbols /*&& module != LogCABAC*/) { return; } //if (logcnt<319500) return; //if (module != LogCABAC) return; va_list va; if (string[0]=='$') { int id = string[1]-'0'; logcnt[id]++; fprintf(stdout, "[%ld] ",logcnt[id]); string += 3; } int noPrefix = (string[0]=='*'); if (!noPrefix) { } // fprintf(stdout, "ERR: "); va_start(va, string); vfprintf(stdout, string + (noPrefix ? 1 : 0), va); va_end(va); fflush(stdout); } #endif void log2fh(FILE* fh, const char* string, ...) { va_list va; int noPrefix = (string[0]=='*'); if (!noPrefix) fprintf(stdout, "INFO: "); va_start(va, string); vfprintf(fh, string + (noPrefix ? 1 : 0), va); va_end(va); fflush(stdout); } void printBlk(const char* title, const int16_t* data, int blksize, int stride, const std::string& prefix) { if (title) printf("%s%s:\n",prefix.c_str(),title); for (int y=0;y