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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ppm.c

?? ffmpeg移植到symbian的全部源代碼
?? C
字號(hào):
/* * PPM Video Hook * Copyright (c) 2003 Charles Yates * * This file is part of FFmpeg. * * FFmpeg 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.1 of the License, or (at your option) any later version. * * FFmpeg 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 FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */#include <stdio.h>#include <unistd.h>#include <fcntl.h>#include <sys/types.h>#include <sys/wait.h>#include <ctype.h>#include "libavutil/avstring.h"#include "libavformat/framehook.h"#include "libavformat/avformat.h"#include "libswscale/swscale.h"static int sws_flags = SWS_BICUBIC;/** Bi-directional pipe structure.*/typedef struct rwpipe{    int pid;    FILE *reader;    FILE *writer;}rwpipe;/** Create a bidirectional pipe for the given command.*/static 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 )        {#define COMMAND_SIZE 10240            char *command = av_mallocz( COMMAND_SIZE );            int i;            strcpy( command, "" );            for ( i = 0; i < argc; i ++ )            {                av_strlcat( command, argv[ i ], COMMAND_SIZE );                av_strlcat( command, " ", COMMAND_SIZE );            }            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, (char*)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.*/static FILE *rwpipe_reader( rwpipe *this ){    if ( this != NULL )        return this->reader;    else        return NULL;}/** Write data to the pipe.*/static FILE *rwpipe_writer( rwpipe *this ){    if ( this != NULL )        return this->writer;    else        return NULL;}/* Read a number from the pipe - assumes PNM style headers.*/static 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.*/static 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.*/static 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;    // This vhook first converts frame to RGB ...    struct SwsContext *toRGB_convert_ctx;    // ... then processes it via a PPM command pipe ...    // ... and finally converts back frame from RGB to initial format    struct SwsContext *fromRGB_convert_ctx;}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 we already got a SWS context, let's realloc if is not re-useable            ci->toRGB_convert_ctx = sws_getCachedContext(ci->toRGB_convert_ctx,                                        width, height, pix_fmt,                                        width, height, PIX_FMT_RGB24,                                        sws_flags, NULL, NULL, NULL);            if (ci->toRGB_convert_ctx == NULL) {                av_log(NULL, AV_LOG_ERROR,                       "Cannot initialize the toRGB conversion context\n");                return;            }// img_convert parameters are          2 first destination, then 4 source// sws_scale   parameters are context, 4 first source,      then 2 destination            sws_scale(ci->toRGB_convert_ctx,                     picture->data, picture->linesize, 0, height,                     picture1.data, picture1.linesize);            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 )    {        /* The out_width/out_height returned from the PPM         * filter won't necessarily be the same as width and height         * but it will be scaled anyway to width/height.         */        av_log(NULL, AV_LOG_DEBUG,                  "PPM vhook: Input dimensions: %d x %d Output dimensions: %d x %d\n",                  width, height, out_width, out_height);        ci->fromRGB_convert_ctx = sws_getCachedContext(ci->fromRGB_convert_ctx,                                        out_width, out_height, PIX_FMT_RGB24,                                        width,     height,     pix_fmt,                                        sws_flags, NULL, NULL, NULL);        if (ci->fromRGB_convert_ctx == NULL) {            av_log(NULL, AV_LOG_ERROR,                   "Cannot initialize the fromRGB conversion context\n");            return;        }// img_convert parameters are          2 first destination, then 4 source// sws_scale   parameters are context, 4 first source,      then 2 destination        sws_scale(ci->fromRGB_convert_ctx,                 picture2.data, picture2.linesize, 0, out_height,                 picture->data, picture->linesize);    }}/** 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 );        sws_freeContext(ci->toRGB_convert_ctx);        sws_freeContext(ci->fromRGB_convert_ctx);        av_free(ctx);    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品情趣视频| 国产欧美一区二区精品婷婷| 免费成人在线观看| 国产精品二区一区二区aⅴ污介绍| 欧美日韩在线播| 成人精品免费网站| 免费在线看一区| 亚洲精品国产高清久久伦理二区| 国产亚洲福利社区一区| 欧美一区二区性放荡片| 在线亚洲免费视频| 成人av网在线| 国产精品资源网| 蜜臀a∨国产成人精品| 亚洲国产欧美日韩另类综合 | 国产日韩欧美激情| 日韩欧美国产三级| 欧美高清hd18日本| 欧美调教femdomvk| 色婷婷亚洲综合| 91首页免费视频| 不卡av在线免费观看| 国产一区 二区| 国精产品一区一区三区mba视频| 免费不卡在线观看| 视频一区视频二区中文| 亚洲一区二区在线视频| 一区二区三区不卡在线观看| 中文字幕视频一区| 中文在线资源观看网站视频免费不卡| 精品国产三级a在线观看| 欧美一区二区三区视频在线| 欧美精品亚洲二区| 欧美剧情片在线观看| 欧美日韩一级大片网址| 欧美在线小视频| 欧美色图天堂网| 欧美在线视频日韩| 欧美日韩国产一级| 日韩亚洲电影在线| 精品卡一卡二卡三卡四在线| 精品国产sm最大网站免费看| 久久综合久久99| 国产欧美久久久精品影院 | 亚洲国产综合91精品麻豆| 亚洲午夜一区二区| 亚洲成人你懂的| 三级影片在线观看欧美日韩一区二区 | 99久久综合99久久综合网站| 波多野结衣一区二区三区| av在线免费不卡| 欧美主播一区二区三区美女| 欧美人伦禁忌dvd放荡欲情| 欧美人与禽zozo性伦| 4hu四虎永久在线影院成人| 日韩免费在线观看| 久久久久久电影| 亚洲人被黑人高潮完整版| 亚洲国产一区二区视频| 奇米777欧美一区二区| 国内外精品视频| av成人动漫在线观看| 欧美四级电影网| 欧美一级二级在线观看| 国产欧美日韩精品一区| 一区二区三区精品久久久| 日韩成人一级大片| 国产精品一二二区| 色素色在线综合| 日韩丝袜情趣美女图片| 国产欧美精品一区二区色综合| 亚洲激情av在线| 麻豆精品一区二区av白丝在线| 国产大陆精品国产| 欧美日韩精品欧美日韩精品| 久久综合久久鬼色| 亚洲国产视频一区二区| 国产久卡久卡久卡久卡视频精品| 91小视频在线免费看| 欧美一区二区三区四区高清| 欧美国产精品专区| 午夜久久久影院| 东方aⅴ免费观看久久av| 欧美日韩亚洲综合| 国产精品久久久久一区二区三区| 亚洲观看高清完整版在线观看| 精品一区二区国语对白| 欧美性受xxxx黑人xyx| 久久久99精品免费观看不卡| 五月天久久比比资源色| 成人黄色电影在线| 欧美α欧美αv大片| 一区二区三区欧美亚洲| 国产麻豆精品久久一二三| 欧美在线综合视频| 国产亚洲视频系列| 免费看黄色91| 欧美优质美女网站| 国产日韩欧美精品综合| 蓝色福利精品导航| 欧美中文字幕不卡| 亚洲男同1069视频| 国产成人免费视频精品含羞草妖精 | 视频一区在线播放| 色屁屁一区二区| 欧美国产视频在线| 麻豆极品一区二区三区| 91福利国产精品| 亚洲视频1区2区| 国产成人一级电影| 91精品国产aⅴ一区二区| 亚洲精品午夜久久久| 成人中文字幕在线| 欧美精品一区二区精品网| 日韩精彩视频在线观看| 欧美色中文字幕| 一区二区在线观看视频| av影院午夜一区| **性色生活片久久毛片| 成人激情免费网站| 国产欧美一区二区精品性色超碰| 国内精品在线播放| 精品国产一区二区三区av性色| 日本v片在线高清不卡在线观看| 欧美日韩在线播放| 香港成人在线视频| 欧美日韩高清一区| 午夜影院久久久| 欧美日韩三级在线| 午夜激情一区二区| 91麻豆精品国产| 三级不卡在线观看| 51午夜精品国产| 看电视剧不卡顿的网站| 日韩欧美高清在线| 狠狠色2019综合网| 久久精品一区二区三区av| 国产不卡免费视频| 国产精品麻豆久久久| 97精品国产97久久久久久久久久久久| 国产精品免费观看视频| yourporn久久国产精品| 中文字幕一区二区不卡| 91在线一区二区三区| 一区二区三区精品在线| 欧美精三区欧美精三区| 美女在线一区二区| 久久久美女艺术照精彩视频福利播放| 激情成人午夜视频| 中文字幕二三区不卡| 91日韩在线专区| 亚洲成人久久影院| 日韩三级视频中文字幕| 国内精品伊人久久久久av影院 | 日韩av电影免费观看高清完整版| 91精品国产全国免费观看 | 欧美日韩一卡二卡三卡| 肉丝袜脚交视频一区二区| 欧美变态凌虐bdsm| 不卡一区中文字幕| 亚洲福利一二三区| 久久综合久久综合久久综合| 成人av资源在线观看| 亚洲一本大道在线| 亚洲精品一区二区三区精华液 | 在线观看不卡视频| 精品一区二区日韩| 亚洲色图一区二区三区| 51精品视频一区二区三区| 国产黄色91视频| 亚洲国产精品久久一线不卡| 精品久久久久99| 色悠悠久久综合| 精品在线播放午夜| 亚洲图片激情小说| 337p亚洲精品色噜噜| 成人手机电影网| 日韩av电影免费观看高清完整版在线观看| 久久久久久99久久久精品网站| 色噜噜狠狠色综合欧洲selulu| 麻豆91免费观看| 亚洲欧美激情小说另类| 日韩精品一区在线观看| 色综合久久久网| 久久电影网电视剧免费观看| 亚洲私人影院在线观看| 欧美成人伊人久久综合网| 一本色道久久综合亚洲91| 国产在线视频一区二区三区| 亚洲国产精品一区二区尤物区| 国产欧美一区二区精品性| 这里只有精品免费| 91在线视频在线| 国产一区二三区| 日本亚洲欧美天堂免费| 中文字幕一区二区三中文字幕| 久久夜色精品国产欧美乱极品| 欧美日韩一级二级| 91论坛在线播放| 粉嫩av一区二区三区在线播放|