zoukankan      html  css  js  c++  java
  • mpl

    +#define IRE_DUMP
    +#ifdef IRE_DUMP
    +    static int dump_i = 0;
    +    static FILE *fp_before = NULL;
    +    static FILE *fp_after = NULL;
    +    LOGD("Begin to dump data, %d x %d -> %d x %d, dump_i=%d",
    +         vsrc.width, vsrc.height, vdst.width, vdst.height, dump_i);
    +
    +    if ( 0 == dump_i && access("/data/before.yuv", R_OK) != 0) {
    +        fp_before = fopen("/data/before.yuv", "w");
    +        if (fp_before == NULL){
    +            LOGE("%s: Cannot dump due to %s", __FUNCTION__, strerror(errno));
    +        } else {
    +            fp_after = fopen("/data/after.yuv", "w");
    +            if (fp_after == NULL){
    +                LOGE("%s: Cannot dump due to %s", __FUNCTION__, strerror(errno));
    +                fclose(fp_before);
    +                fp_before = NULL;
    +            }
    +        }
    +        dump_i++;
    +    }
    +
    +    if ( fp_before != NULL ) {
    +        fwrite(vsrc.start[0], 1, vsrc.length[0], fp_before);
    +    }
    +#endif
     
         ire_process(&ctx->ireHandle, &vsrc, &vdst);
     
    +#ifdef IRE_DUMP
    +
    +    if ( fp_after != NULL ) {
    +        fwrite(vdst.start[0], 1, vdst.length[0], fp_after);
    +        dump_i++;
    +    }
    +
    +    if ( 50 == dump_i) {
    +        if (fclose(fp_before) != 0) {
    +            LOGE("%s: fclose(fp_before) failed: %s", __FUNCTION__, strerror(errno));
    +        }
    +
    +        if (fclose(fp_after) != 0) {
    +            LOGE("%s: fclose(fp_after) failed: %s", __FUNCTION__, strerror(errno));
    +        }
    +
    +        fp_before = NULL;
    +        fp_after = NULL;
    +        dump_i = 0; // End the dump.
    +    }
    +#endif
    +
         TRACE("%s x", __FUNCTION__);
         return 0;

    mplayer -demuxer rawvideo -rawvideo w=400:h=300:i420:fps=10 before.yuv

  • 相关阅读:
    c++ 动态判断基类指针指向的子类类型(typeid)
    qt在GUI显示时,将调试信息输出到控制台的设置
    Qt库版查询
    Qt动态库静态库的创建、使用、多级库依赖、动态库改成静态库等详细说明
    ICMP timestamp 请求响应漏洞
    linux 防火墙 ufw使用
    MySQL--binlog和relay log的生成和删除
    SSD 相关基础知识
    python36--将数据保存为excel
    MySQL 5.7并发复制和mysqldump相互阻塞引起的复制延迟
  • 原文地址:https://www.cnblogs.com/eustoma/p/2415872.html
Copyright © 2011-2022 走看看