亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ppm.c

?? arm平臺下的H264編碼和解碼源代碼
?? C
字號:
/* * PPM Video Hook  * Copyright (c) 2003 Charles Yates * * This library 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 2 of the License, or (at your option) any later version. * * This library 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 this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#include <stdio.h>#include <unistd.h>#include <fcntl.h>#include <sys/types.h>#include <sys/wait.h>#include <ctype.h>#include "framehook.h"/** Bi-directional pipe structure.*/typedef struct rwpipe{    int pid;    FILE *reader;    FILE *writer;}rwpipe;/** Create a bidirectional pipe for the given command.*/rwpipe *rwpipe_open( int argc, char *argv[] ){    rwpipe *this = av_mallocz( sizeof( rwpipe ) );    if ( this != NULL )    {        int input[ 2 ];        int output[ 2 ];        pipe( input );        pipe( output );        this->pid = fork();        if ( this->pid == 0 )        {            char *command = av_mallocz( 10240 );            int i;            strcpy( command, "" );            for ( i = 0; i < argc; i ++ )            {                strcat( command, argv[ i ] );                strcat( command, " " );            }            dup2( output[ 0 ], STDIN_FILENO );            dup2( input[ 1 ], STDOUT_FILENO );            close( input[ 0 ] );            close( input[ 1 ] );            close( output[ 0 ] );            close( output[ 1 ] );            execl("/bin/sh", "sh", "-c", command, NULL );            exit( 255 );        }        else        {            close( input[ 1 ] );            close( output[ 0 ] );            this->reader = fdopen( input[ 0 ], "r" );            this->writer = fdopen( output[ 1 ], "w" );        }    }    return this;}/** Read data from the pipe.*/FILE *rwpipe_reader( rwpipe *this ){    if ( this != NULL )        return this->reader;    else        return NULL;}/** Write data to the pipe.*/FILE *rwpipe_writer( rwpipe *this ){    if ( this != NULL )        return this->writer;    else        return NULL;}/* Read a number from the pipe - assumes PNM style headers.*/int rwpipe_read_number( rwpipe *rw ){    int value = 0;    int c = 0;    FILE *in = rwpipe_reader( rw );    do     {        c = fgetc( in );        while( c != EOF && !isdigit( c ) && c != '#' )            c = fgetc( in );        if ( c == '#' )            while( c != EOF && c != '\n' )                c = fgetc( in );    }    while ( c != EOF && !isdigit( c ) );    while( c != EOF && isdigit( c ) )    {        value = value * 10 + ( c - '0' );        c = fgetc( in );    }    return value;}/** Read a PPM P6 header.*/int rwpipe_read_ppm_header( rwpipe *rw, int *width, int *height ){    char line[ 3 ];    FILE *in = rwpipe_reader( rw );    int max;    fgets( line, 3, in );    if ( !strncmp( line, "P6", 2 ) )    {        *width = rwpipe_read_number( rw );        *height = rwpipe_read_number( rw );        max = rwpipe_read_number( rw );        return max != 255 || *width <= 0 || *height <= 0;    }    return 1;}/** Close the pipe and process.*/void rwpipe_close( rwpipe *this ){    if ( this != NULL )    {        fclose( this->reader );        fclose( this->writer );        waitpid( this->pid, NULL, 0 );        av_free( this );    }}/** Context info for this vhook - stores the pipe and image buffers.*/typedef struct {    rwpipe *rw;    int size1;    char *buf1;    int size2;    char *buf2;} ContextInfo;/** Initialise the context info for this vhook.*/int Configure(void **ctxp, int argc, char *argv[]){    if ( argc > 1 )    {        *ctxp = av_mallocz(sizeof(ContextInfo));        if ( ctxp != NULL && argc > 1 )        {            ContextInfo *info = (ContextInfo *)*ctxp;            info->rw = rwpipe_open( argc - 1, &argv[ 1 ] );            return 0;        }    }    return 1;}/** Process a frame.*/void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, int64_t pts){    int err = 0;    ContextInfo *ci = (ContextInfo *) ctx;    AVPicture picture1;    AVPicture picture2;    AVPicture *pict = picture;    int out_width;    int out_height;    int i;    uint8_t *ptr = NULL;    FILE *in = rwpipe_reader( ci->rw );    FILE *out = rwpipe_writer( ci->rw );    /* Check that we have a pipe to talk to. */    if ( in == NULL || out == NULL )        err = 1;    /* Convert to RGB24 if necessary */    if ( !err && pix_fmt != PIX_FMT_RGB24 )     {        int size = avpicture_get_size(PIX_FMT_RGB24, width, height);        if ( size != ci->size1 )        {            av_free( ci->buf1 );            ci->buf1 = av_malloc(size);            ci->size1 = size;            err = ci->buf1 == NULL;        }        if ( !err )        {            avpicture_fill(&picture1, ci->buf1, PIX_FMT_RGB24, width, height);            if (img_convert(&picture1, PIX_FMT_RGB24, picture, pix_fmt, width, height) < 0)                err = 1;            pict = &picture1;        }    }    /* Write out the PPM */    if ( !err )    {        ptr = pict->data[ 0 ];        fprintf( out, "P6\n%d %d\n255\n", width, height );        for ( i = 0; !err && i < height; i ++ )        {            err = !fwrite( ptr, width * 3, 1, out );            ptr += pict->linesize[ 0 ];        }        if ( !err )            err = fflush( out );    }    /* Read the PPM returned. */    if ( !err && !rwpipe_read_ppm_header( ci->rw, &out_width, &out_height ) )    {        int size = avpicture_get_size(PIX_FMT_RGB24, out_width, out_height);        if ( size != ci->size2 )        {            av_free( ci->buf2 );            ci->buf2 = av_malloc(size);            ci->size2 = size;            err = ci->buf2 == NULL;        }        if ( !err )        {            avpicture_fill(&picture2, ci->buf2, PIX_FMT_RGB24, out_width, out_height);            ptr = picture2.data[ 0 ];            for ( i = 0; !err && i < out_height; i ++ )            {                err = !fread( ptr, out_width * 3, 1, in );                ptr += picture2.linesize[ 0 ];            }        }    }    /* Convert the returned PPM back to the input format */    if ( !err )    {        /* Actually, this is wrong, since the out_width/out_height returned from the         * filter won't necessarily be the same as width and height - img_resample          * won't scale rgb24, so the only way out of this is to convert to something          * that img_resample does like [which may or may not be pix_fmt], rescale          * and finally convert to pix_fmt... slow, but would provide the most flexibility.         *         * Currently, we take the upper left width/height pixels from the filtered image,         * smaller images are going to be corrupted or cause a crash.         *         * Finally, what should we do in case of this call failing? Up to now, failures         * are gracefully ignored and the original image is returned - in this case, a         * failure may corrupt the input.         */        if (img_convert(picture, pix_fmt, &picture2, PIX_FMT_RGB24, width, height) < 0)         {        }    }}/** Clean up the effect.*/void Release(void *ctx){    ContextInfo *ci;    ci = (ContextInfo *) ctx;    if (ctx)    {        rwpipe_close( ci->rw );        av_free( ci->buf1 );        av_free( ci->buf2 );        av_free(ctx);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区在线不卡| 亚洲黄色在线视频| 亚洲欧美视频一区| 免费在线观看日韩欧美| 成人福利电影精品一区二区在线观看 | www久久精品| 一区二区免费看| 国产69精品一区二区亚洲孕妇| 欧美图区在线视频| 中文字幕亚洲一区二区av在线| 免费美女久久99| 色诱视频网站一区| 日本一区二区三区四区| 蜜桃av噜噜一区| 在线精品视频一区二区| 国产精品久久久久久久久免费丝袜| 奇米影视在线99精品| 欧美三级中文字幕在线观看| 亚洲日本电影在线| 成人h版在线观看| 久久久综合视频| 久久精品国产在热久久| 欧美日本在线一区| 亚洲国产欧美另类丝袜| 色老汉av一区二区三区| 亚洲天堂精品视频| www.性欧美| 国产精品无圣光一区二区| 韩国精品一区二区| 欧美精品一区二| 国产一区二区在线观看免费| 精品久久国产字幕高潮| 免费在线一区观看| 日韩欧美高清一区| 久久se这里有精品| 久久综合九色综合欧美98| 激情综合网天天干| 久久久久久久久一| 国产成人精品影院| 国产精品久久久久久久久免费桃花| 国产91丝袜在线观看| 综合亚洲深深色噜噜狠狠网站| 91女神在线视频| 亚洲免费在线视频一区 二区| 日本韩国欧美在线| 亚洲国产成人91porn| 欧美欧美欧美欧美首页| 免费在线成人网| 国产亚洲精品资源在线26u| 岛国av在线一区| 亚洲欧美视频在线观看视频| 欧美色图免费看| 久久 天天综合| 国产精品美日韩| 欧洲激情一区二区| 麻豆国产精品视频| 国产欧美一区二区精品性色| 99久久国产综合色|国产精品| 亚洲免费视频成人| 日韩精品在线一区| 不卡的av在线播放| 亚洲成人动漫av| xnxx国产精品| 99精品一区二区| 美腿丝袜亚洲色图| 中文字幕中文字幕一区| 欧美日韩国产区一| 成人免费视频视频| 亚洲v日本v欧美v久久精品| 337p粉嫩大胆噜噜噜噜噜91av| 99视频热这里只有精品免费| 日本一区中文字幕 | 欧美疯狂做受xxxx富婆| 国产激情视频一区二区三区欧美 | 91美女片黄在线观看91美女| 午夜欧美在线一二页| 国产精品美女久久福利网站| 欧美一级午夜免费电影| gogo大胆日本视频一区| 日韩精品电影一区亚洲| 国产精品高清亚洲| 日韩欧美在线网站| 欧美伊人精品成人久久综合97| 国产剧情一区二区| 丝袜美腿成人在线| 亚洲欧美韩国综合色| 精品播放一区二区| 欧美人牲a欧美精品| 不卡大黄网站免费看| 久久99久久精品| 亚洲高清一区二区三区| 国产精品三级电影| 精品福利一区二区三区| 欧美日韩精品免费观看视频| 99久久久国产精品免费蜜臀| 国产成人av影院| 久久精品免费看| 亚洲一二三区在线观看| 亚洲欧洲一区二区在线播放| 久久久亚洲综合| 91麻豆精品国产综合久久久久久| 91浏览器入口在线观看| 国产+成+人+亚洲欧洲自线| 久久99九九99精品| 日本欧美大码aⅴ在线播放| 亚洲国产视频一区二区| 亚洲中国最大av网站| 中文字幕中文字幕一区| 国产精品免费网站在线观看| 欧美韩国日本不卡| 久久婷婷一区二区三区| 欧美va亚洲va香蕉在线| 在线成人小视频| 欧美老女人在线| 欧美日韩激情在线| 欧美日韩成人在线一区| 91麻豆精品国产91久久久| 欧美喷潮久久久xxxxx| 91精品国产综合久久精品| 8x福利精品第一导航| 欧美日韩aaa| 宅男在线国产精品| 日韩欧美一二三| 精品电影一区二区三区| 久久久久久久久久久黄色| 国产农村妇女精品| 国产精品成人在线观看| 夜夜操天天操亚洲| 日韩不卡免费视频| 激情综合亚洲精品| 成人av中文字幕| 在线免费亚洲电影| 欧美一区二区视频观看视频| 日韩欧美国产一区二区三区| 国产亚洲综合在线| 中文字幕一区二区三区乱码在线 | 欧美视频日韩视频在线观看| 欧美日韩的一区二区| 精品sm捆绑视频| 国产精品美日韩| 亚洲成人福利片| 激情深爱一区二区| 91在线无精精品入口| 欧美一区二区三区在线观看视频| 精品国产伦理网| 日韩理论片一区二区| 麻豆一区二区99久久久久| 成人美女视频在线观看18| 欧美午夜影院一区| 久久嫩草精品久久久精品| 亚洲免费电影在线| 麻豆精品一二三| 99精品欧美一区| 日韩欧美123| 中文字幕一区三区| 日本不卡视频一二三区| 成人精品免费视频| 在线播放日韩导航| 中文子幕无线码一区tr| 婷婷国产在线综合| 懂色一区二区三区免费观看| 欧美日韩国产免费一区二区 | 亚洲精选在线视频| 久久99精品久久久久久动态图| 99综合电影在线视频| 欧美一区二区三区视频免费 | 亚洲成人精品在线观看| 色综合 综合色| 日韩一区二区三区视频在线| 国产日韩欧美a| 日日夜夜精品视频免费| 成人美女视频在线观看18| 欧美一区二区三区免费视频| 国产精品对白交换视频| 日韩av一区二| 色综合久久天天综合网| 久久精品亚洲乱码伦伦中文 | 久久精品一区二区| 亚洲不卡av一区二区三区| a美女胸又www黄视频久久| 2023国产一二三区日本精品2022| 五月天精品一区二区三区| 色综合天天做天天爱| 国产夜色精品一区二区av| 精品系列免费在线观看| 欧美精品在欧美一区二区少妇| 国产精品成人午夜| 成人一区二区三区视频在线观看 | 91精品国产综合久久香蕉麻豆| 最新国产の精品合集bt伙计| 福利一区福利二区| 久久理论电影网| 精品一区二区三区在线观看| 7777精品伊人久久久大香线蕉 | 蜜桃精品在线观看| 欧美日韩免费一区二区三区视频| 中文字幕一区二区三区乱码在线| 成人手机电影网| 国产精品九色蝌蚪自拍| 丁香六月综合激情|