mirror of
https://github.com/game-stop/veejay.git
synced 2026-06-16 04:31:23 +02:00
reimplemented lzo yuv for realtime data (de)compression. works well for high definition video
git-svn-id: svn://code.dyne.org/veejay/trunk@713 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
@@ -9,4 +9,4 @@ INCLUDES = -I$(top_srcdir) -I$(includedir) -I$(top_srcdir)/vjmem \
|
||||
|
||||
VJEL_LIB_FILE = libel.la
|
||||
noinst_LTLIBRARIES = $(VJEL_LIB_FILE)
|
||||
libel_la_SOURCES = vj-mmap.c elcache.c avilib.c lav_io.c vj-dv.c rawdv.c pixbuf.c vj-avcodec.c vj-avformat.c vj-el.c
|
||||
libel_la_SOURCES = minilzo.c lzo.c vj-mmap.c elcache.c avilib.c lav_io.c vj-dv.c rawdv.c pixbuf.c vj-avcodec.c vj-avformat.c vj-el.c
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <quicktime.h>
|
||||
#include <lqt.h>
|
||||
#include <lqt/colormodels.h>
|
||||
#include <libel/lzo.h>
|
||||
#define QUICKTIME_MJPG_TAG 0x6d6a7067
|
||||
#endif
|
||||
|
||||
@@ -290,6 +291,7 @@ int lav_query_polarity(char format)
|
||||
case 'd': return LAV_INTER_BOTTOM_FIRST; // DV, interlaced
|
||||
case 'j': return LAV_INTER_TOP_FIRST;
|
||||
case 'q': return LAV_INTER_TOP_FIRST;
|
||||
case 'L': return LAV_NOT_INTERLACED;
|
||||
case 'm': return LAV_INTER_TOP_FIRST;
|
||||
case 'x': return LAV_NOT_INTERLACED; // picture is always not interlaced
|
||||
default: return LAV_INTER_TOP_FIRST;
|
||||
@@ -339,6 +341,18 @@ lav_file_t *lav_open_output_file(char *filename, char format,
|
||||
if (asize)
|
||||
AVI_set_audio(lav_fd->avi_fd, achans, arate, asize, WAVE_FORMAT_PCM);
|
||||
return lav_fd;
|
||||
case 'L':
|
||||
veejay_msg(VEEJAY_MSG_DEBUG,"\tWriting output file in AVI LZO");
|
||||
lav_fd->avi_fd=AVI_open_output_file(filename);
|
||||
if(!lav_fd->avi_fd)
|
||||
{
|
||||
free(lav_fd);
|
||||
return NULL;
|
||||
}
|
||||
AVI_set_video(lav_fd->avi_fd, width,height,fps, "mlzo");
|
||||
if(asize)
|
||||
AVI_set_audio(lav_fd->avi_fd, achans,arate,asize,WAVE_FORMAT_PCM);
|
||||
return lav_fd;
|
||||
case 'Y':
|
||||
veejay_msg(VEEJAY_MSG_DEBUG,"\tWriting output file in AVI IYUV");
|
||||
lav_fd->avi_fd = AVI_open_output_file(filename);
|
||||
@@ -588,7 +602,8 @@ int lav_write_frame(lav_file_t *lav_file, uint8_t *buff, long size, long count)
|
||||
case 'M':
|
||||
case 'P':
|
||||
case 'D':
|
||||
case 'Y':
|
||||
case 'Y':
|
||||
case 'L':
|
||||
if(n==0)
|
||||
res = AVI_write_frame( lav_file->avi_fd, buff, size );
|
||||
else
|
||||
@@ -648,6 +663,7 @@ int lav_write_audio(lav_file_t *lav_file, uint8_t *buff, long samps)
|
||||
#endif
|
||||
case 'a':
|
||||
case 'A':
|
||||
case 'L':
|
||||
return AVI_write_audio( lav_file->avi_fd, buff, samps*lav_file->bps);
|
||||
}
|
||||
return 0;
|
||||
@@ -664,6 +680,7 @@ long lav_video_frames(lav_file_t *lav_file)
|
||||
case 'Y':
|
||||
case 'D':
|
||||
case 'M':
|
||||
case 'L':
|
||||
case 'A':
|
||||
case 'a':
|
||||
return AVI_video_frames( lav_file->avi_fd );
|
||||
@@ -692,6 +709,7 @@ int lav_video_width(lav_file_t *lav_file)
|
||||
case 'A':
|
||||
case 'P':
|
||||
case 'M':
|
||||
case 'L':
|
||||
case 'D':
|
||||
case 'Y':
|
||||
return AVI_video_width(lav_file->avi_fd);
|
||||
@@ -720,6 +738,7 @@ int lav_video_height(lav_file_t *lav_file)
|
||||
case 'A':
|
||||
case 'P':
|
||||
case 'M':
|
||||
case 'L':
|
||||
case 'D':
|
||||
case 'Y':
|
||||
return AVI_video_height(lav_file->avi_fd);
|
||||
@@ -877,6 +896,10 @@ const char *lav_video_compressor(lav_file_t *lav_file)
|
||||
return tmp;
|
||||
}
|
||||
#endif
|
||||
if( video_format == 'L' )
|
||||
{
|
||||
return (strdup("mlzo"));
|
||||
}
|
||||
#ifdef HAVE_LIBQUICKTIME
|
||||
if(lav_file->format == 'q')
|
||||
return quicktime_video_compressor(lav_file->qt_fd,0);
|
||||
@@ -1449,6 +1472,13 @@ lav_file_t *lav_open_input_file(char *filename, int mmap_size)
|
||||
lav_fd->interlacing = LAV_NOT_INTERLACED;
|
||||
return lav_fd;
|
||||
}
|
||||
|
||||
if( strncasecmp( video_comp, "mlzo", 4 ) == 0 )
|
||||
{
|
||||
lav_fd->MJPG_chroma = CHROMA422;
|
||||
lav_fd->interlacing = LAV_NOT_INTERLACED;
|
||||
return lav_fd;
|
||||
}
|
||||
|
||||
if ( strncasecmp(video_comp,"dvsd",4)==0 ||
|
||||
strncasecmp(video_comp,"dvcp",4) ==0 ||
|
||||
@@ -1680,6 +1710,7 @@ const char *lav_strerror(void)
|
||||
case 'Y':
|
||||
case 'M':
|
||||
case 'P':
|
||||
case 'L':
|
||||
case 'D':
|
||||
return AVI_strerror();
|
||||
default:
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/* veejay - Linux VeeJay
|
||||
* (C) 2002-2006 Niels Elburg <nelburg@looze.net>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libel/lzoconf.h>
|
||||
#include <libvje/vje.h>
|
||||
#include <libvjmem/vjmem.h>
|
||||
#include <libvjmsg/vj-common.h>
|
||||
#include <libel/minilzo.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
lzo_byte *wrkmem;
|
||||
} lzot;
|
||||
|
||||
void lzo_free( void *lzo )
|
||||
{
|
||||
lzot *l = (lzot*) lzo;
|
||||
if(l)
|
||||
{
|
||||
if(l->wrkmem)
|
||||
free(l->wrkmem);
|
||||
free(l);
|
||||
}
|
||||
l = NULL;
|
||||
}
|
||||
|
||||
void *lzo_new( )
|
||||
{
|
||||
lzot *l = (lzot*) vj_calloc(sizeof(lzot));
|
||||
if (lzo_init() != LZO_E_OK)
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Unable to initialize LZO. Could be buggy compiler");
|
||||
free( l );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
l->wrkmem = (lzo_bytep)
|
||||
vj_malloc( LZO1X_1_MEM_COMPRESS );
|
||||
|
||||
if(l->wrkmem == NULL )
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Cannot allocate work memory for LZO1X_1");
|
||||
if(l) free(l);
|
||||
return NULL;
|
||||
}
|
||||
veejay_msg(VEEJAY_MSG_INFO,"LZO real-time data compression library (v%s, %s).",
|
||||
lzo_version_string(), lzo_version_date());
|
||||
|
||||
return (void*) l;
|
||||
}
|
||||
|
||||
static uint32_t str2ulong(unsigned char *str)
|
||||
{
|
||||
return ( str[0] | (str[1]<<8) | (str[2]<<16) | (str[3]<<24) );
|
||||
}
|
||||
|
||||
int lzo_compress( void *lzo, uint8_t *src, uint8_t *plane, unsigned int *size, int ilen )
|
||||
{
|
||||
lzo_uint out_len =0;
|
||||
lzo_uint len = ilen;
|
||||
lzot *l = (lzot*) lzo;
|
||||
lzo_bytep dst = plane;
|
||||
lzo_uintp dst_len = (lzo_uintp) size;
|
||||
lzo_voidp wrkmem = l->wrkmem;
|
||||
int r = lzo1x_1_compress( src, len, dst, dst_len, l->wrkmem );
|
||||
if( r != LZO_E_OK )
|
||||
return 0;
|
||||
if( *size >= len )
|
||||
veejay_msg(VEEJAY_MSG_WARNING, "Block contains incompressible data");
|
||||
return (*size);
|
||||
}
|
||||
|
||||
long lzo_decompress( void *lzo, uint8_t *linbuf, int linbuf_len, uint8_t *dst[3] )
|
||||
{
|
||||
int i;
|
||||
lzo_uint len[3] = { 0,0,0};
|
||||
int sum = 0;
|
||||
lzot *l = (lzot*) lzo;
|
||||
lzo_uint result_len = 0;
|
||||
lzo_uint offset = 0;
|
||||
|
||||
len[0] = str2ulong( linbuf );
|
||||
len[1] = str2ulong( linbuf+4 );
|
||||
len[2] = str2ulong( linbuf+8 );
|
||||
|
||||
for( i = 0; i <= 2; i ++ )
|
||||
{
|
||||
const lzo_bytep src = (lzo_bytep) (linbuf+12+offset);
|
||||
int r = lzo1x_decompress( src, len[i], dst[i], &result_len, l->wrkmem );
|
||||
if( r != LZO_E_OK )
|
||||
return 0;
|
||||
sum += result_len;
|
||||
offset += len[i];
|
||||
}
|
||||
return (long)sum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* veejay - Linux VeeJay
|
||||
* (C) 2002-2005 Niels Elburg <nelburg@looze.net>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef LZOH
|
||||
#define LZOH
|
||||
|
||||
void *lzo_new( );
|
||||
|
||||
void lzo_free( void *lzo );
|
||||
|
||||
int lzo_compress( void *lzo, uint8_t *src, uint8_t *plane, unsigned int *size, int ilen );
|
||||
|
||||
long lzo_decompress( void *lzo, uint8_t *linbuf, int linbuf_len,uint8_t *dst[3] );
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,413 @@
|
||||
/* lzoconf.h -- configuration for the LZO real-time data compression library
|
||||
|
||||
This file is part of the LZO real-time data compression library.
|
||||
|
||||
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
The LZO library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
The LZO 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the LZO library; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LZOCONF_H_INCLUDED
|
||||
#define __LZOCONF_H_INCLUDED
|
||||
|
||||
#define LZO_VERSION 0x2020
|
||||
#define LZO_VERSION_STRING "2.02"
|
||||
#define LZO_VERSION_DATE "Oct 17 2005"
|
||||
|
||||
/* internal Autoconf configuration file - only used when building LZO */
|
||||
#if defined(LZO_HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// LZO requires a conforming <limits.h>
|
||||
************************************************************************/
|
||||
|
||||
#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
|
||||
# error "invalid CHAR_BIT"
|
||||
#endif
|
||||
#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX)
|
||||
# error "check your compiler installation"
|
||||
#endif
|
||||
#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1)
|
||||
# error "your limits.h macros are broken"
|
||||
#endif
|
||||
|
||||
/* get OS and architecture defines */
|
||||
#ifndef __LZODEFS_H_INCLUDED
|
||||
#include "lzodefs.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// some core defines
|
||||
************************************************************************/
|
||||
|
||||
#if !defined(LZO_UINT32_C)
|
||||
# if (UINT_MAX < LZO_0xffffffffL)
|
||||
# define LZO_UINT32_C(c) c ## UL
|
||||
# else
|
||||
# define LZO_UINT32_C(c) ((c) + 0U)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* memory checkers */
|
||||
#if !defined(__LZO_CHECKER)
|
||||
# if defined(__BOUNDS_CHECKING_ON)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__CHECKER__)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__INSURE__)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__PURIFY__)
|
||||
# define __LZO_CHECKER 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// integral and pointer types
|
||||
************************************************************************/
|
||||
|
||||
/* lzo_uint should match size_t */
|
||||
#if !defined(LZO_UINT_MAX)
|
||||
# if defined(LZO_ABI_LLP64) /* WIN64 */
|
||||
# if defined(LZO_OS_WIN64)
|
||||
typedef unsigned __int64 lzo_uint;
|
||||
typedef __int64 lzo_int;
|
||||
# else
|
||||
typedef unsigned long long lzo_uint;
|
||||
typedef long long lzo_int;
|
||||
# endif
|
||||
# define LZO_UINT_MAX 0xffffffffffffffffull
|
||||
# define LZO_INT_MAX 9223372036854775807LL
|
||||
# define LZO_INT_MIN (-1LL - LZO_INT_MAX)
|
||||
# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */
|
||||
typedef unsigned int lzo_uint;
|
||||
typedef int lzo_int;
|
||||
# define LZO_UINT_MAX UINT_MAX
|
||||
# define LZO_INT_MAX INT_MAX
|
||||
# define LZO_INT_MIN INT_MIN
|
||||
# elif (ULONG_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned long lzo_uint;
|
||||
typedef long lzo_int;
|
||||
# define LZO_UINT_MAX ULONG_MAX
|
||||
# define LZO_INT_MAX LONG_MAX
|
||||
# define LZO_INT_MIN LONG_MIN
|
||||
# else
|
||||
# error "lzo_uint"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Integral types with 32 bits or more. */
|
||||
#if !defined(LZO_UINT32_MAX)
|
||||
# if (UINT_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned int lzo_uint32;
|
||||
typedef int lzo_int32;
|
||||
# define LZO_UINT32_MAX UINT_MAX
|
||||
# define LZO_INT32_MAX INT_MAX
|
||||
# define LZO_INT32_MIN INT_MIN
|
||||
# elif (ULONG_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned long lzo_uint32;
|
||||
typedef long lzo_int32;
|
||||
# define LZO_UINT32_MAX ULONG_MAX
|
||||
# define LZO_INT32_MAX LONG_MAX
|
||||
# define LZO_INT32_MIN LONG_MIN
|
||||
# else
|
||||
# error "lzo_uint32"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The larger type of lzo_uint and lzo_uint32. */
|
||||
#if (LZO_UINT_MAX >= LZO_UINT32_MAX)
|
||||
# define lzo_xint lzo_uint
|
||||
#else
|
||||
# define lzo_xint lzo_uint32
|
||||
#endif
|
||||
|
||||
/* Memory model that allows to access memory at offsets of lzo_uint. */
|
||||
#if !defined(__LZO_MMODEL)
|
||||
# if (LZO_UINT_MAX <= UINT_MAX)
|
||||
# define __LZO_MMODEL
|
||||
# elif defined(LZO_HAVE_MM_HUGE_PTR)
|
||||
# define __LZO_MMODEL_HUGE 1
|
||||
# define __LZO_MMODEL __huge
|
||||
# else
|
||||
# define __LZO_MMODEL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* no typedef here because of const-pointer issues */
|
||||
#define lzo_bytep unsigned char __LZO_MMODEL *
|
||||
#define lzo_charp char __LZO_MMODEL *
|
||||
#define lzo_voidp void __LZO_MMODEL *
|
||||
#define lzo_shortp short __LZO_MMODEL *
|
||||
#define lzo_ushortp unsigned short __LZO_MMODEL *
|
||||
#define lzo_uint32p lzo_uint32 __LZO_MMODEL *
|
||||
#define lzo_int32p lzo_int32 __LZO_MMODEL *
|
||||
#define lzo_uintp lzo_uint __LZO_MMODEL *
|
||||
#define lzo_intp lzo_int __LZO_MMODEL *
|
||||
#define lzo_xintp lzo_xint __LZO_MMODEL *
|
||||
#define lzo_voidpp lzo_voidp __LZO_MMODEL *
|
||||
#define lzo_bytepp lzo_bytep __LZO_MMODEL *
|
||||
/* deprecated - use `lzo_bytep' instead of `lzo_byte *' */
|
||||
#define lzo_byte unsigned char __LZO_MMODEL
|
||||
|
||||
typedef int lzo_bool;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// function types
|
||||
************************************************************************/
|
||||
|
||||
/* name mangling */
|
||||
#if !defined(__LZO_EXTERN_C)
|
||||
# ifdef __cplusplus
|
||||
# define __LZO_EXTERN_C extern "C"
|
||||
# else
|
||||
# define __LZO_EXTERN_C extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* calling convention */
|
||||
#if !defined(__LZO_CDECL)
|
||||
# define __LZO_CDECL __lzo_cdecl
|
||||
#endif
|
||||
|
||||
/* DLL export information */
|
||||
#if !defined(__LZO_EXPORT1)
|
||||
# define __LZO_EXPORT1
|
||||
#endif
|
||||
#if !defined(__LZO_EXPORT2)
|
||||
# define __LZO_EXPORT2
|
||||
#endif
|
||||
|
||||
/* __cdecl calling convention for public C and assembly functions */
|
||||
#if !defined(LZO_PUBLIC)
|
||||
# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
|
||||
#endif
|
||||
#if !defined(LZO_EXTERN)
|
||||
# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
|
||||
#endif
|
||||
#if !defined(LZO_PRIVATE)
|
||||
# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL
|
||||
#endif
|
||||
|
||||
/* function types */
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem,
|
||||
const lzo_bytep dict, lzo_uint dict_len );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem,
|
||||
const lzo_bytep dict, lzo_uint dict_len );
|
||||
|
||||
|
||||
/* Callback interface. Currently only the progress indicator ("nprogress")
|
||||
* is used, but this may change in a future release. */
|
||||
|
||||
struct lzo_callback_t;
|
||||
typedef struct lzo_callback_t lzo_callback_t;
|
||||
#define lzo_callback_p lzo_callback_t __LZO_MMODEL *
|
||||
|
||||
/* malloc & free function types */
|
||||
typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t)
|
||||
(lzo_callback_p self, lzo_uint items, lzo_uint size);
|
||||
typedef void (__LZO_CDECL *lzo_free_func_t)
|
||||
(lzo_callback_p self, lzo_voidp ptr);
|
||||
|
||||
/* a progress indicator callback function */
|
||||
typedef void (__LZO_CDECL *lzo_progress_func_t)
|
||||
(lzo_callback_p, lzo_uint, lzo_uint, int);
|
||||
|
||||
struct lzo_callback_t
|
||||
{
|
||||
/* custom allocators (set to 0 to disable) */
|
||||
lzo_alloc_func_t nalloc; /* [not used right now] */
|
||||
lzo_free_func_t nfree; /* [not used right now] */
|
||||
|
||||
/* a progress indicator callback function (set to 0 to disable) */
|
||||
lzo_progress_func_t nprogress;
|
||||
|
||||
/* NOTE: the first parameter "self" of the nalloc/nfree/nprogress
|
||||
* callbacks points back to this struct, so you are free to store
|
||||
* some extra info in the following variables. */
|
||||
lzo_voidp user1;
|
||||
lzo_xint user2;
|
||||
lzo_xint user3;
|
||||
};
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// error codes and prototypes
|
||||
************************************************************************/
|
||||
|
||||
/* Error codes for the compression/decompression functions. Negative
|
||||
* values are errors, positive values will be used for special but
|
||||
* normal events.
|
||||
*/
|
||||
#define LZO_E_OK 0
|
||||
#define LZO_E_ERROR (-1)
|
||||
#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */
|
||||
#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
|
||||
#define LZO_E_INPUT_OVERRUN (-4)
|
||||
#define LZO_E_OUTPUT_OVERRUN (-5)
|
||||
#define LZO_E_LOOKBEHIND_OVERRUN (-6)
|
||||
#define LZO_E_EOF_NOT_FOUND (-7)
|
||||
#define LZO_E_INPUT_NOT_CONSUMED (-8)
|
||||
#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
|
||||
|
||||
|
||||
#ifndef lzo_sizeof_dict_t
|
||||
# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep))
|
||||
#endif
|
||||
|
||||
/* lzo_init() should be the first function you call.
|
||||
* Check the return code !
|
||||
*
|
||||
* lzo_init() is a macro to allow checking that the library and the
|
||||
* compiler's view of various types are consistent.
|
||||
*/
|
||||
#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
|
||||
(int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\
|
||||
(int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\
|
||||
(int)sizeof(lzo_callback_t))
|
||||
LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int);
|
||||
|
||||
/* version functions (useful for shared libraries) */
|
||||
LZO_EXTERN(unsigned) lzo_version(void);
|
||||
LZO_EXTERN(const char *) lzo_version_string(void);
|
||||
LZO_EXTERN(const char *) lzo_version_date(void);
|
||||
LZO_EXTERN(const lzo_charp) _lzo_version_string(void);
|
||||
LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
|
||||
|
||||
/* string functions */
|
||||
LZO_EXTERN(int)
|
||||
lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memset(lzo_voidp _s, int _c, lzo_uint _len);
|
||||
|
||||
/* checksum functions */
|
||||
LZO_EXTERN(lzo_uint32)
|
||||
lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_uint32)
|
||||
lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len);
|
||||
LZO_EXTERN(const lzo_uint32p)
|
||||
lzo_get_crc32_table(void);
|
||||
|
||||
/* misc. */
|
||||
LZO_EXTERN(int) _lzo_config_check(void);
|
||||
typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
|
||||
typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
|
||||
typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;
|
||||
|
||||
/* align a char pointer on a boundary that is a multiple of `size' */
|
||||
LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
|
||||
#define LZO_PTR_ALIGN_UP(_ptr,_size) \
|
||||
((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size)))
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// deprecated macros - only for backward compatibility with LZO v1.xx
|
||||
************************************************************************/
|
||||
|
||||
#if defined(LZO_CFG_COMPAT)
|
||||
|
||||
#define __LZOCONF_H 1
|
||||
|
||||
#if defined(LZO_ARCH_I086)
|
||||
# define __LZO_i386 1
|
||||
#elif defined(LZO_ARCH_I386)
|
||||
# define __LZO_i386 1
|
||||
#endif
|
||||
|
||||
#if defined(LZO_OS_DOS16)
|
||||
# define __LZO_DOS 1
|
||||
# define __LZO_DOS16 1
|
||||
#elif defined(LZO_OS_DOS32)
|
||||
# define __LZO_DOS 1
|
||||
#elif defined(LZO_OS_WIN16)
|
||||
# define __LZO_WIN 1
|
||||
# define __LZO_WIN16 1
|
||||
#elif defined(LZO_OS_WIN32)
|
||||
# define __LZO_WIN 1
|
||||
#endif
|
||||
|
||||
#define __LZO_CMODEL
|
||||
#define __LZO_DMODEL
|
||||
#define __LZO_ENTRY __LZO_CDECL
|
||||
#define LZO_EXTERN_CDECL LZO_EXTERN
|
||||
#define LZO_ALIGN LZO_PTR_ALIGN_UP
|
||||
|
||||
#define lzo_compress_asm_t lzo_compress_t
|
||||
#define lzo_decompress_asm_t lzo_decompress_t
|
||||
|
||||
#endif /* LZO_CFG_COMPAT */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* already included */
|
||||
|
||||
|
||||
/* vim:set ts=4 et: */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,102 @@
|
||||
/* minilzo.h -- mini subset of the LZO real-time data compression library
|
||||
|
||||
This file is part of the LZO real-time data compression library.
|
||||
|
||||
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
The LZO library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
The LZO 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the LZO library; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* the full LZO package can be found at
|
||||
* http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __MINILZO_H
|
||||
#define __MINILZO_H
|
||||
|
||||
#define MINILZO_VERSION 0x2020
|
||||
|
||||
#ifdef __LZOCONF_H
|
||||
# error "you cannot use both LZO and miniLZO"
|
||||
#endif
|
||||
|
||||
#undef LZO_HAVE_CONFIG_H
|
||||
#include "lzoconf.h"
|
||||
|
||||
#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION)
|
||||
# error "version mismatch in header files"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
//
|
||||
************************************************************************/
|
||||
|
||||
/* Memory required for the wrkmem parameter.
|
||||
* When the required size is 0, you can also pass a NULL pointer.
|
||||
*/
|
||||
|
||||
#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS
|
||||
#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
|
||||
#define LZO1X_MEM_DECOMPRESS (0)
|
||||
|
||||
|
||||
/* compression */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
/* decompression */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem /* NOT USED */ );
|
||||
|
||||
/* safe decompression with overrun testing */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem /* NOT USED */ );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* already included */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <libyuv/yuvconv.h>
|
||||
|
||||
#include <libel/lzo.h>
|
||||
#ifdef SUPPORT_READ_DV2
|
||||
#define __FALLBACK_LIBDV
|
||||
#include <libel/vj-dv.h>
|
||||
@@ -48,6 +48,7 @@ char* vj_avcodec_get_codec_name(int codec_id )
|
||||
case CODEC_ID_DVVIDEO: sprintf(name, "DVVideo"); break;
|
||||
case 999 : sprintf(name, "RAW YUV 4:2:0 Planar"); break;
|
||||
case 998 : sprintf(name, "RAW YUV 4:2:2 Planar"); break;
|
||||
case 900 : sprintf(name, "LZO YUV 4:2:2 Planar"); break;
|
||||
default:
|
||||
sprintf(name, "Unknown"); break;
|
||||
}
|
||||
@@ -73,8 +74,13 @@ static vj_encoder *vj_avcodec_new_encoder( int id, editlist *el, int pixel_forma
|
||||
memset( e->data[1], 0, el->video_width * el->video_height/2 );
|
||||
memset( e->data[2], 0, el->video_width * el->video_height/2 );
|
||||
}
|
||||
|
||||
if( id == 900 )
|
||||
{
|
||||
e->lzo = lzo_new();
|
||||
}
|
||||
|
||||
if(id != 998 && id != 999 )
|
||||
if(id != 998 && id != 999 && id != 900)
|
||||
{
|
||||
#ifdef __FALLBACK_LIBDV
|
||||
if(id != CODEC_ID_DVVIDEO)
|
||||
@@ -93,7 +99,7 @@ static vj_encoder *vj_avcodec_new_encoder( int id, editlist *el, int pixel_forma
|
||||
|
||||
}
|
||||
|
||||
if( id != 998 && id != 999 )
|
||||
if( id != 998 && id != 999 && id!= 900)
|
||||
{
|
||||
#ifdef __FALLBACK_LIBDV
|
||||
if(id != CODEC_ID_DVVIDEO )
|
||||
@@ -156,6 +162,8 @@ static vj_encoder *vj_avcodec_new_encoder( int id, editlist *el, int pixel_forma
|
||||
}
|
||||
|
||||
e->len = el->video_width * el->video_height;
|
||||
veejay_msg(0, "PIXEL FORMAT %d", el->pixel_format );
|
||||
|
||||
if(el->pixel_format == FMT_422 || el->pixel_format == FMT_422F)
|
||||
e->uv_len = e->len / 2;
|
||||
else
|
||||
@@ -205,6 +213,9 @@ static void vj_avcodec_close_encoder( vj_encoder *av )
|
||||
if(av->data[2])
|
||||
free(av->data[2]);
|
||||
free(av);
|
||||
|
||||
if(av->lzo)
|
||||
lzo_free(av->lzo);
|
||||
}
|
||||
av = NULL;
|
||||
}
|
||||
@@ -227,6 +238,8 @@ static int vj_avcodec_find_codec( int encoder )
|
||||
return CODEC_ID_MPEG4;
|
||||
case ENCODER_DIVX:
|
||||
return CODEC_ID_MSMPEG4V3;
|
||||
case ENCODER_LZO:
|
||||
return 900;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
@@ -245,6 +258,10 @@ int vj_avcodec_stop( void *encoder , int fmt)
|
||||
encoder = NULL;
|
||||
return 1;
|
||||
}
|
||||
if( fmt == 900 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
vj_encoder *env = (vj_encoder*) encoder;
|
||||
vj_avcodec_close_encoder( env );
|
||||
encoder = NULL;
|
||||
@@ -432,6 +449,51 @@ int yuv420p_to_yuv422p( uint8_t *sY,uint8_t *sCb, uint8_t *sCr, uint8_t *dst[3],
|
||||
return (len + uv_len + uv_len);
|
||||
}
|
||||
|
||||
static void long2str(unsigned char *dst, int32_t n)
|
||||
{
|
||||
dst[0] = (n )&0xff;
|
||||
dst[1] = (n>> 8)&0xff;
|
||||
dst[2] = (n>>16)&0xff;
|
||||
dst[3] = (n>>24)&0xff;
|
||||
}
|
||||
|
||||
|
||||
static int vj_avcodec_lzo( vj_encoder *av, uint8_t *src[3], uint8_t *dst , int buf_len )
|
||||
{
|
||||
uint8_t *dstI = dst + (3 * 4);
|
||||
int size1 = 0, size2=0,size3=0;
|
||||
int i;
|
||||
|
||||
i = lzo_compress( av->lzo, src[0], dstI, &size1 , av->len);
|
||||
if( i == 0 )
|
||||
{
|
||||
veejay_msg(0,"\tunable to compress Y plane");
|
||||
return 0;
|
||||
}
|
||||
dstI += size1;
|
||||
|
||||
i = lzo_compress( av->lzo, src[1], dstI, &size2 , av->uv_len );
|
||||
if( i == 0 )
|
||||
{
|
||||
veejay_msg(0,"\tunable to compress U plane");
|
||||
return 0;
|
||||
}
|
||||
|
||||
dstI += size2;
|
||||
i = lzo_compress( av->lzo, src[2], dstI, &size3 , av->uv_len );
|
||||
if( i == 0 )
|
||||
{
|
||||
veejay_msg(0,"\tunable to compress V plane");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
long2str( dst, size1 );
|
||||
long2str( dst+4,size2);
|
||||
long2str( dst+8,size3);
|
||||
|
||||
return (size1 + size2 + size3 + 12);
|
||||
}
|
||||
static int vj_avcodec_copy_frame( vj_encoder *av, uint8_t *src[3], uint8_t *dst )
|
||||
{
|
||||
if(!av)
|
||||
@@ -477,6 +539,9 @@ int vj_avcodec_encode_frame(void *encoder, int nframe,int format, uint8_t *src[
|
||||
int res=0;
|
||||
memset( &pict, 0, sizeof(pict));
|
||||
|
||||
if(format == ENCODER_LZO )
|
||||
return vj_avcodec_lzo( encoder, src, buf, buf_len );
|
||||
|
||||
if(format == ENCODER_YUV420 || format == ENCODER_YUV422) // no compression, just copy
|
||||
return vj_avcodec_copy_frame( encoder,src, buf );
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
#define ENCODER_YUV422 5
|
||||
#define ENCODER_QUICKTIME_DV 6
|
||||
#define ENCODER_QUICKTIME_MJPEG 7
|
||||
#define NUM_ENCODERS 8
|
||||
#define ENCODER_LZO 8
|
||||
#define NUM_ENCODERS 9
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -47,6 +48,7 @@ typedef struct
|
||||
int width;
|
||||
int height;
|
||||
uint8_t *data[3];
|
||||
void *lzo;
|
||||
} vj_encoder;
|
||||
|
||||
int vj_avcodec_init(editlist *el, int pix);
|
||||
|
||||
@@ -40,20 +40,20 @@
|
||||
#include <libvjmem/vjmem.h>
|
||||
#include <libyuv/yuvconv.h>
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <libel/lzo.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef SUPPORT_READ_DV2
|
||||
#include "rawdv.h"
|
||||
#include "vj-dv.h"
|
||||
#endif
|
||||
#define MAX_CODECS 40
|
||||
#define MAX_CODECS 50
|
||||
#define CODEC_ID_YUV420 999
|
||||
#define CODEC_ID_YUV422 998
|
||||
|
||||
#define CODEC_ID_YUVLZO 900
|
||||
#define DUMMY_FRAMES 2
|
||||
|
||||
//@@ !
|
||||
@@ -126,6 +126,7 @@ static struct
|
||||
{ "iyuv", CODEC_ID_YUV420, -1},
|
||||
{ "i420", CODEC_ID_YUV420, -1},
|
||||
{ "yv16", CODEC_ID_YUV422, -1},
|
||||
{ "mlzo", CODEC_ID_YUVLZO, -1},
|
||||
{ "pict", 0xffff, -1},
|
||||
{ "hfyu", CODEC_ID_HUFFYUV, -1},
|
||||
{ "cyuv", CODEC_ID_CYUV, -1},
|
||||
@@ -174,6 +175,7 @@ static struct
|
||||
{ "yuv", CODEC_ID_YUV420 },
|
||||
{ "iyuv", CODEC_ID_YUV420 },
|
||||
{ "i420", CODEC_ID_YUV420 },
|
||||
{ "mlzo", CODEC_ID_YUVLZO },
|
||||
{ "yv16", CODEC_ID_YUV422 },
|
||||
{ "pict", 0xffff }, /* invalid fourcc */
|
||||
{ "hfyu", CODEC_ID_HUFFYUV},
|
||||
@@ -203,6 +205,8 @@ typedef struct
|
||||
static vj_dv_decoder *dv_decoder_ = NULL;
|
||||
#endif
|
||||
|
||||
static void *lzo_decoder_ = NULL;
|
||||
|
||||
static vj_decoder *el_codecs[MAX_CODECS];
|
||||
|
||||
static int _el_get_codec(int id, int in_pix_fmt )
|
||||
@@ -372,7 +376,7 @@ vj_decoder *_el_new_decoder( int id , int width, int height, float fps, int pixe
|
||||
}
|
||||
#endif
|
||||
|
||||
if( id != CODEC_ID_YUV422 && id != CODEC_ID_YUV420 && !found)
|
||||
if( id != CODEC_ID_YUV422 && id != CODEC_ID_YUV420 && !found && id != CODEC_ID_YUVLZO)
|
||||
{
|
||||
int i;
|
||||
d->codec = avcodec_find_decoder( id );
|
||||
@@ -406,6 +410,10 @@ vj_decoder *_el_new_decoder( int id , int width, int height, float fps, int pixe
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_DEBUG,"\tResampling YUV planar to preferred pixel format");
|
||||
d->sampler = subsample_init( width );
|
||||
if( id == CODEC_ID_YUVLZO )
|
||||
{
|
||||
lzo_decoder_ = lzo_new();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1038,7 +1046,15 @@ int vj_el_get_video_frame(editlist *el, long nframe, uint8_t *dst[3])
|
||||
return 0;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case CODEC_ID_YUVLZO:
|
||||
|
||||
inter = lzo_decompress( lzo_decoder_, data,res, dst );
|
||||
if( inter == 0 )
|
||||
return 0;
|
||||
|
||||
return inter;
|
||||
|
||||
break;
|
||||
default:
|
||||
inter = lav_video_interlacing(el->lav_fd[N_EL_FILE(n)]);
|
||||
d->img->width = el->video_width;
|
||||
@@ -1211,6 +1227,9 @@ int test_video_frame( lav_file_t *lav,int out_pix_fmt)
|
||||
case CODEC_ID_DVVIDEO:
|
||||
ret = vj_dv_scan_frame( dv_decoder_, d->tmp_buffer );
|
||||
break;
|
||||
case CODEC_ID_YUVLZO:
|
||||
ret = FMT_422;
|
||||
break;
|
||||
default:
|
||||
|
||||
len = avcodec_decode_video(
|
||||
|
||||
Reference in New Issue
Block a user