[FFmpeg-devel] [PATCH]Simplify vdpau_add_data_chunk
Carl Eugen Hoyos
cehoyos
Sat Jan 10 06:00:52 CET 2009
Hi!
Attached patch slightly simplifies vdpau_add_data_chunk.
Please comment, Carl Eugen
-------------- next part --------------
Index: libavcodec/vdpau_internal.h
===================================================================
--- libavcodec/vdpau_internal.h (revision 16513)
+++ libavcodec/vdpau_internal.h (working copy)
@@ -27,8 +27,8 @@
#include <stdint.h>
#include "h264.h"
-void ff_vdpau_h264_add_data_chunk(H264Context *h, const uint8_t *buf,
- int buf_size);
+void ff_vdpau_add_data_chunk(MpegEncContext *s, const uint8_t *buf,
+ int buf_size);
void ff_vdpau_h264_set_reference_frames(H264Context *h);
void ff_vdpau_h264_picture_complete(H264Context *h);
Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c (revision 16513)
+++ libavcodec/h264.c (working copy)
@@ -7425,8 +7425,8 @@
&& avctx->skip_frame < AVDISCARD_ALL){
if(ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU){
static const uint8_t start_code[] = {0x00, 0x00, 0x01};
- ff_vdpau_h264_add_data_chunk(h, start_code, sizeof(start_code));
- ff_vdpau_h264_add_data_chunk(h, &buf[buf_index - consumed], consumed );
+ ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code));
+ ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed );
}else
context_count++;
}
Index: libavcodec/vdpauvideo.c
===================================================================
--- libavcodec/vdpauvideo.c (revision 16513)
+++ libavcodec/vdpauvideo.c (working copy)
@@ -106,9 +106,9 @@
}
}
-void ff_vdpau_h264_add_data_chunk(H264Context *h, const uint8_t *buf, int buf_size)
+void ff_vdpau_add_data_chunk(MpegEncContext *s, const uint8_t *buf,
+ int buf_size)
{
- MpegEncContext * s = &h->s;
struct vdpau_render_state * render;
render = (struct vdpau_render_state*)s->current_picture_ptr->data[0];
More information about the ffmpeg-devel
mailing list