diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-12-02 01:05:18 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-12-05 16:35:30 +0400 |
commit | 86eb2eaac629909d6ee4067c6f1e485a4e70473d (patch) | |
tree | 4d7f765b2f4fb30225e5e3f28ec157d9d15d4d20 /libavcodec/ljpegenc.c | |
parent | 3360ad995530ea6967b1e83981b4aa8240fbb0ed (diff) |
mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_dc()
This will allow deMpegEncContextizing the LJPEG encoder.
Diffstat (limited to 'libavcodec/ljpegenc.c')
-rw-r--r-- | libavcodec/ljpegenc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index 46b51ab48d..1ca2d37ad1 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -115,9 +115,9 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, diff= ((left[i] - pred + 0x100)&0x1FF) - 0x100; if(i==0) - ff_mjpeg_encode_dc(s, diff, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly + ff_mjpeg_encode_dc(&s->pb, diff, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly else - ff_mjpeg_encode_dc(s, diff, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); + ff_mjpeg_encode_dc(&s->pb, diff, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); } } } @@ -158,9 +158,9 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, } if(i==0) - ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly + ff_mjpeg_encode_dc(&s->pb, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly else - ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); + ff_mjpeg_encode_dc(&s->pb, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); } } } @@ -170,19 +170,19 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, int x, y, h, v, linesize; h = s->mjpeg_hsample[i]; v = s->mjpeg_vsample[i]; - linesize= p->linesize[i]; + linesize = pict->linesize[i]; for(y=0; y<v; y++){ for(x=0; x<h; x++){ int pred; - ptr = p->data[i] + (linesize * (v * mb_y + y)) + (h * mb_x + x); //FIXME optimize this crap + ptr = pict->data[i] + (linesize * (v * mb_y + y)) + (h * mb_x + x); //FIXME optimize this crap PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor); if(i==0) - ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly + ff_mjpeg_encode_dc(&s->pb, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly else - ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); + ff_mjpeg_encode_dc(&s->pb, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); } } } |