summaryrefslogtreecommitdiff
path: root/libavcodec/rv30.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2014-03-31 17:46:29 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-04-09 02:12:19 +0200
commitf6774f905fb3cfdc319523ac640be30b14c1bc55 (patch)
tree6f0db53a2febce58c562d383e1f3f61c9c256275 /libavcodec/rv30.c
parent60fd7d36c47d62d4c603bf16c213b1a924f5cfcf (diff)
mpegvideo: operate with pointers to AVFrames instead of whole structs
The most interesting parts are initialization in ff_MPV_common_init() and uninitialization in ff_MPV_common_end(). ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL checks for Picture.f, because these functions can be called on uninitialized or partially initialized Pictures. NULL pointer checks are added to ff_thread_release_buffer() stub function. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/rv30.c')
-rw-r--r--libavcodec/rv30.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index 6b76651ff7..1675ea2278 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -166,7 +166,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
if(mb_x)
left_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos - 1]];
for(j = 0; j < 16; j += 4){
- Y = s->current_picture_ptr->f.data[0] + mb_x*16 + (row*16 + j) * s->linesize + 4 * !mb_x;
+ Y = s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize + 4 * !mb_x;
for(i = !mb_x; i < 4; i++, Y += 4){
int ij = i + j;
loc_lim = 0;
@@ -186,7 +186,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
if(mb_x)
left_cbp = (r->cbp_chroma[mb_pos - 1] >> (k*4)) & 0xF;
for(j = 0; j < 8; j += 4){
- C = s->current_picture_ptr->f.data[k + 1] + mb_x*8 + (row*8 + j) * s->uvlinesize + 4 * !mb_x;
+ C = s->current_picture_ptr->f->data[k + 1] + mb_x*8 + (row*8 + j) * s->uvlinesize + 4 * !mb_x;
for(i = !mb_x; i < 2; i++, C += 4){
int ij = i + (j >> 1);
loc_lim = 0;
@@ -208,7 +208,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
if(row)
top_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos - s->mb_stride]];
for(j = 4*!row; j < 16; j += 4){
- Y = s->current_picture_ptr->f.data[0] + mb_x*16 + (row*16 + j) * s->linesize;
+ Y = s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize;
for(i = 0; i < 4; i++, Y += 4){
int ij = i + j;
loc_lim = 0;
@@ -228,7 +228,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
if(row)
top_cbp = (r->cbp_chroma[mb_pos - s->mb_stride] >> (k*4)) & 0xF;
for(j = 4*!row; j < 8; j += 4){
- C = s->current_picture_ptr->f.data[k+1] + mb_x*8 + (row*8 + j) * s->uvlinesize;
+ C = s->current_picture_ptr->f->data[k+1] + mb_x*8 + (row*8 + j) * s->uvlinesize;
for(i = 0; i < 2; i++, C += 4){
int ij = i + (j >> 1);
loc_lim = 0;