跳转至内容
0
  • 版块
  • 讨论
  • 最新
  • 标签
  • 热门
  • 顶端
  • 用户
  • 版块
  • 讨论
  • 最新
  • 标签
  • 热门
  • 顶端
  • 用户
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Zephyr)
  • 不使用皮肤
折叠
JIKE社区
G

Griffin

@Griffin
🍌
关于
帖子
155
主题
5
分享
0
群组
1
粉丝
1
关注
0

帖子

最新 最佳 有争议的

  • 影音书籍版块的帖子好烦啊😡
    G Griffin

    一键标记为已读

    水区乐园

  • 老电视不支持U盘读取mkv格式怎么办?
    G Griffin

    买盒子

    技术专区

  • LOL免费改名了!
    G Griffin

    我以为手游

    活动优惠

  • C 查理和巧克力工厂 国语中字 蓝光 Wiki.压制
    G Griffin

    怎么不是阿里云

    影音书籍

  • 中国电信发车:全国90%用户均可开通,长期5元包全国30G流量,带黄金500Mbps速率
    G Griffin

    现在的流量也用不完呀

    活动优惠 中国电信

  • 本社区终于可以向 @ChatGPT 提问了!
    G Griffin

    @ChatGPT
    下面c语言代码,使用strncpy替换strcpy,使用snprintf替换sprintf
    void replace_all(char *str, const char *orig, const char *rep) {
    static char buffer[4096];
    char *p = str;
    size_t orig_len = strlen(orig);
    size_t rep_len = strlen(rep);
    while ((p = strstr(p, orig))) {
    strncpy(buffer, str, p - str);
    buffer[p - str] = '\0';
    sprintf(buffer + (p - str), "%s%s", rep, p + orig_len);
    strcpy(str, buffer);
    p = str + (p - str) + rep_len;
    }
    }

    技术专区

  • 本社区终于可以向 @ChatGPT 提问了!
    G Griffin

    @ChatGPT 请基于下面的代码修改
    char linearToALawSample(short sample)
    {
    int sign;
    int exponent;
    int mantissa;
    int s;
    sign = ((~sample) >> 😎 & 0x80;
    if (!(sign == 0x80))
    {
    sample = (short)-sample;
    }
    if (sample > cClip)
    {
    sample = cClip;
    }
    if (sample >= 256)
    {
    exponent = (int)aLawCompressTable[(sample >> 😎 & 0x7F];
    mantissa = (sample >> (exponent + 3)) & 0x0F;
    s = (exponent << 4) | mantissa;
    }
    else
    {
    s = sample >> 4;
    }
    s ^= (sign ^ 0x55);
    return (char)s;
    }

    int g711a_Encode(char *src, int offset, int len, char *res)
    {
    int j = offset;
    int count = len / 2;
    short sample = 0;
    int i = 0;
    for (i = 0; i < count; i++)
    {
    sample = (short)(((src[j++] & 0xff) | (src[j++]) << 8));
    res[i] = linearToALawSample(sample);
    }
    return count;
    }

    技术专区

  • 本社区终于可以向 @ChatGPT 提问了!
    G Griffin

    @ChatGPT 请基于下面的代码修改
    char linearToALawSample(short sample)
    {
    int sign;
    int exponent;
    int mantissa;
    int s;
    sign = ((~sample) >> 😎 & 0x80;
    if (!(sign == 0x80))
    {
    sample = (short)-sample;
    }
    if (sample > cClip)
    {
    sample = cClip;
    }
    if (sample >= 256)
    {
    exponent = (int)aLawCompressTable[(sample >> 😎 & 0x7F];
    mantissa = (sample >> (exponent + 3)) & 0x0F;
    s = (exponent << 4) | mantissa;
    }
    else
    {
    s = sample >> 4;
    }
    s ^= (sign ^ 0x55);
    return (char)s;
    }

    int g711a_Encode(char *src, int offset, int len, char *res)
    {
    int j = offset;
    int count = len / 2;
    short sample = 0;
    int i = 0;
    for (i = 0; i < count; i++)
    {
    sample = (short)(((src[j++] & 0xff) | (src[j++]) << 8));
    res[i] = linearToALawSample(sample);
    }
    return count;
    }

    技术专区

  • 本社区终于可以向 @ChatGPT 提问了!
    G Griffin

    @ChatGPT 请基于下面的代码做修改
    char linearToALawSample(short sample)
    {
    int sign;
    int exponent;
    int mantissa;
    int s;
    sign = ((~sample) >> 😎 & 0x80;
    if (!(sign == 0x80))
    {
    sample = (short)-sample;
    }
    if (sample > cClip)
    {
    sample = cClip;
    }
    if (sample >= 256)
    {
    exponent = (int)aLawCompressTable[(sample >> 😎 & 0x7F];
    mantissa = (sample >> (exponent + 3)) & 0x0F;
    s = (exponent << 4) | mantissa;
    }
    else
    {
    s = sample >> 4;
    }
    s ^= (sign ^ 0x55);
    return (char)s;
    }

    int g711a_Encode(char *src, int offset, int len, char *res)
    {
    int j = offset;
    int count = len / 2;
    short sample = 0;
    int i = 0;
    for (i = 0; i < count; i++)
    {
    sample = (short)(((src[j++] & 0xff) | (src[j++]) << 8));
    if (i % 2 == 0)
    {
    res[i / 2] = linearToALawSample(sample);
    }
    }
    return count;
    }

    技术专区

  • 本社区终于可以向 @ChatGPT 提问了!
    G Griffin

    @ChatGPT 这个实现看起来并不是很完整,能否再优化下

    技术专区

  • 本社区终于可以向 @ChatGPT 提问了!
    G Griffin

    @ChatGPT 用C语言实现 16K PCM数据转 8K G711A

    技术专区

  • 斗破苍穹·觉醒 (2023) 4K 动作 奇幻 电影
    G Griffin

    阿里的资源不对,都发好几次了

    影音书籍

  • 本社区终于可以向 @ChatGPT 提问了!
    G Griffin

    @ChatGPT
    写一篇关于 一种基于摄像头的花草种植方案 的专利,按照如下模块陈述:
    1.做这项发明之前该技术现状的详细描述
    2.请用一段话描述本发明相对于现有技术的改进之处
    3.指出背景技术在哪些地方存在哪些缺陷和不足
    4.通过怎样的技术手段和方法解决的上述技术问题

    技术专区

  • 本社区终于可以向 @ChatGPT 提问了!
    G Griffin

    @ChatGPT

    技术专区

  • 贵阳三网发布公告,不再办理低于59元/月的套餐
    G Griffin

    什么操作,难道诈骗只用贵阳的卡

    活动优惠

  • 京东东12箱牛奶或12箱鸡蛋
    G Griffin

    上海无货

    活动优惠

  • 39元开京东PLUS会员
    G Griffin

    活动已结束或不存在

    活动优惠

  • 京东Plus会员BUG了,仅39元一年!速速上车!
    G Griffin

    领到了

    活动优惠

  • 异人之下 4K60FPS 更新17集
    G Griffin

    天天等你的更新

    影音书籍

  • 阿里云盘有啥划算充值渠道没?
    G Griffin

    阿里云盘有啥划算充值渠道没?

    Jao易市场
  • 1 / 1
  • 登录

  • 没有帐号? 注册

  • 登录或注册以进行搜索。
百度网盘
1,439 个主题
连续剧
751 个主题
国产剧
590 个主题
美剧
355 个主题
中国移动
307 个主题
动画片
258 个主题
中国电信
222 个主题
动作片
215 个主题

146

在线

40.6k

用户

40.4k

主题

110.9k

帖子
  • 第一个帖子
    最后一个帖子