[svn] / branches / dev-api-4 / xvidcore / src / plugins / plugin_dump.c Repository:
ViewVC logotype

View of /branches/dev-api-4/xvidcore/src/plugins/plugin_dump.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 921 - (download) (annotate)
Sat Mar 15 14:38:34 2003 UTC (16 years, 2 months ago) by suxen_drol
File size: 1187 byte(s)
enc_encode CLOSE_GOP fixed, further cleanup
XVID_REQORIGINAL plugin support
plugin examples: xvid_plugin_psnr, xvid_plugin_dump
#include "../xvid.h"
#include "../image/image.h"


int xvid_plugin_dump(void * handle, int opt, void * param1, void * param2)
{
    switch(opt)
    {
    case XVID_PLG_INFO :
        {
        xvid_plg_info_t * info = (xvid_plg_info_t*)param1;
        info->flags = XVID_REQORIGINAL;
        return 0;
        }

    case XVID_PLG_CREATE :
    case XVID_PLG_DESTROY :
    case XVID_PLG_BEFORE :
       return 0;

    case XVID_PLG_AFTER :
       {
           xvid_plg_data_t * data = (xvid_plg_data_t*)param1;
           IMAGE img;
           char tmp[100];
           img.y = data->original.plane[0];
           img.u = data->original.plane[1];
           img.v = data->original.plane[2];
           sprintf(tmp, "ori-%03i.pgm", data->frame_num);
           image_dump_yuvpgm(&img, data->original.stride[0], data->width, data->height, tmp);

           img.y = data->current.plane[0];
           img.u = data->current.plane[1];
           img.v = data->current.plane[2];
           sprintf(tmp, "enc-%03i.pgm", data->frame_num);
           image_dump_yuvpgm(&img, data->reference.stride[0], data->width, data->height, tmp);
       }

       return 0;
    }

    return XVID_ERR_FAIL;
}

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4