New versions for ffmpeg, the decoder has significant quality improvement.

cusax-fix
Damian Minkov 16 years ago
parent a4394d0730
commit 0e02f555b3

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -14,8 +14,8 @@ CPPFLAGS=-DJNI_IMPLEMENTATION \
#LDFLAGS=-dynamiclib -Wl,-read_only_relocs,suppress
LDFLAGS=-Wl,--kill-at -shared
LIBS=-L$(FFMPEG_HOME)/libavformat -L$(FFMPEG_HOME)/libavcodec -L$(FFMPEG_HOME)/libavutil \
-L$(X264_HOME) \
-lavformat -lavcodec -lavutil -lx264
-L$(FFMPEG_HOME)/libswscale -L$(X264_HOME) \
-lavformat -lavcodec -lavutil -lswscale -lx264
$(TARGET): net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.c net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.h
$(CC) $(CPPFLAGS) $< $(LDFLAGS) -o $@ $(LIBS)

@ -1,4 +1,4 @@
1. x264-snapshot-20090105-2245
1. x264-snapshot-20091208-2245
- Windows
@ -8,7 +8,7 @@
./configure --enable-pic
2. ffmpeg-r16801
2. ffmpeg-r20783
- Windows

@ -11,6 +11,7 @@
#include <libavutil/avutil.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_av_1free (
@ -58,11 +59,26 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1decode_
if (buf) {
jbyte *buf_ptr = (*jniEnv)->GetByteArrayElements (jniEnv, buf, NULL);
if (buf_ptr) {
if (buf_ptr)
{
AVPacket avpkt;
av_init_packet(&avpkt);
avpkt.data = (const uint8_t *)buf_ptr;
avpkt.size = (int)buf_size;
ret = avcodec_decode_video2(
(AVCodecContext *) avctx,
(AVFrame *) frame,
&n_got_picture,
&avpkt);
/* if (buf_ptr) {
ret = (jint)
avcodec_decode_video ((AVCodecContext *) avctx,
(AVFrame *) frame, &n_got_picture,
(const uint8_t *) buf_ptr, (int) buf_size);
*/
(*jniEnv)->ReleaseByteArrayElements (jniEnv, buf, buf_ptr, 0);
if (got_picture) {
@ -112,10 +128,15 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1find_1e
return (jlong) avcodec_find_encoder ((enum CodecID) id);
}
/* empty log function to skip all the logs coming into the console */
static void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
{}
JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1init (
JNIEnv *jniEnv, jclass clazz) {
avcodec_init ();
av_log_set_callback(log_callback_help);
}
JNIEXPORT jint JNICALL
@ -364,13 +385,38 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avpicture_1get_1
return (jint) avpicture_get_size ((int) pix_fmt, (int) width, (int) height);
}
static int image_convert(
AVPicture* dst, int dst_pix_fmt,
const AVPicture* src, int pix_fmt, int width, int height)
{
struct SwsContext *img_convert_ctx =
sws_getContext(
width, height, pix_fmt,
width, height, dst_pix_fmt, SWS_BICUBIC, NULL, NULL, NULL);
int result = sws_scale(img_convert_ctx,
src->data, src->linesize, 0, height,
dst->data, dst->linesize);
sws_freeContext(img_convert_ctx);
return result;
}
JNIEXPORT jint JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert (
JNIEnv *jniEnv, jclass clazz, jlong dst, jint dst_pix_fmt, jlong src,
jint pix_fmt, jint width, jint height) {
jint pix_fmt, jint width, jint height)
{
return (jint)
img_convert ((AVPicture *) dst, (int) dst_pix_fmt,
(const AVPicture *) src, (int) pix_fmt, (int) width, (int) height);
image_convert (
(AVPicture *) dst,
(int) dst_pix_fmt,
(const AVPicture *) src,
(int) pix_fmt,
(int) width,
(int) height);
}
JNIEXPORT void JNICALL
@ -393,3 +439,17 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_memcpy__J_3BII (
(*jniEnv)->GetByteArrayRegion (jniEnv, src, src_offset, src_length,
(jbyte *) dst);
}
JNIEXPORT jint JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32Format
(JNIEnv *env, jclass clazz)
{
return PIX_FMT_RGB32;
}
JNIEXPORT jint JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getYUV420PFormat
(JNIEnv *env, jclass clazz)
{
return PIX_FMT_YUV420P;
}

@ -1,413 +1,425 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG */
#ifndef _Included_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
#define _Included_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
#ifdef __cplusplus
extern "C" {
#endif
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_CODEC_FLAG_LOOP_FILTER
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_CODEC_FLAG_LOOP_FILTER 2048L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_CODEC_ID_H264
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_CODEC_ID_H264 28L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_BUG_AUTODETECT
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_BUG_AUTODETECT 1L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_CMP_CHROMA
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_CMP_CHROMA 256L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_INPUT_BUFFER_PADDING_SIZE
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_INPUT_BUFFER_PADDING_SIZE 8L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_MB_DECISION_SIMPLE
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_MB_DECISION_SIMPLE 0L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_PIX_FMT_RGB32
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_PIX_FMT_RGB32 6L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_PIX_FMT_YUV420P
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_PIX_FMT_YUV420P 0L
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: av_free
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_av_1free
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: av_malloc
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_av_1malloc
(JNIEnv *, jclass, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: av_register_all
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_av_1register_1all
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_alloc_context
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1alloc_1context
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_alloc_frame
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1alloc_1frame
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_close
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1close
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_decode_video
* Signature: (JJ[Z[BI)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1decode_1video
(JNIEnv *, jclass, jlong, jlong, jbooleanArray, jbyteArray, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_encode_video
* Signature: (J[BIJ)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1encode_1video
(JNIEnv *, jclass, jlong, jbyteArray, jint, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_find_decoder
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1find_1decoder
(JNIEnv *, jclass, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_find_encoder
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1find_1encoder
(JNIEnv *, jclass, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_init
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1init
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_open
* Signature: (JJ)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1open
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_add_flags
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1add_1flags
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_add_partitions
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1add_1partitions
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_get_height
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1get_1height
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_get_pix_fmt
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1get_1pix_1fmt
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_get_width
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1get_1width
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_bit_rate
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1bit_1rate
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_bit_rate_tolerance
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1bit_1rate_1tolerance
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_crf
* Signature: (JF)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1crf
(JNIEnv *, jclass, jlong, jfloat);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_gop_size
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1gop_1size
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_i_quant_factor
* Signature: (JF)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1i_1quant_1factor
(JNIEnv *, jclass, jlong, jfloat);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_mb_decision
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1mb_1decision
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_me_cmp
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1me_1cmp
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_me_method
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1me_1method
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_me_range
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1me_1range
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_me_subpel_quality
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1me_1subpel_1quality
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_pix_fmt
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1pix_1fmt
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_qcompress
* Signature: (JF)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1qcompress
(JNIEnv *, jclass, jlong, jfloat);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_quantizer
* Signature: (JIII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1quantizer
(JNIEnv *, jclass, jlong, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_rc_buffer_size
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1rc_1buffer_1size
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_rc_eq
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1rc_1eq
(JNIEnv *, jclass, jlong, jstring);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_rc_max_rate
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1rc_1max_1rate
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_sample_aspect_ratio
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1sample_1aspect_1ratio
(JNIEnv *, jclass, jlong, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_scenechange_threshold
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1scenechange_1threshold
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_size
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1size
(JNIEnv *, jclass, jlong, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_thread_count
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1thread_1count
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_time_base
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1time_1base
(JNIEnv *, jclass, jlong, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_workaround_bugs
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1workaround_1bugs
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avframe_set_data
* Signature: (JJJJ)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avframe_1set_1data
(JNIEnv *, jclass, jlong, jlong, jlong, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avframe_set_key_frame
* Signature: (JZ)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avframe_1set_1key_1frame
(JNIEnv *, jclass, jlong, jboolean);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avframe_set_linesize
* Signature: (JIII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avframe_1set_1linesize
(JNIEnv *, jclass, jlong, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avpicture_fill
* Signature: (JJIII)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avpicture_1fill
(JNIEnv *, jclass, jlong, jlong, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avpicture_get_data0
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avpicture_1get_1data0
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avpicture_get_size
* Signature: (III)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avpicture_1get_1size
(JNIEnv *, jclass, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: img_convert
* Signature: (JIJIII)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert
(JNIEnv *, jclass, jlong, jint, jlong, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: memcpy
* Signature: ([IIIJ)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_memcpy___3IIIJ
(JNIEnv *, jclass, jintArray, jint, jint, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: memcpy
* Signature: (J[BII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_memcpy__J_3BII
(JNIEnv *, jclass, jlong, jbyteArray, jint, jint);
#ifdef __cplusplus
}
#endif
#endif
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG */
#ifndef _Included_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
#define _Included_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
#ifdef __cplusplus
extern "C" {
#endif
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_CODEC_FLAG_LOOP_FILTER
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_CODEC_FLAG_LOOP_FILTER 2048L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_CODEC_ID_H264
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_CODEC_ID_H264 28L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_BUG_AUTODETECT
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_BUG_AUTODETECT 1L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_CMP_CHROMA
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_CMP_CHROMA 256L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_INPUT_BUFFER_PADDING_SIZE
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_INPUT_BUFFER_PADDING_SIZE 8L
#undef net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_MB_DECISION_SIMPLE
#define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_FF_MB_DECISION_SIMPLE 0L
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: getRGB32Format
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32Format
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: getYUV420PFormat
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getYUV420PFormat
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: av_free
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_av_1free
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: av_malloc
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_av_1malloc
(JNIEnv *, jclass, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: av_register_all
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_av_1register_1all
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_alloc_context
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1alloc_1context
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_alloc_frame
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1alloc_1frame
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_close
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1close
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_decode_video
* Signature: (JJ[Z[BI)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1decode_1video
(JNIEnv *, jclass, jlong, jlong, jbooleanArray, jbyteArray, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_encode_video
* Signature: (J[BIJ)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1encode_1video
(JNIEnv *, jclass, jlong, jbyteArray, jint, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_find_decoder
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1find_1decoder
(JNIEnv *, jclass, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_find_encoder
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1find_1encoder
(JNIEnv *, jclass, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_init
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1init
(JNIEnv *, jclass);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodec_open
* Signature: (JJ)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1open
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_add_flags
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1add_1flags
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_add_partitions
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1add_1partitions
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_get_height
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1get_1height
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_get_pix_fmt
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1get_1pix_1fmt
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_get_width
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1get_1width
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_bit_rate
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1bit_1rate
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_bit_rate_tolerance
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1bit_1rate_1tolerance
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_crf
* Signature: (JF)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1crf
(JNIEnv *, jclass, jlong, jfloat);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_gop_size
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1gop_1size
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_i_quant_factor
* Signature: (JF)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1i_1quant_1factor
(JNIEnv *, jclass, jlong, jfloat);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_mb_decision
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1mb_1decision
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_me_cmp
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1me_1cmp
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_me_method
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1me_1method
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_me_range
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1me_1range
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_me_subpel_quality
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1me_1subpel_1quality
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_pix_fmt
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1pix_1fmt
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_qcompress
* Signature: (JF)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1qcompress
(JNIEnv *, jclass, jlong, jfloat);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_quantizer
* Signature: (JIII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1quantizer
(JNIEnv *, jclass, jlong, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_rc_buffer_size
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1rc_1buffer_1size
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_rc_eq
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1rc_1eq
(JNIEnv *, jclass, jlong, jstring);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_rc_max_rate
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1rc_1max_1rate
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_sample_aspect_ratio
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1sample_1aspect_1ratio
(JNIEnv *, jclass, jlong, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_scenechange_threshold
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1scenechange_1threshold
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_size
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1size
(JNIEnv *, jclass, jlong, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_thread_count
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1thread_1count
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_time_base
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1time_1base
(JNIEnv *, jclass, jlong, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avcodeccontext_set_workaround_bugs
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1workaround_1bugs
(JNIEnv *, jclass, jlong, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avframe_set_data
* Signature: (JJJJ)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avframe_1set_1data
(JNIEnv *, jclass, jlong, jlong, jlong, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avframe_set_key_frame
* Signature: (JZ)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avframe_1set_1key_1frame
(JNIEnv *, jclass, jlong, jboolean);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avframe_set_linesize
* Signature: (JIII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avframe_1set_1linesize
(JNIEnv *, jclass, jlong, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avpicture_fill
* Signature: (JJIII)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avpicture_1fill
(JNIEnv *, jclass, jlong, jlong, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avpicture_get_data0
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avpicture_1get_1data0
(JNIEnv *, jclass, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: avpicture_get_size
* Signature: (III)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avpicture_1get_1size
(JNIEnv *, jclass, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: img_convert
* Signature: (JIJIII)I
*/
JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert
(JNIEnv *, jclass, jlong, jint, jlong, jint, jint, jint);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: memcpy
* Signature: ([IIIJ)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_memcpy___3IIIJ
(JNIEnv *, jclass, jintArray, jint, jint, jlong);
/*
* Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG
* Method: memcpy
* Signature: (J[BII)V
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_memcpy__J_3BII
(JNIEnv *, jclass, jlong, jbyteArray, jint, jint);
#ifdef __cplusplus
}
#endif
#endif

@ -23,9 +23,15 @@ public class FFMPEG
public static final int FF_MB_DECISION_SIMPLE = 0;
public static final int PIX_FMT_RGB32 = 6;
public static final int PIX_FMT_RGB32;
public static final int PIX_FMT_YUV420P = 0;
public static final int PIX_FMT_YUV420P;
public static final int X264_RC_ABR = 2;
public static native int getRGB32Format();
public static native int getYUV420PFormat();
public static native void av_free(long ptr);
@ -158,5 +164,7 @@ public static native void memcpy(long dst, byte[] src, int src_offset,
av_register_all();
avcodec_init();
PIX_FMT_RGB32 = getRGB32Format();
PIX_FMT_YUV420P = getYUV420PFormat();
}
}

Loading…
Cancel
Save